Jump to content

Checkbox always unchecked


Recommended Posts

Hey,

I have a small Script and it has some checkboxes.

When i click a button i want all checkboxes to be (de)selected, here is my code to do it:

Func Un_SelectAll()
For $i = 0 To UBound($Checkboxes) -1
    If IsChecked($Checkboxes[$i]) Then
        $select = False
        ExitLoop
    EndIf
Next
For $i = 0 To UBound($Checkboxes) -1
    If $select And Not IsChecked($Checkboxes[$i]) Then
        WriteToDebug("Checked " & $i & "!")
    ElseIf Not $select And IsChecked($Checkboxes[$i]) Then
        WriteToDebug("Unchecked " & $i & "!")
    EndIf
Next
Endfunc

Here is my Gui:

$ga1 = $Checkboxes[0] = GUICtrlCreateCheckbox("Checkbox", 10, 22, 230, 20)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetOnEvent(-1, "GUIHandler")
$ga2 = $Checkboxes[1] = GUICtrlCreateCheckbox("Checkbox", 10, 46, 230, 20)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetOnEvent(-1, "GUIHandler")
$ga3 = $Checkboxes[2] = GUICtrlCreateCheckbox("Checkbox", 10, 70, 230, 20)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetOnEvent(-1, "GUIHandler")
$ga4 = $Checkboxes[3] = GUICtrlCreateCheckbox("Checkbox", 10, 94, 230, 20)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetOnEvent(-1, "GUIHandler")
$ga5 = $Checkboxes[4] = GUICtrlCreateCheckbox("Checkbox", 10, 118, 230, 20)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetOnEvent(-1, "GUIHandler")
$ga6 = $Checkboxes[5] = GUICtrlCreateCheckbox("Checkbox", 10, 142, 230, 20)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetOnEvent(-1, "GUIHandler")
$ga7 = $Checkboxes[6] = GUICtrlCreateCheckbox("Checkbox", 10, 166, 230, 20)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetOnEvent(-1, "GUIHandler")
$ga8 = $Checkboxes[7] = GUICtrlCreateCheckbox("Checkbox", 10, 190, 230, 20)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetOnEvent(-1, "GUIHandler")
$ga9 = $Checkboxes[8] = GUICtrlCreateCheckbox("Checkbox", 10, 214, 230, 20)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetOnEvent(-1, "GUIHandler")
$ga10 = $Checkboxes[9] = GUICtrlCreateCheckbox("Checkbox", 10, 238, 230, 20)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetOnEvent(-1, "GUIHandler")

$g14 = GUICtrlCreateButton("(Un)select all", 315, 276, 97, 17)
GUICtrlSetOnEvent(-1, "Un_SelectAll")

IsChecked:

Func IsChecked($control)
    Return BitAND(GUICtrlRead($control), $GUI_CHECKED) = $GUI_CHECKED
EndFunc   ;==>IsChecked

But when i click my button all the checkboxes are unchecked. (Debug says Checked because they need to be checked!)

 

PLZ help me

Edited by Small
Link to post
Share on other sites

I would use GUICtrlSetState.

I dont understand your code.

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to post
Share on other sites
12 minutes ago, careca said:

I would use GUICtrlSetState.

Thats not the problem. I can change the state of the checkbox but it is always unckecked when i do IsChecked($checkboxes[$i])

 

12 minutes ago, careca said:

I dont understand your code.

What part? Maybe i can explain

Edited by Small
Link to post
Share on other sites

Post a runnable script, you will get more help that way.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to post
Share on other sites
14 minutes ago, BrewManNH said:

Post a runnable script, you will get more help that way.

 

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiButton.au3>
#include <GuiEdit.au3>

Opt("TrayAutoPause", 0)
Opt("GUIOnEventMode", 1)

Global $Checkboxes[10]
Global $Checkbox1 = True
Global $Checkbox2 = True
Global $Checkbox3 = True
Global $Checkbox4 = True
Global $Checkbox5 = True
Global $Checkbox6 = True
Global $Checkbox7 = True
Global $Checkbox8 = True
Global $Checkbox9 = True
Global $Checkbox10 = True

