Jump to content

Remote UAC Control


wklw2005
 Share

Recommended Posts

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
Link to comment
Share on other sites

  • Developers

Shouldn't that be:

RegWrite("" & GUICtrlRead($Input1) & 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem','ConsentPromptBehaviorAdmin','REG_DWORD','0')
Edited 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.
  :)

Link to comment
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')

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...