I believe I have an error in creating a service in Windows XP Computers, because after my installation is finished I don't see any of my services installed.
This is how I create a service in my installer:
Filename: {sys}\sc.exe; Check: (IsAdminLoggedOn or IsPowerUserLoggedOn); Parameters: "create Example start= delayed-auto binPath= ""{app}\Example.exe"""; Flags: runhidden
This line works in all Windows besides Windows XP for some reason.
Am I doing anything wrong?
If you had tried your command on Windows XP command line, you would clearly see why it fails:
C:\>C:\WINDOWS\system32\sc.exe create Example start= delayed-auto binPath="C:\WINDOWS\system32\notepad.exe"
invalid start= field
...
Your start=
parameter is invalid. You have to use one of the valid values:
start= <boot|system|auto|demand|disabled>
The delayed-auto
is supported since Windows Vista and newer only. You have to use a different start option on Windows XP.
If you want to use delayed-auto
on Windows Vista and newer and another option on Windows XP, see How to install a service with the delayed-auto startup type in Windows XP.