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!!!
I am glad I could help Jason. Have a great Maker Faire!
Jim
James Y. Wilson http://www.learningce.com Fortudine Vincimus!