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.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Frank McCourryV.P. Holland Computers, Inc.Commented:
Start your command prompt with elevated permissions.  

Some services will not allow changes "On the Fly"
zman2013Author Commented:
Thanks Frank.
Can this be automated with in the batch line?
zman2013Author Commented:
still getting access denied when run as administrator.  Thanks.
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Frank McCourryV.P. Holland Computers, Inc.Commented:
The Windows Store Service is one of those services that cannot be changed from the command line or the GUI.  you can use the registry however,


Change the "Start" Key to one of these Values:

    0 = Boot
    1 = System
    2 = Automatic
    3 = Manual
    4 = Disabled

You will have to restart the system for this to take effect.

If you need to automate this, you can use Group Policy.  Read this:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
zman2013Author Commented:
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
Frank McCourryV.P. Holland Computers, Inc.Commented:
Glad I could help
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Legacy OS

From novice to tech pro — start learning today.