;#RequireAdmin #AutoIt3Wrapper_UseX64=y #include #include #include #include #include #include #include #include #include #include #include #include #include #include ; Usar usuario ADM sistemico ;Variaveis ultilizadas Global $sSoftware = "C:\Users\ssuk10g\Desktop\autoIT\teste\Envio_softwares_VWStore\Instalação" Global $powerShell = @ScriptDir &'\Install_soft.ps1' Global $program = "C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell_ise.exe" ;Global $idProgres, $StatusBar1, $sLabel_Status Global $Button3, $Button6, $Button1, $Button2,$Button4 #Region ### START Koda GUI section ### Form= $Main_GUI = GUICreate("Envio de softwares", 357, 300, 259, 217) $Group1_app = GUICtrlCreateGroup("Aplicativo Itau", 10, 8, 129, 185) $pic = GUICtrlCreatePic("IconItau.bmp", 37, 45, 70, 70) GUICtrlSetBkColor(-1, 0xA0A0A4) $check1 = GUICtrlCreateCheckbox ("", 65, 130, 20, 20) $instalar = GUICtrlCreateButton("Enviar", 100, 230, 97, 21) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button1 = GUICtrlCreateButton("Itau", 280, 16, 67, 25) $Button2 = GUICtrlCreateButton("Zoom", 280, 48, 67, 25) $Group2_app = GUICtrlCreateGroup("Navegador Edge", 144, 8, 129, 185) $pic2 = GUICtrlCreatePic("icon.bmp", 170, 45, 70, 70 ) GUICtrlSetBkColor(-1, 0xA0A0A4) $check2 = GUICtrlCreateCheckbox ("", 200, 130, 20, 20) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Install_soft() Func Install_soft() ; Show GUI, and wait for OK to be pressed GUISetState () While GuiGetMsg() <> $instalar Sleep(10) Wend $ReadCheck1 = GUICtrlRead($check1) $ReadCheck2 = GUICtrlRead($check2) GuiDelete();get rid of GUI right away; this is optional If $ReadCheck1 = $GUI_CHECKED THEN ShellExecute("C:\Users\ssuk10g\Desktop\autoIT\teste\Envio_softwares_VWStore\Banco de softwares\aplicativoitau.msi", "", @SW_MAXIMIZE) If $ReadCheck2 = $GUI_CHECKED THEN ShellExecute("C:\Users\ssuk10g\Desktop\autoIT\teste\Envio_softwares_VWStore\Banco de softwares\Chrome.msi", "", @SW_MAXIMIZE) ;If $ReadCheck3 = $GUI_CHECKED THEN MsgBox(0,'test3', 'works');RunWait("calc.exe", "", @SW_MAXIMIZE) Exit While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 GUICtrlSetBkColor($Group1_app, 0x3A6EA5) GUICtrlSetBkColor($Group2_app, 0xA0A0A4) Case $Button2 GUICtrlSetBkColor($Group1_app, 0xA0A0A4) GUICtrlSetBkColor($Group2_app, 0x3A6EA5) EndSwitch WEnd