Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


MrAlan

98 posts

Master Geek


#29040 20-Dec-2008 12:10
Send private message

I have recently updated one of my machines to Vista. I have a batch file which I need to run that uses the SC command but whenever I run it I get an Access Denied message.

The user I am logged in as is part of the Administrators group and has the necessary rights assigned to the services registry keys and if I open the services MMC snap-in and manual stop/start the service I have no problems. The access denied message only occurs when trying to stop/start a service from the command line using SC.

I have a feeling it has something to do with the Vista security thing that keeps prompting me to verify I'm an Administrator even when logged in as a user of the Administrators group and it not working in with command line functions or something. Strangely If I log in as the administrator and run the sc command then it works.


***edit: SOLVED***
It appears I was correct in thinking that the 'Administrator Approval Mode' was interfering with the ability to control services from the command line. For anyone else that is having the problem or that just wants to disable the constant prompting of Windows Vista confirming your status as an administrator you can turn it off by doing the following:
  --> Open Control Panel
  --> Open Administrative Tools
  --> Open the Local Security Policy
  --> Expand the Local Policies key
  --> Select Security Options
  --> Scroll to the bottom and find and disable 'User Account Control: Run All Administrators in Admin Approval Mode'

Create new topic
freitasm
BDFL - Memuneh
80653 posts

Uber Geek
+1 received by user: 41045

Administrator
ID Verified
Trusted
Geekzone
Lifetime subscriber

#185294 20-Dec-2008 12:36
Send private message

Have you tried right-click and Run As...?




Referral links: Quic Broadband (free setup code: R587125ERQ6VE) | Samsung | AliExpress | Wise | Sharesies 

 

Support Geekzone by subscribing (browse ads-free), or making a one-off or recurring donation through PressPatron.

 




freitasm
BDFL - Memuneh
80653 posts

Uber Geek
+1 received by user: 41045

Administrator
ID Verified
Trusted
Geekzone
Lifetime subscriber

  #185295 20-Dec-2008 12:36
Send private message

Ooops, sorry, only saw the update later...




Referral links: Quic Broadband (free setup code: R587125ERQ6VE) | Samsung | AliExpress | Wise | Sharesies 

 

Support Geekzone by subscribing (browse ads-free), or making a one-off or recurring donation through PressPatron.

 


Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.