Search  
Sunday, November 23, 2008 ..:: Forum ::.. Register  Login
 HomePage Minimize

 Print   

 Products Minimize

 Print   

 MSRS Minimize

 Print   

      
 RoboticsConnection Forum Minimize
SearchForum Home
  Discussions  Microsoft Robotics Studio / Windows CE  Autolaunching a...
 Autolaunching an MSRS Service from Windows CE
 
 5/9/2007 10:31:58 PM
jason
158 posts
5th


Autolaunching an MSRS Service from Windows CE
 Modified By jason  on 5/9/2007 6:33:59 PM)

I spent almost 4 hours on the phone today with a good friend (James Y. Wilson - Windows CE Expert) trying to get a new Robotics Studio service we wrote to start up automatically when Windows CE boots up.  The service is the AutonomousFollowing service, which allows one of our new robots (aka Stinger) to follow a line and watch for objects in front of it.   It's part of our demo at Maker Faire on May 19-20th, 2007.

Anyway, we attempted to use the AutoLaunch facility with no luck.  Eventually, Jim had the bright idea of creating a shortcut to the cf.dsshost.exe application (which starts an MSRS DSS node), copy and paste it into the '\Windows\StartUp' folder, and modify the properties to add the command line parameters for the service (such as the ports and manifest location).  We struggled with it for a while, getting the right command line set up correctly, but eventually it worked.

The final command for the shortcut looks like this:

"\Program Files\AutonomousFollowing\bin\cf.dsshost.exe" /p:50000 /t:50001 /m:..\samples\platforms\roboticsconnection\msrsdemo\autonomousfollowing\autonomousfollwing.manifest.xml

Is that long enough for you??? :)  When naming your service, you might want to take the time to choose a much shorter name. LoL

Once I pasted the shortcut to '\Windows\StartUp', I simply right clicked on the file, and then clicked on 'Properties', then modified the Target under the 'Shortcut' tab.

There's also a good explanations for creating shortcuts for WinCE apps here:

http://msdn2.microsoft.com/en-us/embedded/aa731295.aspx

Also, about the time we got the application to automatically launch, Paul Roberts from the MSRS team replied back to an earlier email with the following:

We haven’t used AutoLaunch to start a DSS Node. To avoid having to modify the registry we created a tool called MsrsAutoStart.exe which we use to start the node. This also waits 15 seconds before starting the program in its command line, this a) allows the system time to stabilize if necessary and b) allows an interactive user to choose not to run the node.

 

We then create a shortcut to MsrsAutoStart with a command line for the node and place the shortcut in the /Windows/Startup directory.

 

For details on how to create a shortcut file there is an article on msdn [1]

 

If all the MSRS files are in \Program Files\MSRS\bin then the command line would look like…

 

“\Program Files\MSRS\bin\MsrsAutoStart.exe” “\Program Files\MSRS\bin\cf.dsshost.exe” –p:50000 –t:50001 –m:sumoplayer.hardware.manifest.xml

 

Like the rest of the MSRS code, MsrsAutoStart is a .Net CF application and if .Net CF is not installed on the machine then it will fail silently.

 

Hope this Helps

 

Paul

So, after struggling so long to get the app to launch (due to my own ignorance of how Win CE works), I decided to post the solution for others to use.

By the way, THANKS FOR YOUR HELP JIM!!!


Jason Summerour
President,
Summerour Robotics Corp
Microsoft MVP
www.roboticsconnection.com
 5/15/2007 10:07:07 AM
jywilson
35 posts


Re: Autolaunching an MSRS Service from Windows CE

I am glad I could help Jason.  Have a great Maker Faire!

Jim


James Y. Wilson
http://www.learningce.com
Fortudine Vincimus!

  Discussions  Microsoft Robotics Studio / Windows CE  Autolaunching a...

SearchSearch  Forum HomeForum Home    Print   

Copyright 2004-2007 Summerour Robotics Corp   Terms Of Use  Privacy Statement
DotNetNuke® is copyright 2002-2008 by DotNetNuke Corporation