John
Fri Nov 19 14:27:08 CST 2004
There actually is an (unsupported) option that will let you do command line
options too. It also saves you from having to call SignalStarted.
Check out the code in \public\servers\sdk\samples\services\svcStart. This
is a small service in services.exe that reads executables to start at
boottime, along with a delay period (in case you want system to settle down
before starting) and cmd arguments. To build it from Platform Builder, go
to 'build OS->open release directory' and cd to this directory. Then build
and run 'sysgen -p servers svcstart.' Add svcstart.dll to your image.
You'll need this registry to get the service started:
[HKEY_LOCAL_MACHINE\Services\SVCSTART]
"Context"=dword:0
"Dll"="svcstart.dll"
"Order"=dword:99
"Keep"=dword:1
"Prefix"="STR"
"Index"=dword:0
--
Each reg subkey under this represents a different application to be started.
An example (from servers.reg) would be:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SVCStart\1]
@="msmqadm"
"Args"="register"
"Delay"=dword:4000
Check out C code if you want to know more details. This isn't doc'd in MSDN
and as I said, not officially supported. This is one of the cases where our
documentation is written in C.
--
John Spaith
Software Design Engineer, Windows CE
Microsoft Corporation
Check out the new CE Networking Team Blog at
http://blogs.msdn.com/cenet/.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2003 Microsoft Corporation. All rights
reserved.
"Steve Maillet (eMVP)" <nospam1@EntelechyConsulting.com> wrote in message
news:OfuZobkzEHA.3808@tk2msftngp13.phx.gbl...
> If your app requires arguments on the command line - then, no. You will
> have to create an application that launches it or change it so it doesn't
> need any arguments.
>
> --
> Steve Maillet
> EmbeddedFusion
> www.EmbeddedFusion.com
> smaillet at EmbeddedFusion dot com
>
>