Sign in to follow this  
Followers 0
wklw2005

Remote UAC Control

3 posts in this topic

I am trying to create a tool to remotely disable the UAC on windows 7 machines. I found the reg key to disable it. I can't seem to get it to work. something is wrong with the command. Can some please help out?

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Users\Username\Documents\UAC Control.kxf
$UACControl = GUICreate("Remote UAC Control", 317, 144, 196, 124)
$Input1 = GUICtrlCreateInput("", 24, 16, 265, 21)
$Disable = GUICtrlCreateButton("Disable", 24, 48, 121, 57, $WS_GROUP)
$Enable = GUICtrlCreateButton("Enable", 169, 49, 121, 57, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
    While 1
        $msg = GUIGetMsg()
        Select
            Case $msg = $GUI_EVENT_CLOSE
                Exit
            Case $Disable
  RegWrite("\\" & GUICtrlRead($Input1) & "('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System','ConsentPromptBehaviorAdmin','REG_DWORD','0')")
      EndSelect
    WEnd

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Shouldn't that be:

RegWrite("" & GUICtrlRead($Input1) & 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem','ConsentPromptBehaviorAdmin','REG_DWORD','0')
Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Doh, that looks better... Thank you very much! have a great week!

Shouldn't that be:

RegWrite("" & GUICtrlRead($Input1) & 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem','ConsentPromptBehaviorAdmin','REG_DWORD','0')

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0