JSI Tip 8032. SERVACCT.EXE command-line freeware changes a service to start in a user account context.

Jerold Schulman

May 12, 2004

1 Min Read
ITPro Today logo in a gray background | ITPro Today


Download SERVACCT.ZIP and unzip it.

The SERVACCT.TXT file contains:

SERVACCT.EXE : Service Account Password Utility : by Steven Wettberg Usage:SERVACCT [\SERVER] [SERVICE] [DOMAINUSER] [PASSWORD] [DOMAIN] [/RESTART] [\SERVER] = UNC Path of the Server to configure[SERVICE] = Service to configure[DOMAINUSER] = User context for the service[PASSWORD] = Password for the above account[DOMAIN] = Windows NT domain of the target server[/RESTART] = Stops & restarts the target service SERVACCT changes the target service so that the service starts under the context of the userid & password specified on the command line. The programwill grant the specified userid the "Log on as a Service" right if it hasnot been previously granted. Note: SERVICE is NOT the display name, use the string that would be used if you were issuing a NET STOP command. The /Restart parameter may be used to stop and start the service after the change, this is an optional parameter.If the restart parameter is not used you must manually stop & start the serviceto actually use the new logon information. If the service is already stopped when this program is run the service will not be started, this is by design. Example: SERVACCT \SERVER Schedule MyDomainUserid Password MyDomain /Restart

NOTE: The SERVICE is the registry key at HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServices. If you open a CMD.EXE window and type net start, you can check the DisplayName Value Name at a key to verify you have identified the correct key.

JSI Example:

SERVACCT \JSI009 MyService JSIINCSVCAcct ThePassword JSIINC

Changed the startup information for the MyService service on \JSI009
Granted JSIINCSVCAcct the "Log on as a Service Right" on \JSI009



Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like