Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am attempting to disable UAC via a batch file with a REGEDIT command, and everything works - but, I need to be able to do this without clicking. When I run the:

REGEDIT /S somefile.reg

It works fine, except requires and initial click to allow this command. Is there any way around this? I am (temporarily) disabling UAC with the registry edit, but until then it is enabled. Thank you.

share|improve this question
    
Well, first you need to disable UAC, and then you can... –  womble Jul 19 '11 at 20:43
    
@womble - that is what the registry edit is doing, but until the registry edit runs, UAC is on - I am looking for a way around that. –  naspinski Jul 19 '11 at 20:56
3  
Apparently it's too early in the morning for sarcasm. –  womble Jul 19 '11 at 20:58
    
It rather involves being on the other side of the airtight hatchway... –  Evan Anderson Jul 19 '11 at 21:34

1 Answer 1

up vote 4 down vote accepted

Chicken and egg, eh?

Seriously, though, what you're trying to do isn't "supposed" to be possible because UAC (though disclaimed by Microsoft as not being a formal security boundary) is a security boundary of sorts.

In a domain environment you should be controlling User Account Control from Group Policy (the "User Account Control: Run all administrators in Admin Approval Mode" setting under "Security Settings\Local Policies\Security Options" in the computer section of Group Policy is what you're probably looking for).

If you're in a non-domain environment then you'll need to run the script in an already-elevated context. As @womble says in his comment you'll need to bypass UAC in order to disable UAC without invoking UAC. A computer startup script would be one place that you could run this. To install it as a startup script, though, you'll have to be elevated. You're back to the chicken and egg, then.

share|improve this answer
    
It looks like UAC is doing exactly what it was designed to... damnit :P –  naspinski Jul 20 '11 at 20:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.