none
How to disable UAC

    Question

  •  

    It's not that difficult to disable UAC if you read this blog. However, is there a way to do it in PowerShell or in scripts? I can't find a command that detects if UAC is enabled or disables UAC. Do you know how to do this at the command prompt?
    Thursday, February 07, 2008 8:37 PM

Answers

  • The best way is to change the registry key at registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system; key = EnableLUA

    You can use the following powershell code to check the value:
    Code Snippet

    $UAC = Get-ItemProperty -Path registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system -Name EnableLUA
    $UAC.EnableLUA


    To change the value and disable UAC:
    Code Snippet

    Set-ItemProperty -Path registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system -Name EnableLUA -Value 0


    You need to reboot to make it take effect.
    Tuesday, February 12, 2008 8:52 PM

All replies

  • You can use runas

     

    Friday, February 08, 2008 4:47 PM
  • The best way is to change the registry key at registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system; key = EnableLUA

    You can use the following powershell code to check the value:
    Code Snippet

    $UAC = Get-ItemProperty -Path registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system -Name EnableLUA
    $UAC.EnableLUA


    To change the value and disable UAC:
    Code Snippet

    Set-ItemProperty -Path registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system -Name EnableLUA -Value 0


    You need to reboot to make it take effect.
    Tuesday, February 12, 2008 8:52 PM
  • I'm not sure I'd agree this is the best way (this way requires a reboot), but If you have found the answer you are looking for, please mark the post as answered.

     

    Wednesday, February 13, 2008 5:07 AM
  •  

    There is no way to disable UAC without a logoff. UAC affects how your token is built at logon. Therefore you need to create a new token to get a full administrative token, and that requires a logoff-logon process.

     

    Instead of arguing about not disabling UAC, might I suggest the untied string bikini mode instead?

    http://msmvps.com/blogs/bradley/archive/2008/02/08/keep-your-bikini-on.aspx

     

    It's not quite like running naked. It's close, but not quite.

    Friday, February 15, 2008 5:38 AM
  • Hello,

     

    I am using the Vista Home Premium and when I check the key on my computer, it’s already set to zero! That didn’t work.

     

    Turning it off using the preferences is no good either because that balloon keeps popping up telling me to check my security settings.

     

     

    Thanks,

     

    Saturday, April 05, 2008 2:35 AM
  • I think you are in the wrong forum. This is a Server 2008 forum.

     

    What are you trying to do, and what is not working? You may want to take it to the Vista forum: http://windowshelp.microsoft.com/communities/newsgroups/en-us/default.mspx?dg=microsoft.public.windows.vista.security.  

    Saturday, April 05, 2008 6:01 AM
  • how do I have the output show

     

    $objComputer.name is running $strOperatingSystem?

    Wednesday, March 31, 2010 9:32 PM
  • I think this is what you guys are looking for. This will disable UAC without a shutdown i think. correct me if i am wrong.

    reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoPlayHandlers\CancelAutoplay\CLSID" /v (Default) /t REG_SZ /d 0xFF /f

    Sunday, May 08, 2016 3:39 AM