$Config_GUI = GUICreate("Prophecies Runner", 413, 333)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit", $Config_GUI)

$ga1 = $Checkboxes[0] = GUICtrlCreateCheckbox("Checkbox", 10, 22, 230, 20)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetOnEvent(-1, "GUIHandler")
$ga2 = $Checkboxes[1] = GUICtrlCreateCheckbox("Checkbox", 10, 46, 230, 20)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetOnEvent(-1, "GUIHandler")
$ga3 = $Checkboxes[2] = GUICtrlCreateCheckbox("Checkbox", 10, 70, 230, 20)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetOnEvent(-1, "GUIHandler")
$ga4 = $Checkboxes[3] = GUICtrlCreateCheckbox("Checkbox", 10, 94, 230, 20)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetOnEvent(-1, "GUIHandler")
$ga5 = $Checkboxes[4] = GUICtrlCreateCheckbox("Checkbox", 10, 118, 230, 20)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetOnEvent(-1, "GUIHandler")
$ga6 = $Checkboxes[5] = GUICtrlCreateCheckbox("Checkbox", 10, 142, 230, 20)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetOnEvent(-1, "GUIHandler")
$ga7 = $Checkboxes[6] = GUICtrlCreateCheckbox("Checkbox", 10, 166, 230, 20)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetOnEvent(-1, "GUIHandler")
$ga8 = $Checkboxes[7] = GUICtrlCreateCheckbox("Checkbox", 10, 190, 230, 20)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetOnEvent(-1, "GUIHandler")
$ga9 = $Checkboxes[8] = GUICtrlCreateCheckbox("Checkbox", 10, 214, 230, 20)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetOnEvent(-1, "GUIHandler")
$ga10 = $Checkboxes[9] = GUICtrlCreateCheckbox("Checkbox", 10, 238, 230, 20)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlSetOnEvent(-1, "GUIHandler")

$g14 = GUICtrlCreateButton("(Un)select all", 315, 276, 97, 17)
GUICtrlSetOnEvent(-1, "Un_SelectAll")
GUISetState(@SW_SHOW, $Config_GUI)

$Debug_GUI = GUICreate("Prophecies Debug", 346, 277, 50, 50)
$DEBUG_Console = GUICtrlCreateEdit("Debug GUI Initialized.", -2, 64, 350, 215, BitOR($ES_READONLY, $ES_AUTOHSCROLL, $ES_AUTOVSCROLL))
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
GUISetState(@SW_SHOW, $Debug_GUI)

While 1
    Sleep(100)
WEnd

Func GUIHandler()
    Switch GUIGetMsg()
        ;Ascalon
        Case $ga1
            $Checkbox1 = Not $Checkbox1
        Case $ga2
            $Checkbox2 = Not $Checkbox2
        Case $ga3
            $Checkbox3 = Not $Checkbox3
        Case $ga4
            $Checkbox4 = Not $Checkbox4
        Case $ga5
            $Checkbox5 = Not $Checkbox5
        Case $ga6
            $Checkbox6 = Not $Checkbox6
        Case $ga7
            $Checkbox7 = Not $Checkbox7
        Case $ga8
            $Checkbox8 = Not $Checkbox8
        Case $ga9
            $Checkbox9 = Not $Checkbox9
        Case $ga10
            $Checkbox10 = Not $Checkbox10
        Case $GUI_EVENT_CLOSE
            _Exit()
    EndSwitch
EndFunc   ;==>GUIHandler

Func Un_SelectAll()
    Local $select = True
            For $i = 0 To UBound($Checkboxes) -1
                If IsChecked($Checkboxes[$i]) Then
                    $select = False
                    ExitLoop
                EndIf
            Next
            For $i = 0 To UBound($Checkboxes) -1
                If $select And Not IsChecked($Checkboxes[$i]) Then
                    WriteToDebug("Checked " & $i & "!")
                ElseIf Not $select And IsChecked($Checkboxes[$i]) Then
                    WriteToDebug("Unchecked " & $i & "!")
                EndIf
            Next

EndFunc   ;==>Un_SelectAll

