Link to home
Start Free TrialLog in
Avatar of zman2013
zman2013

asked on

WSService

I am writing a batch script to disable Windows server 2012 services.  The server WSSERVICE, sc config wsservice start= disabled, command is generating an error, "Access is Denied"  

How to fix this?     Thanks.
Avatar of Frank McCourry
Frank McCourry
Flag of United States of America image

Start your command prompt with elevated permissions.  

Some services will not allow changes "On the Fly"
Avatar of zman2013
zman2013

ASKER

Thanks Frank.
Can this be automated with in the batch line?
still getting access denied when run as administrator.  Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Frank McCourry
Frank McCourry
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Frank for the directions.  The following reg add command worked.

reg add “hklm\system\currentcontrolset\services\wsservice” /v start /t reg_dword /d /4 /f
Glad I could help