wklw2005 Posted February 15, 2012 Posted February 15, 2012 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
Developers Jos Posted February 15, 2012 Developers Posted February 15, 2012 (edited) Shouldn't that be: RegWrite("" & GUICtrlRead($Input1) & 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem','ConsentPromptBehaviorAdmin','REG_DWORD','0') Edited February 15, 2012 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
wklw2005 Posted February 15, 2012 Author Posted February 15, 2012 Doh, that looks better... Thank you very much! have a great week! On 2/15/2012 at 9:35 PM, 'Jos said: Shouldn't that be: RegWrite("" & GUICtrlRead($Input1) & 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem','ConsentPromptBehaviorAdmin','REG_DWORD','0')
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now