jasonzhangx
Programmer
I have more than 50 machines (W2K) to install a user-defined service using:
INSTSRV.EXE
SVRANY.EXE
Is there a way to write a script to install the service automatically. Especially, I am interested in how to write the part to edit registry. The manual procedure is like:
Copy INSTSRV.EXE and SVRANY.EXE to %WINDIR%\system32
then goto start\run and type in this command
Instsrv xyz c:\winnt\system32\srvany.exe
This creates a service called xyz(you can name it anything)
Then goto regedit:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControllSet\Services\xyz
Create a key called Parameters
Open Parameters and create these three string values there:
AppDirectory "c:\xyz" (the path to your program dir)
Application "c:\xyz\xyz.exe" (the path to the app exe)
AppParameters "/???" (only if startup-parameters are needed)
INSTSRV.EXE
SVRANY.EXE
Is there a way to write a script to install the service automatically. Especially, I am interested in how to write the part to edit registry. The manual procedure is like:
Copy INSTSRV.EXE and SVRANY.EXE to %WINDIR%\system32
then goto start\run and type in this command
Instsrv xyz c:\winnt\system32\srvany.exe
This creates a service called xyz(you can name it anything)
Then goto regedit:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControllSet\Services\xyz
Create a key called Parameters
Open Parameters and create these three string values there:
AppDirectory "c:\xyz" (the path to your program dir)
Application "c:\xyz\xyz.exe" (the path to the app exe)
AppParameters "/???" (only if startup-parameters are needed)