How-To Geek

Enable or Disable UAC From the Windows Command Line

If you’ve used Windows Vista for more than 3.7 minutes, you know what UAC (User Account Control) is.. it’s the obnoxious, nagging popup window that will be your life for the next 3-5 years unless you switch back to XP in frustration, or to a better OS like… OS X, Suse, Ubuntu, or even XP.

Update: This should also work on Windows 7, 8, 8.1, and probably 8.2. It’ll also work on Windows 10.

Note: Disabling UAC will lead to a less secure system, so be warned.

Windows needs your permission to annoy the crap out of you:

There’s a quick way you can enable or disable this annoying window from the command line:

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

After you enable or disable UAC, you will have to reboot your computer for the changes to take effect.

You can also enable or disable this from the Control Panel if you choose.

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.

  • Published 12/26/13

Comments (64)

  1. Frank

    Thanks for the tip. However, it would probably be easier if you posted some screenshots using regedit instead.

  2. The Geek


    I agree, and I’ve posted another easier to use tutorial. You should see it in the related how-tos list.

  3. gerwen

    Fantastic tip! Command line control of my Vista box via SSH is a reality now.

    Thanks a bunch.

  4. Aaron

    If you are a computer administrator, and you still want to keep UAC for standard users, there’s an easy way to turn it off for administrators only. Just open Local Security Policy from Administrative Tools in the Control Panel. Then go to Local Policies > Security Options. Scroll all the way down and find where it says something like: USER ACCOUNT CONTROL: Behavior of elevation prompt for administrtors in Admin. Approval Mode;
    Just double-click it and then click the drop down list and change it to “elevate without prompting.”
    UAC should no longer annoy administrators. ^_^

  5. trankil

    when i try this it’s prompt “access refuse”

    do you know why

  6. Tesha

    I am having a problems with “Windows needs your permission to continue” box. For some reason it won’t allow me to click OK. The OK button isn’t highlighted. It will only allow me to press Cancel. I think it has something to do with being an administrator. I don’t think my computer has an adminstrator account. I only have standard accounts. Everytime I try to change the User accounts or try to create a new user account as the administrator the “Windows needs your permission to continue” box comes up but I cannot press OK so I cannot create an administrator account. Does anyone know what I am talking about or can someone help me with this?

  7. k henderson

    Whenever SP1 comes out for Vista, MS will have to fix this UAC mess. its utterly useless for corporate LANSs and annoying to home users.

  8. Doug

    Sure, I get my unwanted share of the “Windows needs your permission to continue” pop-up, but my undoing will be the “an unidentified program wants to access your computer”. I’ve tried all three options for turning off UAC that I’ve found around here. The command line approach simply results in “error: access denied”. I don’t show “Local Security Policy” from Administrative Tools in the Control Panel. And when I open up Control Panel, and type in “user account” into the search box, I don’t get the “turn user account control (UAC) on or off” option in my list.

    I have Vista Home Premium, and I’m an administrator. I suppose the rest of you geeks are using some fancy “pro” version of Vista, huh? Lucky bastards! (ha!)

    I decompress files using WinRAR about 30 times a day, and I have to wait through all the screen-dancing and then click “allow” every single time — perhaps one of the stupidest things I’ve seen yet from the helpful, caring folks at MS. I agree with a lot of the opinions that I’ve seen posted here in geek-ville, with most folks sayin’ that UAC is generally a good thing, even if it is a bit cumbersome and bothersome at times. Perhaps a well-intentioned screwup.

    What I’M looking for is a way that I can turn UAC on and off at will, even though it seems I’ll have to reboot — at least with the cmd line method — if it ever works for me. I’ll run all my “bad, bad” programs for about 15 glorious minutes, and then I’ll turn it back on. Sounds simple, but I haven’t been able to do it. Two shortcuts, one for ON and one for OFF would be delightful. Any ideas? Can anyone help the poor “home user”? (Geez, if I can’t do this stuff with home premium, I can’t imagine what home basic is like!)

    Thanks to all!

  9. Vh

    My issue is slightly different and I was hoping one of you had an idea on how to go about fixing it. I’m running Vista and am trying to get access to my files from my old PC, I’ve connected the drive to one of the free ata ports and it seems to be functioning just fine except that Vista keeps telling me that I don’t have access to about 90% of the files held on it. I attempt to take ownership of the files and directories but this doesn’t seem to have any effect. I’d really like to copy my files over and format the old drive so I can get a clean start, but I’m stuck. : /

  10. Carolina

    I tried to disable UAC from thw Windows Vista, but it did not work. When I typed the command line, it said “Access Denied”. I guess it is because I am not tagged as the Administrator of the computer. But I do not know why I am not the Admin.. I just bought my PC three days ago, and when I turned it on for the first time, it only asked me my User Account Name and a Password, it never gave me the opportunity to choose from being an Administrator o the other type of account. So, I do not know how to change my account to be an Administrator type. Can you help me?

    PS: Sorry I did not left this question in the forum. I do not desire to have an account in this page.



    this uac thingy has been doing my head in!
    ive had vista (ultimate) installed for about 27 days now, and i have to say im quite suprised. i like it!
    while it has (alot) of downfalls i can see where MS have improved it alot!

    anyway i used the editing the Local Security thing, and its all working fine after a little tweak, i just started looking up how to tweak it up today so im hoping i can get it all running faster and that :D


  12. ssjtrunks

    Well I have noticed some of you can not disable the UAC in Vista…….it is in the “Control Panel” then under
    your “User Accounts” then select your profile(assuming your have are administrator) Now st the bottom of the BODY of the window you should see “Turn User Account Control on or off” once there, uncheck “User Account Control (UAC) to help protect your computer” once unchecked click “Ok” once done you should be prompted
    to restart. To turn back on do same process!

  13. Leon

    Same problem as a lot of people who have Windows Vista Home Premium. There is no access to local security policy. Has anyone got a hack to force local security policies? I cannot see my workgroup – I have a Linux server running Samba, which all of my Windows XP Home PCs see perfectly, but this damn Vista refuses to see it. I have tried everything I’ve found on the internet. I have tried the registry hack of changing lsa to ‘1’, but still no help.

  14. Doug

    Thanks to ssjtrunks!
    Your procedure worked perfectly for me using Vista Home premium. The other three procedures found here (see my initial post) did not work, and, of course, Windows “Help” was no help. Anyway, now I can turn off UAC and eliminate all the pop-ups and delays and blinking screens while I run a large batch of WinRAR decompressions, among other things, and then turn it back on. Of course, we have to re-boot after each change to the UAC, but hey…
    Thank you – Thank you – Thank you – Thank you – Thank you!!!
    Doug :)

  15. Bob

    There is no local security policy in windows vist home premium for me, it is not listed under the mmc when i go to add the snap-in. Also, there is no administrative tools either WTF??? I can see vista is going to be fun to work with. What is the deal anyone know of this problem?

  16. PCUser

    Hello fellow PC users, to make it simple just follow these steps for vista home and premium UAC…
    Control panel–>user accounts and family safety–>user accounts–>Turn User Account Control on or off
    That should take you right there…
    I have a totally different question… I’m a rookie when it comes to the command line… I would like to learn as much commands and syntax as I can.. does anyone know any cool things I can do with it.. Any useful commands? Email me @

  17. None

    Leon, regarding Vista and Samba, it is a bug in Vista. Instead of access the samba server by name, use the IP address. \\{IP Address}\share_name.

  18. Matthew Bennett

    Has anyone had this problem with UAC, when I disable it, my windows defender automatically turns it back on. What the heck is that about? I reboot the computer after disabling UAC, then when windows comes back up it says it had to turn it back on so the functions of windows defender could stay afloat, or some jazz to that effect.


    i think when i did it it came up u just have to click allow…

    Okay i had it turned off for ages, but how can i also disable the annouying security alert which keeps tlling me i have it disabled?
    i always have the red shield and it pops up the ballon going OMG you like dont have UAC on! you might actually be able to use your computer as a administrator!!!

  20. Matt

    Okay, questions about this.
    With command line, you mean regedit right?
    Because I tried with the command prompt and it did absolutely nothing. So, yeah

  21. Mike

    A Quick Widget To Turn on And OFF UAC is in development of core u still have to do a soft reboot

  22. Vijay

    Try the command: LEACfg setpromptpolicy admin 0
    this doesn’t need restart.


    This is not applicable to Vista Premium!

  24. DeeZ

    Windows defenders must be disabled from starting up on start up to fix this click on start and then in the seRCH BOX TYPE IN MSCONFIG. Click on the start up tab and uncheck windows defender. This will prevent it from loading at start up, you must also verify that you disabled it from its own program interface…Start>all programs>windows defender>tools > options then scroll down and unselect The 2nd to last box and apply and or ok

  25. chih

    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

    When I type in the exact command, I get a denied access message. It won’t let me get pass. Do I type the exact phrase C:… in the RUN BOX or what part in the Command Prompt window? Thank you all for your help!

  26. george

    can anyone told me why after i desable uac i still get windows saying that i need permission to download kewlbuttonx.ox file and what i should do to downlaod and register that file to my system? i got a home basic vista i`msorry but i din`t have time to register at the forum hope someone can answer me
    tank you

  27. Matt

    Easy way to get this to work:

    Click the Windows Orb (Start Button),
    In the search box type CMD
    Directly above the search box CMD.exe will appear in the Program List.
    Right click on CMD.exe and select Run as Administrator.

    Follow the proceedure in this article.

  28. PcMedix



    @echo off&setlocal&color 1f&MODE CON: COLS=75 LINES=20
    title [Remove or Enable Nag Vista ]
    REM Created By PcMedix 11/12/08

    echo [ **** WARNING * WARNING * WARNING * WARNING * WARNING **** ]
    echo [[[ Windows Vista Only ]]]
    echo Turn off Nag User Account Control Press: 1 Enable 2 Disable…
    echo ___________________________________________________________________________
    set _on_off=
    set /p _on_off=Please Enter [1] or [2] Choice Now:
    if [%_on_off%] == [1] goto One
    if [%_on_off%] == [2] goto Two
    if [%_on_off%] == [] goto _Menu

    Color 0c&cls&echo.&title [ Disable User Account Control Vista ]
    echo Vista User Account Control Now Turning Off..
    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
    echo DONE
    echo We Have To Reboot to Save Settings…
    echo Please Save all open Work Press Any key to Reboot Now..
    pause>nul&shutdown.exe -f -r -t 0&endlocal&exit

    color 0c&cls&echo.&title [ Enable User Account Control Vista ]
    echo Vista User Account Control Now Turning On..
    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>nul
    echo DONE
    echo We Have To Reboot to Save Settings…
    echo Please Save all open Work Press Any key to Reboot Now..
    pause>nul&shutdown.exe -f -r -t 0&endlocal&exit

    &echo hit any key to exit…&PAUSE>nul&cls&ENDLOCAL&EXIT

  29. Brian

    When I was shutting down my computer (Vista Home Premium) an icon popped up that said install updates and shut down. I did so and when I came back to start it later, I got an error message that said “unable to load your profile” and a completely different desktop with icons and files missing appeared. It will not let me run diagnostics, connect to the internet or much of anything else. Please Help!!!

  30. mike

    Brian i have see may pc do this most likly windows faild to install or was interrupted during the install fix this use windows go back i.e system restore or go and remove recent updates by going to ur control panal

    good luck happy pcing

  31. Yoyoyoyo

    the easiest way, i dunno if it has been mentioned before is:

    go to Control Panel -> User accounts -> Turn User Account Control On or Off

    then simply Untick the box .

    cheers. (:

  32. EvanL

    I’ve got Windows VISTA Home Premium on an HP laptop. Recently, it has been asking me to type in an administrator password to make ANY changes to the system. There is no administrative user, and no administrative password. Moreover, the permission message leaves no place tpo type any password anyway, and the “OK” button is always grayed out. Therefore the only option is “cancel” which terminates any attempt to make any changes.

    It does not matter whether I attempt to change the user account control settings through the command prompt or through the Windows control panel utilities, or otherwise. I think I have tried everything.

    My Norton 2008 finds no problem with my hard disk, and I can still use the programs already installed, as long as I do not try to make any changes in anything.

    Windows techs and the user blog have offered a number of suggestions about changing settings that have not worked. The system simply will not let me make the necessary changes.

    I’m open to any other suggestions, including how to take VISTA off this computer and install XP.

    I think Microsoft should truly be ashamed about imposing a travesty like VISTA on its customers.

    Evan Lewis

  33. Matt

    Yeah… Umm, I tried to disable the UAC from cmd.exe on my standard account but it said ERROR: ACCESS IS DENIED. Can anyone help?

  34. ZQu

    Same happened to me, cud anyone help?

  35. Ramesh K

    Geting “ERROR: ACCESS IS DENIED”. Can anyone help?

  36. Ross

    I don’t know what has happened, or how to fix it. I hadn’t gotten round to disabling UAC and this happens.

    Whenever I try to do anything which normally causes UAC to pop up, the screen will dim as it normally does and that’s it. No pop up, just a dimmed screen which I can’t interact with. I have to Crtl+Alt+Dlt and when I go back it’s gone. I never get to allow anything. This only started today, and I’m using Windows Vista Home Premium. Pretty sure I’m an admin, and I have guest account toggled on.

    Any method for turned off UAC needs UAC which I can’t do.

    Send me an e-mail if you know a way.

  37. jeff


    I had the same problem, but it went away after restarting my pc.

  38. Marrrky_

    its simple go >control panel >user account and family safety>user accounts>turn user account control on or off> press continue, and if you want to enable it make sure the tick is in place, if you want to disable it untick it and press OK THERE :)


  39. Mary Curry


    Can anyone help me with my problem. I’ve got vista and ie8 running on my laptop. I can’t download and save any files it just disappears in thin air. No where to be found on my laptap, it just happened. Please help me this laptop is my work tool……i’m going crazy,,,

  40. Jonathan Garcia

    hey i did what you said but it says: To continue type and administrators password, and then click OK. but there is no box to type in and the OK button is blank, so i cant click it… what do i do?

  41. sugan

    we are having our own software build on power builder with the back end of
    sybase adaptiveserver anywhere. If i open a exe, ASA will be automatically
    created in ODBC. But now in Windows 7 i can not create DSN manually as well as automatically. Kindly help me in this issue

  42. u64

    To fix ALL Vista/7 problems just install nLite Tweaked XP or Linux.

    Tell me, honestly. Cos i’m curious. What specifically do you
    need done that require more then 3G RAM 64bit-Vista/W2008/Win7 ?
    Educate me :P

  43. Birry

    Hey if u guys get an error message when trying to disable UAC it is because your not giving it administrative rights. You can fix this by creating a shortcut on your desktop by right click > create > shortcut then insert command line 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. When finished right click the short cut and run as administrator.

    Hope it helps

  44. Djlatino

    Thanks Birry :D I was like”So do i put this in command prompt or what?” lol thanks again :)

  45. Nick

    I don’t think this will work since the area of registry you are trying to edit is also protect and you will get access denied error..

  46. howard

    BIRRY is the man! thanks!

  47. Rizwan

    this registry key change command from cmd doesnt work, it does change the registry value, and after restart, UAC status is unchanged. help…….

  48. Harry

    Thanks for the info on how to disable UAC.

    I searched the regestry for ‘EnableLUA’ and changed its value to 0, I am a very bad typest.

  49. Azar

    Hey can any one help me to know ..” How to disable or bypass the UAC prompt for particular application using some command”….

  50. Ryan K.

    Man, nobody is answering anyone’s questions here. Why should I post my question/problem if no one will help me?

  51. Lu

    Hey, same questions since 2007 and not a sound answer! what a waste of time.

  52. Bruce

    I know this is old but I stumbled across it. So for others that stumble here as well — realize there are two pre-requisites not detailed in the tip.

    1 – You have to actually be an administrator (e.g. belong to the local Administrator group)
    2 – You have to elevate your rights to your administrative token

    (Of course, if UAC is already disabled and you’re re-enabling, you can simply run the command in the tip since there’s no elevation required at that point – you already are running everything with administrative rights. But you wouldn’t have read this far because the tip would have worked :-)

    So to disable UAC from the CLI:

    1. Click on Start > All Programs > Accessories (or type “Command Prompt” in the Start > Search box)
    2. Right-click Command Prompt
    3. Select “Run as administrator”
    4. Enter the registry command from the tip to update the registry key:
    reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f

    If you want to verify the command before, after, or both, then you can query the registry key like this:
    reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA

    0 = disabled
    1 = enabled

    NOTE1: If you aren’t an administrator, you cannot run the commands in the tip as they edit a restricted area of the registry. Therefore, you must elevate your privileges first (provided you belong to the Administrators group).

    NOTE2: If you get “Access Denied”, either you didn’t elevate your privileges in steps 1-3, or you aren’t an administrator.

    NOTE3: Depending on the version of reg.exe that you have, you may be able to perform an UPDATE rather then an ADD. To disable UAC using the update switch, the command would be:
    reg update HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA=0

    The query would also be different:
    reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA

    Hope that helps someone now or later!
    – Bruce

  53. Basti

    Was für ein trauriger Beitrag und wieder einmal ein perfektes Beispiel für die Leute, die nicht kapieren, warum Microsoft solche Sicherheitsmaßnahmen einführt und dass diese bei ein wenig nachdenken auch sehr Sinnvoll sind, auch wenn man dadurch einen kleinen Mehraufwand hat.
    Da der Großteil der Anwender von solchen Betriebssystemen halt komplett unwissend ist, welcher Gefahr er sich teilweise im Internet aussetzt, ist es ganz gut, dass das Betriebssystem versucht, ihm einen Teil davon zu erleichtern und es Viren/Würmern/Trojanern erheblich schwerer macht den Computer zu befallen.
    Aber leider nützt das alles nichts um einen Anwender vor einen Betrag auf einer Geek-Seite und ich wetter bestimmt, dass deshalb jeder Unwissende jetzt die UAC ausgeschaltet hat und sich damit wieder um längen zurückkatapultiert…

  54. teena

    how to disable UAC without restart the computer?

  55. kencat07

    Hi i cant download or remove UCA because its keep popuping out of this Admin. Please help me someone to stop this oh and the Admin as well thx if you now

  56. nomi

    this is totally waste of time blog

  57. nomi


  58. obvious

    Access Denied is because you are not running the command prompt as Administrator. Right click and choose run as… obvious…

  59. not really

    Obviously, not really the only reason, group membership plays a role too, but you obviously knew that as well, but you obviously left it out. obvious…

  60. Eno

    Hi everyone,
    In my company, all computers are running windows 7. some users are standard user while others are administrator. some of the standard users are having trouble opening any .RAR file. When ever they try to open any .RAR file, the user account control comes up requesting for administrator permission. I noticed that this is happening to some of the standard users and not all. I have compared the security settings on the computers for WinRAR and everything seems to be ok, but i don;t know why it is prompting them for admin right before they can open any rar file.

    I need to allow the users to open WinRAR files freely. They calls me to give admin right each time they try to open any .rar file and this is really annoying.

    please help anyone, IT IS VERY URGENT.

    Thank you in advance.

  61. M0mma

    Fastest way,copy these into notepad,and save as uac_off.reg / uac_on.reg,as usual..
    requires a reboot,but the fastest way to do it..
    just import the one you want into your windows registry (as an admin,double-click the file..)
    and reboot the machine.

    UAC OFF:

    Windows Registry Editor Version 5.00


    UAC ON:

    Windows Registry Editor Version 5.00


  62. Super Flo

    its not UAC off your Windows 7.

  63. hik3

    Thanks a lot! I added this to first login script, UAC is bullshit like Vista.

  64. vapypr

    I’m trying to write a simple batch file using the command that will then reboot or shutdown the PC. Unfortunately it seems I cannot get it recognize subsequent commands until either the cmd window is shutdown. Typing ‘exit’ will finish the commands, but you never see the shutdown command, it just happens. Clicking the X will populate the line but doesn’t finish the command. Any ideas?

More Articles You Might Like

Enter Your Email Here to Get Access for Free:

Go check your email!