Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 18-03-2009
Member
 
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
Reply With Quote
  #2  
Old 18-03-2009
Member
 
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
Reply With Quote
  #3  
Old 18-03-2009
Member
 
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.
Reply With Quote
  #4  
Old 18-03-2009
Member
 
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...!
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


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


All times are GMT +5.5. The time now is 07:39 PM.