Service Installer Topics
Service Installer Syntax and Examples
instsrv ServiceName PathToExecuteable [-a AccountName] [-p AccountPassword] [ServiceName Remove]
Where:
- ServiceName
- is the name you want to assign to the service. This name will appear in listings such as those in the Services feature in Control Panel or in NetSvc/WinNetSvc.
- PathToExecuteable
- is the fully qualified path, including a drive letter, of the executable file for the service. The drive must be fixed and local.
- ServiceName Remove
- specifies the service you want to remove
- -a AccountName
- specifies the account the service will run under
- -p AccountPassword
- specifies the password for the account the service will run under
Examples
- To install the service Srvany.exe as a service called MyService:
instsrv MyService "PathToExecuteable\srvany.exe"
Note
By default, services are not "started" when they are installed. After using instsrv, some services also require that a registry entry be imported before they will run.
- To install the service Srvany.exe as a service called MyService and have it run as a specific user:
instsrv MyService "PathToExecuteable\srvany.exe -a MYDOMAIN\auser -p My1Password"
- To uninstall the service MyService:
instsrv MyService Remove
Note
Services must be stopped before removing them.