Results 1 to 4 of 4

Thread: A simple code to Enable/Disable UAC in vista

  1. #1
    Join Date
    Mar 2009
    Posts
    599

    A simple code to Enable/Disable UAC in vista

    Hey guys!
    I have come across a lot of people who want to ignore security and disable UAC as they find it very irritating... So i have developed a simple batch program by combining the two different command line codes : one which diables UAC and second which enables the UAC by editing registry from command prompt.

    The following code disable the UAC by editing registry :

    Code:
    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
    pause
    exit
    And the following code re-enables the UAC :

    Code:
    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
    pause
    exit

  2. #2
    Join Date
    Mar 2009
    Posts
    599

    Re: A simple code to Enable/Disable UAC in vista

    All i have done is combined the above two commands and applied basics of branching operations of batch programming. It is very simple to understand, and to make it more simpler i've given above the code separately...

    Below is the complete batch program code. Just copy the code in notepad and save the notepad file with the ".bat" extension. While running it just don't double click it. Right-Click and then click on "Run as Administrator"

    Here is the code :

    Code:
    @ECHO OFF
    ECHO 1 - Disable UAC
    ECHO 2 - Enable UAC
    ECHO 3 - Quit
    ECHO Enter Choice.
    SET /P variable=
    
    IF %variable%==3 exit
    
    IF %variable%==2 GOTO dis
    
    IF %variable%==1 GOTO en
    
    
    :en
    
    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
    pause
    exit
    
    :dis
    
    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
    pause
    exit

  3. #3
    Join Date
    Jan 2009
    Posts
    69

    Re: A simple code to Enable/Disable UAC in vista

    great work. I just wonder if you can provide UAC code for windows xp operating system.

  4. #4
    Join Date
    Mar 2009
    Posts
    599

    Re: A simple code to Enable/Disable UAC in vista

    Hey!
    There is no UAC in windows according to my knowlegde but still you can run the same code in windows XP too... It just says operation completed successfully but i don't know what it does...!

    All the best...!

Similar Threads

  1. Enable or disable Aero with a simple double-click
    By TheGreatOne in forum Tips & Tweaks
    Replies: 2
    Last Post: 05-02-2010, 08:07 PM
  2. Enable / Disable Flip3D in Vista
    By Jacks in forum Tips & Tweaks
    Replies: 1
    Last Post: 02-01-2009, 09:57 AM
  3. Unable to Enable / Disable Windows features in Vista
    By Jacob.d in forum Operating Systems
    Replies: 5
    Last Post: 24-11-2008, 08:05 PM
  4. Disable / Enable the firewall in Vista
    By Erskine in forum Tips & Tweaks
    Replies: 1
    Last Post: 12-11-2008, 07:26 PM
  5. Enable or Disable UAC From the Windows Vista
    By Reegan in forum Tips & Tweaks
    Replies: 5
    Last Post: 15-10-2008, 07:22 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,021,122.02882 seconds with 16 queries