Jump to content

Search the Community

Showing results for tags 'admin account'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. A little something from me that will maybe help someone #RequireAdmin #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile=Admin Unlocker.exe #AutoIt3Wrapper_Res_Fileversion=1.0.0.0 #AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.8.0 Author: Chimaera Requirements: Windows 7 Script Function: Enable / Disable Hidden Admin Acc Credits: guinness, Rover, spudw2k #ce ---------------------------------------------------------------------------- #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> ; ------------------------------------------------------------------------------ Global $GetName = _GetLocalAdmin() ; ------------------------------------------------------------------------------ Local $GUI_Start = GUICreate("Admin Account", 200, 120, -1, -1, BitXOR($GUI_SS_DEFAULT_GUI, $WS_MINIMIZEBOX)) ; non resize gui Local $ButtonEnable = GUICtrlCreateButton("Enable Hidden Admin Acc", 10, 20, 180, 35) GUICtrlSetFont(-1, 10, "", "", "Tahoma") Local $ButtonDisable = GUICtrlCreateButton("Disable Hidden Admin Acc", 10, 64, 180, 35) GUICtrlSetFont(-1, 10, "", "", "Tahoma") Local $sAdminTest = _IsAdminEnabled() If $sAdminTest = True Then GUICtrlSetState($ButtonEnable, $GUI_DISABLE) If $sAdminTest = False Then GUICtrlSetState($ButtonDisable, $GUI_DISABLE) GUISetState() While 1 Local $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $ButtonEnable _EnableAdminAcc() Case $ButtonDisable _DisableAdminAcc() EndSwitch WEnd Func _EnableAdminAcc() If _IsAdminEnabled() = False Then Run(@ComSpec & ' /c ' & 'net user ' & $GetName & ' /active:yes', "", @SW_HIDE) ; enables the hidden account SplashTextOn("Working", "Hidden Admin Account Enabled", 300, 50) Sleep(2000) SplashOff() Else SplashTextOn("Warning", "Admin Account Is Already Enabled", 300, 50) Sleep(2000) SplashOff() EndIf EndFunc ;==>_EnableAdminAcc Func _DisableAdminAcc() If _IsAdminEnabled() = True Then Run(@ComSpec & ' /c ' & 'net user ' & $GetName & ' /active:no', "", @SW_HIDE) ; disables the hidden account SplashTextOn("Working", "Hidden Admin Account Disabled", 300, 50) Sleep(2000) SplashOff() Else SplashTextOn("Warning", "Admin Account Is Already Disabled", 300, 50) Sleep(2000) SplashOff() EndIf EndFunc ;==>_DisableAdminAcc Func _IsAdminEnabled() ; By Rover, guinness & spudw2k ; checks if the hidden account is enabled Local $oWMIService = ObjGet('winmgmts:\\localhost\root\CIMV2') Local $oColItems = $oWMIService.ExecQuery('Select Disabled From Win32_UserAccount Where LocalAccount = True AND SID Like "%-500"', "WQL", 0x30) If IsObj($oColItems) Then For $oItem In $oColItems Return $oItem.Disabled = False Next EndIf Return True EndFunc ;==>_IsAdminEnabled Func _GetLocalAdmin() ; Credits to spudw2k Checks for correct name of local account Local $admin Local $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\" & @ComputerName & "\root\cimv2") Local $colItems = $objWMIService.ExecQuery("SELECT Name from Win32_UserAccount WHERE LocalAccount = True AND SID like '%-500'") For $acct In $colItems $admin = $acct.Name Next $objWMIService = 0 $colItems = 0 Return $admin EndFunc Have Fun
×
×
  • Create New...