Func WriteToDebug($aText)
    Local $lCurrentData = GUICtrlRead($DEBUG_Console)
    _GUICtrlEdit_AppendText($DEBUG_Console, @CRLF & "[" & @HOUR & ":" & @MIN & ":" & @SEC & "] " & $aText)
    _GUICtrlEdit_Scroll($DEBUG_Console, 1)
EndFunc   ;==>WriteToDebug

Func IsChecked($control)
    Return BitAND(GUICtrlRead($control), $GUI_CHECKED) = $GUI_CHECKED
EndFunc   ;==>IsChecked

Func _Exit()
    Exit
EndFunc

 

Link to post
Share on other sites

This is one example of how i use checkboxes:

#RequireAdmin
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Res_Icon_Add=Resources\AddRemApp.ico
#AutoIt3Wrapper_Icon=Resources\AddRemApp.ico
#AutoIt3Wrapper_Run_Tidy=n
#AutoIt3Wrapper_UseX64=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <WinAPI.au3>
#include <GuiEdit.au3>
#include <GuiButton.au3>
#include <Constants.au3>
#include <GuiStatusBar.au3>
#include <GUIConstants.au3>
#include <GuiImageList.au3>
#include <GuiComboBoxEx.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Opt("TrayMenuMode", 1)
Opt("TrayIconHide", 1)
Opt("GUIResizeMode", 1)
Opt("TrayIconDebug", 1)
Opt("TrayAutoPause", 0)
Opt("MouseCoordMode", 2)
Opt("GUIOnEventMode", 0)
Opt("MustDeclareVars", 0)
Opt("GUIEventOptions", 1)
Opt("TrayOnEventMode", 1)
Opt("ExpandEnvStrings", 1)
Opt("WinDetectHiddenText", 1)

FileInstall("AutoIt Checkboxes Installation.au3", @ScriptDir & '\AutoIt Checkboxes Installation.au3', 1)

TraySetIcon("IMG\install2.ico")

SplashImageOn("ASUS", "IMG\install2.png", -1, -1, -1, -1, 1)
Sleep(500)
SplashOff()

If @OSVersion = 'WIN_10' Then
    RunWait('taskkill /f /im OneDrive.exe')
    If @error Then ConsoleWrite('Kill OneDrive - ' & @error & ' - ' & @MSEC & @CRLF)
    RunWait('%SystemRoot%\SysWOW64\OneDriveSetup.exe /uninstall')
    If @error Then ConsoleWrite('Uninst OneDrive - ' & @error & ' - ' & @MSEC & @CRLF)
    ShellExecuteWait("W10x64.reg")
EndIf

