Quantcast
Channel: Syed Jahanzaib – Personal Blog to Share Knowledge !
Viewing all articles
Browse latest Browse all 408

Start windows service under different user credentials

$
0
0

To start windows service under another user credentials , Use following

In Windows 2003:

IF the user belongs to local system

sc.exe config SERVICENAME obj= .\USERNAME password= 123456
net start “SERVICENAME”

OR

IF the user belongs to Domain

sc.exe config SERVICENAME obj= DOMAIN_NAME\syed.jahanzaib password= 123456
net start “SERVICENAME”

TIP: Make sure you add SPACE after each equal sign in command .

For example: obj= SERVICENAME

It was required for me to start SAP services, after configuring user account with password in services console, they remove password after every restart of system, therefore I made this batch file to execute on startup so they start automatically upon reboot.

Regard’s
Syed Jahanzaib


Filed under: Microsoft Related

Viewing all articles
Browse latest Browse all 408

Trending Articles