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.
zman2013Asked:
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"
0
zman2013Author Commented:
Thanks Frank.
Can this be automated with in the batch line?
0
zman2013Author Commented:
still getting access denied when run as administrator.  Thanks.
0
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,

HKLM\SYSTEM\CurrentControlSet\Services\WSService

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:http://technet.microsoft.com/en-us/library/bb727154.aspx
0

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
0
Frank McCourryV.P. Holland Computers, Inc.Commented:
Glad I could help
0
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.