Jump to content

UAC turn off


Recommended Posts

you copy/paste from MSDN blog without reading? that's awful. even one of the posts in the article you copied from mentioned the typo - yet the author did not fix it. read your line, man.

also, Win 8 UAC can not be fully disabled without crippling your Metro apps. there are many articles on this - most of them, like the one you copied from, are mistaken because they are not aware of this (written too early when Win 8 was just released).

for myself, i do not disable UAC on Win 8 (or Win 7 for that matter). this is a lost battle. i just plan my scripts to not tackle UAC in the first place.

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

If I need a script to have full admin rights, and to be rerun multiple times to complete a series of tasks, I set the "ConsentPromptBehaviorAdmin" value on first run of the script, and then have the script reset it when the script is finished.  As others have said, I would not fully disable UAC.  There are examples on the forum for working with UAC, depending on what you are trying to do.  

 

Adam

Link to comment
Share on other sites

I have not tried, but you possibly want to try it out first before code it

Got it from HowToGeek

Disable UAC

C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f

Enable UAC

C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f

 

retstart needed

Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.")
Link to comment
Share on other sites

 I set the "ConsentPromptBehaviorAdmin" value on first run of the script,

 

@Adam, but that first change will trigger the UAC anyway, no?

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

Yes, that is true.  It all depends on what you are trying to with your script.  If you want to disable UAC for admin only, you can set "ConsentPromptBehaviorAdmin" to 0, and admins will not be prompted, but non admins will.  

 

Adam

Link to comment
Share on other sites

 

The reason why people want to disable it – the reason that i want to disable it anyway – is that it drastically slows down installers and setup programs. I've personally had these things freeze up for several seconds, just waiting for UAC to show its dialogs.

 

Run your process as admin and create the installer processes from your process. Any child process will run with the same access and should not trigger UAC. I use several installers (MSI and other) in my scripts this way and it works fine, only the first UAC (the prompt to start my own script) ever fires.

Edited by 0xdefea7
Link to comment
Share on other sites

Run your process as admin and create the installer processes from your process. Any child process will run with the same access and should not trigger UAC. I use several installers (MSI and other) in my scripts this way and it works fine, only the first UAC (the prompt to start my own script) ever fires.

 

Thats how i run my installers etc

deal with it once and thats it (unless you close the tool ;) )

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...