Enterprise Software

How do I enable or disable UAC from a batch file?

I go through phases on my Windows Vista machine where I am ok with using UAC and other times where I just want it to go away for awhile. I compare it to staring at a computer screen for hours. It is nice to take a break and get a hot cup of coffee or grab a Tall mocha from Starbucks. Here is how you accomplish the tasks.

I go through phases on my Windows Vista machine where I am OK with using UAC and other times where I just want it to go away for a while. I compare it to staring at a computer screen for hours. It is nice to take a break and get a hot cup of coffee or grab a Tall mocha from Starbucks.

The command-line entries to enable and disable are the following:

  • 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
  • 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
I created the following two batch files available for download:

Follow these steps to enable or disable UAC. After downloading and extracting the two zip files, right-click on one of them and choose Run as Administrator. In this example I will enable UAC (Figure A).

Figure A. Enable UAC.

When you enable UAC, a reboot (Figure B) is required.

Figure B. Reboot your computer after enabling UAC.

Alternatively, you can accomplish the same task by typing User Accounts (Figure C) in the Instant Search field.

Figure C. Use Instant Search to enable UAC.

Next, select Turn User Account Control On or Off (Figure D) and then tick the checkbox to enable UAC.

Figure D. Turn UAC on or off from the UI.

Figure E. Use this checkbox to enable or disable UAC.

Editor's Picks

Free Newsletters, In your Inbox