﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>RoboticsConnection User Forum / RoboticsConnection Software Support / Serializer Services for Robotics Studio  / Autolaunching an MSRS Service from Windows CE / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>RoboticsConnection User Forum</description><link>http://www.roboticsconnection.com/userForums/</link><webMaster>info@roboticsconnection.com</webMaster><lastBuildDate>Thu, 04 Dec 2008 14:04:22 GMT</lastBuildDate><ttl>20</ttl><item><title>Autolaunching an MSRS Service from Windows CE</title><link>http://www.roboticsconnection.com/userForums/Topic25-7-1.aspx</link><description>&lt;SPAN class=Forum_Normal id=spBody&gt;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 &lt;A href="http://www.makerfaire.com/"&gt;&lt;FONT color=#003366&gt;Maker Faire&lt;/FONT&gt;&lt;/A&gt; on May 19-20th, 2007.&lt;P&gt;Anyway, we attempted to use the &lt;A href="http://www.learningce.com/797.aspx"&gt;&lt;FONT color=#003366&gt;AutoLaunch&lt;/FONT&gt;&lt;/A&gt; 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.&lt;/P&gt;&lt;P&gt;The final command for the shortcut looks like this:&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt;"\Program Files\AutonomousFollowing\bin\cf.dsshost.exe" /p:50000 /t:50001 /m:..\samples\platforms\roboticsconnection\msrsdemo\autonomousfollowing\autonomousfollwing.manifest.xml&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Is that long enough for you??? :)  When naming your service, you might want to take the time to choose a much shorter name. LoL&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;There's also a good explanations for creating shortcuts for WinCE apps here:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: Calibri; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-theme-font: minor-latin"&gt;&lt;A href="http://msdn2.microsoft.com/en-us/embedded/aa731295.aspx"&gt;&lt;U&gt;&lt;FONT color=#800080&gt;http://msdn2.microsoft.com/en-us/embedded/aa731295.aspx&lt;/FONT&gt;&lt;/U&gt;&lt;/A&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;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.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;o:p&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;We then create a shortcut to MsrsAutoStart with a command line for the node and place the shortcut in the /Windows/Startup directory.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;o:p&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;For details on how to create a shortcut file there is an article on msdn [1]&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;o:p&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;If all the MSRS files are in \Program Files\MSRS\bin then the command line would look like…&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;o:p&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;“\Program Files\MSRS\bin\MsrsAutoStart.exe” “\Program Files\MSRS\bin\cf.dsshost.exe” –p:50000 –t:50001 –m:sumoplayer.hardware.manifest.xml&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;o:p&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;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.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;o:p&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;Hope this Helps&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;o:p&gt;&lt;FONT face="Courier New" color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=2&gt;Paul&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;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. &lt;IMG src="http://www.roboticsconnection.com/dnn/Portals/_default/Smileys/cool.gif" border=0&gt;&lt;/P&gt;&lt;P&gt;By the way, THANKS FOR YOUR HELP JIM!!!&lt;/P&gt;&lt;/SPAN&gt;</description><pubDate>Sat, 19 Jan 2008 20:57:46 GMT</pubDate><dc:creator>jsummerour</dc:creator></item></channel></rss>