Batch file / command line disable UAC without restart?

Thresh

Desktop Engineer
Messages
656
Location
East Coast, US
I have a batch with a menu that performs a series of tasks for Win 7 machines and I'm looking for a command to disable the UAC that doesn't require a restart. The simple line I test this with is:

IF NOT EXIST "C:\Program Files\Utilities" mkdir "C:\Program Files\Utilities"

I get an Access is Denied error unless I enter the registry fixes and restart, or manually adjust the slider to never notify. I'd like to keep the batch as streamline as possible without making them first go "here and there". So far, I got the whole thing down and automated, and it's just come down to this being the problem. I've tried:

setlocal
set runlevel= highest

set __COMPAT_LAYER=RunAsInvoker

Neither have worked. There's GOT to be something out there...
 
Back
Top Bottom