From: "aaa" <
[email protected]>
| Is there a way to install a Windows service from the command prompt and at
| the same time set the "Startup type" to automatic?
You would need the Resource Kit utility; INSTSRV.EXE
And run it such as; instsrv MyServiceName MyServiceEXE_path
Then you can use the SC command such as...
sc config MyServiceName start= auto
You would have to read the instructions on how to properly use the INSTSRV.EXE utility.
I used this process to create a Seti@Home service to run the SETI Command Line version.
InstallSeti.BAT
----------------------
@echo off
copy ".\SaH\*.*" %windir% >nul
%windir%\instsrv MySeti %windir%\srvany.exe
regedit /s .\sah_servXP.reg
sc config MySeti start= auto
c:
cd %windir%
cmd
sah_servXP.reg
--------------------------------
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MySeti]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MySeti\Parameters]
"Application"="c:\\windows\\MySeti.exe"
"AppDirectory"="c:\\windows"