Local $STR1 = StringInStr(@ScriptDir, '\', 2, 2)
Local $STR2 = StringLeft(@ScriptDir, $STR1)

Local $MBox = MsgBox(68, 'Services', 'Do you want to make changes in services? Disable some etc?')
If $MBox = 6 Then
    ProgressOn("Progress...", "Working", "0 %")
    ;=============================================================================
    ShellExecuteWait('SC', 'START hidserv', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG hidserv START= AUTO', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START Spooler', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG Spooler START= AUTO', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START eventlog', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG eventlog START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP LPDSVC', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG LPDSVC START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP btwdins', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG btwdins START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP Schedule', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG Schedule START= DISABLED', '', '', @SW_HIDE)
    ;ShellExecuteWait('SC', 'STOP WinDefend', '', '', @SW_HIDE)
    ;ShellExecuteWait('SC', 'CONFIG WinDefend START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP SysMain', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG SysMain START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP PcaSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG PcaSvc START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP MpsSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG MpsSvc START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP WSearch', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG WSearch START= DISABLED', '', '', @SW_HIDE)
    ;=============================================================================
    ShellExecuteWait('SC', 'START AxInstSV', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG AxInstSV START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START AJRouter', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG AJRouter START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START AppReadiness', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG AppReadiness START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START AppIDSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG AppIDSvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START Appinfo', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG Appinfo START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START AppMgmt', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG AppMgmt START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START AppXSVC', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG AppXSVC START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START BDESVC', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG BDESVC START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START wbengine', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG wbengine START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START BthHFSrv', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG BthHFSrv START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START camsvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG camsvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START c2wts', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG c2wts START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START ClipSVC', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG ClipSVC START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START KeyIso', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG KeyIso START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START COMSysApp', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG COMSysApp START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START Browser', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG Browser START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START DiagTrack', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG DiagTrack START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START VaultSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG VaultSvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START CryptSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG CryptSvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START DsSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG DsSvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START DiagTrack', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG DiagTrack START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START DeviceAssociationService', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG DeviceAssociationService START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START DeviceInstall', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG DeviceInstall START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START DmEnrollmentSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG DmEnrollmentSvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START DsmSVC', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG DsmSVC START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START DevQueryBroker', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG DevQueryBroker START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START diagsvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG diagsvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START WdiServiceHost', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG WdiServiceHost START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START WdiSystemHost', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG WdiSystemHost START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START MSDTC', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG MSDTC START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START embeddedmode', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG embeddedmode START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START EFS', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG EFS START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START EntAppSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG EntAppSvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START EapHost', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG EapHost START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START fhsvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG fhsvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START fdPHost', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG fdPHost START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START FDResPub', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG FDResPub START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START GraphicsPerfSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG GraphicsPerfSvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START HomeGroupListener', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG HomeGroupListener START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START HomeGroupProvider', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG HomeGroupProvider START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START IKEEXT', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG IKEEXT START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START UI0Detect', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG UI0Detect START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START IpxlatCfgSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG IpxlatCfgSvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START PolicyAgent', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG PolicyAgent START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START KtmRm', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG KtmRm START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START lltdsvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG lltdsvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START wlpasvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG wlpasvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START diagnosticshub.standardcollector.service', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG diagnosticshub.standardcollector.service START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START wlidsvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG wlidsvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START NgcSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG NgcSvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START NgcCtnrSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG NgcCtnrSvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START swprv', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG swprv START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START smphost', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG smphost START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START NaturalAuthentication', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG NaturalAuthentication START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START Netlogon', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG Netlogon START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START NcdAutoSetup', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG NcdAutoSetup START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START NcbService', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG NcbService START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START Netman', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG Netman START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START NcaSVC', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG NcaSVC START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START netprofm', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG netprofm START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START NetSetupSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG NetSetupSvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START defragsvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG defragsvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START PNRPsvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG PNRPsvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START p2psvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG p2psvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START p2pimsvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG p2pimsvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START PerfHost', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG PerfHost START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START pla', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG pla START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START PlugPlay', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG PlugPlay START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START PNRPAutoReg', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG PNRPAutoReg START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START WPDBusEnum', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG WPDBusEnum START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START PrintNotify', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG PrintNotify START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START wercplsupport', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG wercplsupport START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START QWAVE', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG QWAVE START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START RmSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG RmSvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START RasAuto', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG RasAuto START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START RasMan', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG RasMan START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START SessionEnv', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG SessionEnv START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START TermService', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG TermService START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START UmRdpService', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG UmRdpService START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START seclogon', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG seclogon START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START SstpSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG SstpSvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START SharedRealitySvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG SharedRealitySvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START svsvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG svsvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START SSDPSRV', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG SSDPSRV START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START StateRepository', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG StateRepository START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START WiaRpc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG WiaRpc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START StorSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG StorSvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START TieringEngineService', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG TieringEngineService START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START lmhosts', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG lmhosts START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START TapiSrv', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG TapiSrv START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START tiledatamodelsvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG tiledatamodelsvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START TimeBroker', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG TimeBroker START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START UsoSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG UsoSvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START upnphost', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG upnphost START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START vds', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG vds START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START VSS', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG VSS START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START WalletService', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG WalletService START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START WarpJITSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG WarpJITSvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START TokenBroker', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG TokenBroker START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START WebClient', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG WebClient START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START SDRSVC', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG SDRSVC START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START WbioSrvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG WbioSrvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START wcncsvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG wcncsvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START Sense', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG Sense START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START WdNisSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG WdNisSvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START WEPHOSTSVC', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG WEPHOSTSVC START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START WerSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG WerSvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START Wecsvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG Wecsvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START StiSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG StiSvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START msiserver', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG msiserver START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START LicenseManager', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG LicenseManager START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START TrustedInstaller', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG TrustedInstaller START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START spectrum', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG spectrum START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START InstallService', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG InstallService START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START W32Time', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG W32Time START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START wuauserv', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG wuauserv START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START WinHttpAutoProxySvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG WinHttpAutoProxySvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START dot3svc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG dot3svc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START WlanSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG WlanSvc START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START wmiApSrv', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG wmiApSrv START= DEMAND', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'START XboxGipSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG XboxGipSvc START= DEMAND', '', '', @SW_HIDE)
    ;=============================================================================
    ShellExecuteWait('SC', 'STOP ALG', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG ALG START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP tzautoupdate', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG tzautoupdate START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP bthserv', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG bthserv START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP PeerDistSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG PeerDistSvc START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP CertPropSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG CertPropSvc START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP NfsClnt', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG NfsClnt START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP dmwappushsvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG dmwappushsvc START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP MapsBroker', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG MapsBroker START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP lfsvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG lfsvc START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP HvHost', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG HvHost START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP vmicguestinterface', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG vmicguestinterface START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP vmicshutdown', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG vmicshutdown START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP vmicheartbeat', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG vmicheartbeat START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP vmicvmsession', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG vmicvmsession START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP vmicrdv', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG vmicrdv START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP vmictimesync', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG vmictimesync START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP vmicvss', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG vmicvss START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP irmon', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG irmon START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP SharedAccess', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG SharedAccess START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP AppVClient', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG AppVClient START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP MSiSCSI', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG MSiSCSI START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP SmsRouter', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG SmsRouter START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP CscService', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG CscService START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP SEMgrSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG SEMgrSvc START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP PhoneSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG PhoneSvc START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP RpcLocator', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG RpcLocator START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP RemoteRegistry', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG RemoteRegistry START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP RetailDemo', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG RetailDemo START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP RemoteAccess', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG RemoteAccess START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP SensorDataService', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG SensorDataService START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP SensrSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG SensrSvc START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP SensorService', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG SensorService START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP shpamsvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG shpamsvc START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP SCardSvr', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG SCardSvr START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP ScDeviceEnum', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG ScDeviceEnum START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP SCPolicySvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG SCPolicySvc START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP SNMPTRAP', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG SNMPTRAP START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP TabletInputService', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG TabletInputService START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP UevAgentService', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG UevAgentService START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP WFDSConSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG WFDSConSvc START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP FrameServer', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG FrameServer START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP wisvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG wisvc START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP WMPNetworkSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG WMPNetworkSvc START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP icssvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG icssvc START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP WinRM', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG WinRM START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP WwanSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG WwanSvc START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP xbgm', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG xbgm START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP XblAuthManager', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG XblAuthManager START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP XblGameSave', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG XblGameSave START= DISABLED', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'STOP XboxNetApiSvc', '', '', @SW_HIDE)
    ShellExecuteWait('SC', 'CONFIG XboxNetApiSvc START= DISABLED', '', '', @SW_HIDE)
    ;=============================================================================
    ProgressSet(100, "100 %", "Done!")
    Sleep(100)
    ProgressOff()
Else
    ConsoleWrite('Continuing - ' & @MSEC & @CRLF)
EndIf

$hGUI = GUICreate("AutoIt Install Menu", 740, 250, 200, 200)
GUISetOnEvent($GUI_EVENT_CLOSE, "Quit")
$hlabel = GUICtrlCreateLabel("Select a Program to install", 30, 10, 126, 17)
$hButton1 = GUICtrlCreateButton("Start", 30, 200, 50)
$hButton2 = GUICtrlCreateButton("Select All", 80, 200, 80)
$hButton3 = GUICtrlCreateButton("UnSelect All", 160, 200, 80)

$totray = TrayCreateItem("Tray")
TrayItemSetOnEvent($totray, "ToTray")

$restore = TrayCreateItem("Restore")
TrayItemSetOnEvent($restore, "Restore")

$exititem = TrayCreateItem("Close")
TrayItemSetOnEvent($exititem, "Quit")

GUISetState()

Global $aRadio[32]
Global $aApps[32][3]
$aApps[0][0] = "W10Tools"
$aApps[0][1] = "W10Tools.exe"
$aApps[0][2] = "IMG\Pc.ico"
$aApps[1][0] = "SMP"
$aApps[1][1] = "AutoIt SMP.exe"
$aApps[1][2] = "IMG\SMP.ico"
$aApps[2][0] = "LAN"
$aApps[2][1] = "AutoIt LAN.exe"
$aApps[2][2] = "IMG\realtek.ico"
$aApps[3][0] = "Obsidian"
$aApps[3][1] = 'Obsidian\Obsidian.bat'
$aApps[3][2] = "Obsidian\normal.ico"
$aApps[4][0] = "Java"
$aApps[4][1] = "AutoIt Java.exe"
$aApps[4][2] = "IMG\java.ico"
$aApps[5][0] = "DX9c"
$aApps[5][1] = "AutoIt DX9c.exe"
$aApps[5][2] = "IMG\dx9c.ico"
$aApps[6][0] = "Create Synchronicity 6.0"
$aApps[6][1] = "Create Synchronicity 6.0.exe"
$aApps[6][2] = "IMG\sync.ico"
$aApps[7][0] = "Firefox"
$aApps[7][1] = "AutoIt FFox.exe"
$aApps[7][2] = "IMG\fox.ico"
$aApps[8][0] = "GP+LS"
$aApps[8][1] = "GroupPolicy W10 X64\GPO Tool.exe"
$aApps[8][2] = "IMG\gpls.ico"
$aApps[9][0] = "Notepad ++"
$aApps[9][1] = "Notepad ++ 7.5.2 SFX.exe"
$aApps[9][2] = "IMG\notepad.ico"
$aApps[10][0] = "PowerCfgW10"
$aApps[10][1] = "PowerCfgW10.exe"
$aApps[10][2] = "IMG\power.ico"
$aApps[11][0] = "FlashPlayer"
$aApps[11][1] = "AutoIt FlashPlayer.exe"
$aApps[11][2] = "IMG\flashplayer.ico"
$aApps[12][0] = "WinRar"
$aApps[12][1] = "AutoIt WinRar.exe"
$aApps[12][2] = "IMG\winrar.ico"
$aApps[13][0] = "Foxit Reader"
$aApps[13][1] = "FoxitReaderPortable.exe"
$aApps[13][2] = "IMG\foxit.ico"
$aApps[14][0] = "Realtek R*"
$aApps[14][1] = "AutoIt RLTK x64.exe"
$aApps[14][2] = "IMG\realtek.ico"
$aApps[15][0] = "AutoIt + SciTE"
$aApps[15][1] = "AutoIt AutoIt + SciTe Silent.exe"
$aApps[15][2] = "IMG\autoit.ico"
$aApps[16][0] = "PhysX"
$aApps[16][1] = "AutoIt PhysX.exe"
$aApps[16][2] = "IMG\physx.ico"
$aApps[17][0] = "FM2 Chipset"
$aApps[17][1] = "F2A85M-LE\FM2_Chipset\Setup.exe"
$aApps[17][2] = "IMG\amd.ico"
$aApps[18][0] = "Logitech SetPoint"
$aApps[18][1] = "AutoIt Logitech SetPoint.exe"
$aApps[18][2] = "IMG\logitech.ico"
$aApps[19][0] = "Logitech GS"
$aApps[19][1] = "AutoIt LGS.exe"
$aApps[19][2] = "IMG\lgs.ico"
$aApps[20][0] = "Synaptics 17.0.19C"
$aApps[20][1] = "AutoIt Synaptics 17.0.19C.exe"
$aApps[20][2] = "IMG\synaptics.ico"
$aApps[21][0] = "Fraps"
$aApps[21][1] = "AutoIt Fraps.exe"
$aApps[21][2] = "IMG\fraps.ico"
$aApps[22][0] = "Reserved"
$aApps[22][1] = ""
$aApps[22][2] = "IMG\Blank.ico"
$aApps[23][0] = "Reserved"
$aApps[23][1] = ""
$aApps[23][2] = "IMG\Blank.ico"
$aApps[24][0] = "Reserved"
$aApps[24][1] = ""
$aApps[24][2] = "IMG\Blank.ico"
$aApps[25][0] = "Reserved"
$aApps[25][1] = ""
$aApps[25][2] = "IMG\Blank.ico"
$aApps[26][0] = "Reserved"
$aApps[26][1] = ""
$aApps[26][2] = "IMG\Blank.ico"
$aApps[27][0] = "Reserved"
$aApps[27][1] = ""
$aApps[27][2] = "IMG\Blank.ico"
$aApps[28][0] = "Reserved"
$aApps[28][1] = ""
$aApps[28][2] = "IMG\Blank.ico"
$aApps[29][0] = "Reserved"
$aApps[29][1] = ""
$aApps[29][2] = "IMG\Blank.ico"
$aApps[30][0] = "Reserved"
$aApps[30][1] = ""
$aApps[30][2] = "IMG\Blank.ico"
$aApps[31][0] = "Reserved"
$aApps[31][1] = ""
$aApps[31][2] = "IMG\Blank.ico"

#cs
    $aApps[16][0] = "Notepad ++6.5.5"
    $aApps[16][1] = "Notepad ++ 6.5.5 SFX.exe"
    $aApps[16][2] = "IMG\notepad.ico"
    $aApps[21][0] = "ATK Package"
    $aApps[21][1] = "AutoIt ATK Package.exe"
    $aApps[21][2] = "IMG\atk.ico"
    $aApps[22][0] = "Intel Management Engine Interface"
    $aApps[22][1] = "AutoIt Intel MEI.exe"
    $aApps[22][2] = "IMG\intel.ico"
    $aApps[23][0] = "Intel Chipset 9.2.0.1030"
    $aApps[23][1] = "AutoIt Intel Chipset 9.2.0.1030.exe"
    $aApps[23][2] = "IMG\intel.ico"
    $aApps[27][0] = "AMD"
    $aApps[27][1] = "AutoIt AMD.exe"
    $aApps[27][2] = "IMG\amd.ico"
#CE

For $i = 0 To 3
    For $j = 0 To 7
        $sName = ($aApps[($i * 8) + $j][0])
        GUICtrlCreateIcon($aApps[($i * 8) + $j][2], -2, 30 + ($i * 160), 30 + ($j * 20), 17, 17)
        $aRadio[($i * 8) + $j] = GUICtrlCreateCheckbox($sName, 50 + ($i * 160), 30 + ($j * 20), 138, 20)
    Next
Next

If @OSVersion = 'WIN_10' Then
    W10()
EndIf

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
        Case $hButton1
            For $i = 0 To 29
                If BitAND(GUICtrlRead($aRadio[$i]), $GUI_CHECKED) = $GUI_CHECKED Then
                    If Not FileExists($aApps[$i][1]) Then
                        MsgBox(262160, "File not found!", $aApps[$i][1], 0)
                    Else
                        ConsoleWrite("Running: " & $aApps[$i][0] & @CRLF)
                        ShellExecuteWait($aApps[$i][1])
                        TrayTip('Installer', "Running: " & $aApps[$i][0], 3)
                    EndIf
                EndIf
            Next
            ;================================================
        Case $hButton2 ;All
            For $i = 0 To 21
                GUICtrlSetState($aRadio[$i], $GUI_CHECKED)
            Next
            ;================================================
        Case $hButton3 ;None
            For $i = 0 To 31
                GUICtrlSetState($aRadio[$i], $GUI_UNCHECKED)
            Next
    EndSwitch
WEnd

Func W10()
    For $i = 0 To 31
        GUICtrlSetState($aRadio[$i], $GUI_UNCHECKED);Clear all
    Next
    For $i = 0 To 21
        GUICtrlSetState($aRadio[$i], $GUI_CHECKED)
    Next
EndFunc   ;==>W10

Func ToTray()
    TrayItemSetState($totray, $TRAY_UNCHECKED)
    GUISetState(@SW_HIDE)
EndFunc   ;==>ToTray

Func Restore()
    TrayItemSetState($restore, $TRAY_UNCHECKED)
    GUISetState(@SW_SHOW)
EndFunc   ;==>Restore

Func Quit()
    Exit
EndFunc   ;==>Quit

First time i've seen :

$ga10 = $Checkboxes[9] = GUICtrlCreateCheckbox("Checkbox", 10, 238, 230, 20)

 

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...