Código: Seleccionar todo
;#RequireAdmin
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
;Codigo para generar la ventana
$Instalador = GUICreate("Instalador", 615, 440, 193, 144, BitOR($WS_SYSMENU, $WS_POPUP))
GUISetBkColor(0xffffff)
GUISetState(@SW_SHOW)
Opt("TrayIconHide", 1)
;Codigo para generar las etiquetas
$Lbl_Tit = GUICtrlCreateLabel("Instalar Programas Desatendidos", 83, 8, 450, 53)
GUICtrlSetFont(-1, 28, 400, 0, "Curlz MT")
GUICtrlSetCursor(-1, 14)
$Lbl_Copy = GUICtrlCreateLabel("Instalador creado por Lycanv69©", 171, 416, 194, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$Lbl_Cont = GUICtrlCreateLabel("Contacto", 372, 416, 55, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x0000FF)
;Codigo para cargar las imagenes
$Pic1 = GUICtrlCreatePic("Firma.gif", 48, 264, 268, 92)
$Pic2 = GUICtrlCreatePic("Avatar.jpg", 432, 240, 116, 132)
;Codigo para generar los checbox's
$ChkNada = GUICtrlCreateCheckbox("", 408, 400, 10, 17)
GUICtrlSetState($ChkNada, $gui_Hide)
GUICtrlSetState($ChkNada, $gui_Checked)
$ChkAcro = GUICtrlCreateCheckbox("Acrobat Reader X", 48, 72, 129, 17)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlSetTip(-1, "Lector de archivos PDF")
$ChkFlash = GUICtrlCreateCheckbox("Flash Player IE", 48, 96, 129, 17)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlSetTip(-1, "Plugin para Internet Explorer del reproductor Flash Player")
$ChkJava = GUICtrlCreateCheckbox("Java", 48, 120, 129, 17)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlSetTip(-1, "Consolo de Java")
$ChkKLite = GUICtrlCreateCheckbox("K-Lite", 48, 144, 129, 17)
GUICtrlSetTip(-1, "Conjunto de codecs para el sistema")
$ChkNero = GUICtrlCreateCheckbox("Nero 10 HD", 48, 168, 129, 17)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlSetTip(-1, "Programa para grabar y copiar CD's y DVD's")
$ChkNod = GUICtrlCreateCheckbox("Nod32", 408, 72, 129, 17)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlSetTip(-1, "Antivirus con licencia actualizable")
$ChkOffice = GUICtrlCreateCheckbox("Office 2010 Pro", 408, 96, 129, 17)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlSetTip(-1, "Suite ofimatica que contien Word y Excel")
$ChkDVD = GUICtrlCreateCheckbox("Power DVD 11", 408, 120, 129, 17)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlSetTip(-1, "Reproductor de DVD's y BluRay con soporte para 3D")
$ChkRar = GUICtrlCreateCheckbox("WinRAR", 408, 144, 129, 17)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlSetTip(-1, "Compresor y descompresor de archivos")
$ChkRegW = GUICtrlCreateCheckbox("Activar Windows 7", 408, 168, 129, 17)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlSetTip(-1, "Activa cualquier version de Windows 7")
GUICtrlSetState($ChkRegW, $Gui_UNCHECKED)
;GUICtrlSetState($ChkRegW,$gui_disable)
;Codigo para generar los botones
$Btn_Todo = GUICtrlCreateButton("Todo", 47, 376, 75, 33)
GUICtrlSetFont(-1, 16, 400, 0, "Curlz MT")
GUICtrlSetColor(-1, 0x800000)
GUICtrlSetBkColor(-1, 0x808080)
$Btn_Util = GUICtrlCreateButton("Utilidades", 135, 376, 83, 33)
GUICtrlSetFont(-1, 16, 400, 0, "Curlz MT")
GUICtrlSetColor(-1, 0x800000)
GUICtrlSetBkColor(-1, 0x808080)
$Btn_Mult = GUICtrlCreateButton("Multimedia", 231, 376, 99, 33)
GUICtrlSetFont(-1, 16, 400, 0, "Curlz MT")
GUICtrlSetColor(-1, 0x800000)
GUICtrlSetBkColor(-1, 0x808080)
$Btn_Nada = GUICtrlCreateButton("Nada", 343, 376, 75, 33)
GUICtrlSetFont(-1, 16, 400, 0, "Curlz MT")
GUICtrlSetColor(-1, 0x800000)
GUICtrlSetBkColor(-1, 0x808080)
$Btn_Inst = GUICtrlCreateButton("Instalar", 432, 376, 75, 33)
GUICtrlSetFont(-1, 16, 400, 0, "Curlz MT")
GUICtrlSetColor(-1, 0x800000)
GUICtrlSetBkColor(-1, 0x808080)
$Btn_Cerrar = GUICtrlCreateButton("Cerrar", 519, 376, 73, 33)
GUICtrlSetFont(-1, 16, 400, 0, "Curlz MT")
GUICtrlSetColor(-1, 0x800000)
GUICtrlSetBkColor(-1, 0x808080)
;Codigo para generar los radios
$Radio1 = GUICtrlCreateRadio("Acer", 76, 208, 49, 17)
$Radio2 = GUICtrlCreateRadio("Compaq", 124, 208, 65, 17)
$Radio3 = GUICtrlCreateRadio("Dell", 188, 208, 41, 17)
$Radio4 = GUICtrlCreateRadio("Gateway", 236, 208, 65, 17)
$Radio5 = GUICtrlCreateRadio("HP", 308, 208, 41, 17)
$Radio6 = GUICtrlCreateRadio("Samsung", 348, 208, 73, 17)
$Radio7 = GUICtrlCreateRadio("VAIO", 428, 208, 49, 17)
$Radio8 = GUICtrlCreateRadio("Toshiba", 489, 208, 65, 17)
GUICtrlSetState($Radio1, $gui_disable)
GUICtrlSetState($Radio2, $gui_disable)
GUICtrlSetState($Radio3, $gui_disable)
GUICtrlSetState($Radio4, $gui_disable)
GUICtrlSetState($Radio5, $gui_disable)
GUICtrlSetState($Radio6, $gui_disable)
GUICtrlSetState($Radio7, $gui_disable)
GUICtrlSetState($Radio8, $gui_disable)
$STATE = "UNCHECKED"
Func _Checked($chk)
Return BitAND(GUICtrlRead($chk), $gui_Checked) = $gui_Checked
EndFunc
While 1
Switch GUIGetMsg()
Case $ChkRegW
Switch GUICtrlRead($ChkRegW)
Case 1
If $STATE = "UNCHECKED" Then
GUICtrlSetState($Radio1, $gui_enable)
GUICtrlSetState($Radio2, $gui_enable)
GUICtrlSetState($Radio3, $gui_enable)
GUICtrlSetState($Radio4, $gui_enable)
GUICtrlSetState($Radio5, $gui_enable)
GUICtrlSetState($Radio6, $gui_enable)
GUICtrlSetState($Radio7, $gui_enable)
GUICtrlSetState($Radio8, $gui_enable)
$STATE = "CHECKED"
EndIf
Case 4
If $STATE = "CHECKED" Then
GUICtrlSetState($Radio1, $gui_disable)
GUICtrlSetState($Radio2, $gui_disable)
GUICtrlSetState($Radio3, $gui_disable)
GUICtrlSetState($Radio4, $gui_disable)
GUICtrlSetState($Radio5, $gui_disable)
GUICtrlSetState($Radio6, $gui_disable)
GUICtrlSetState($Radio7, $gui_disable)
GUICtrlSetState($Radio8, $gui_disable)
$STATE = "UNCHECKED"
EndIf
EndSwitch
Case $Btn_Todo
GUICtrlSetState($ChkAcro, $gui_Checked)
GUICtrlSetState($ChkDVD, $gui_Checked)
GUICtrlSetState($ChkFlash, $gui_Checked)
GUICtrlSetState($ChkJava, $gui_Checked)
GUICtrlSetState($ChkKLite, $gui_Checked)
GUICtrlSetState($ChkNero, $gui_Checked)
GUICtrlSetState($ChkNod, $gui_Checked)
GUICtrlSetState($ChkOffice, $gui_Checked)
GUICtrlSetState($ChkRar, $gui_Checked)
GUICtrlSetState($ChkRegW, $gui_Checked)
GUICtrlSetState($ChkNada, $Gui_UNCHECKED)
Case $Btn_Nada
GUICtrlSetState($ChkAcro, $Gui_UNCHECKED)
GUICtrlSetState($ChkDVD, $Gui_UNCHECKED)
GUICtrlSetState($ChkFlash, $Gui_UNCHECKED)
GUICtrlSetState($ChkJava, $Gui_UNCHECKED)
GUICtrlSetState($ChkKLite, $Gui_UNCHECKED)
GUICtrlSetState($ChkNero, $Gui_UNCHECKED)
GUICtrlSetState($ChkNod, $Gui_UNCHECKED)
GUICtrlSetState($ChkOffice, $Gui_UNCHECKED)
GUICtrlSetState($ChkRar, $Gui_UNCHECKED)
GUICtrlSetState($ChkRegW, $Gui_UNCHECKED)
GUICtrlSetState($ChkNada, $gui_Checked)
Case $Btn_Mult
GUICtrlSetState($ChkDVD, $gui_Checked)
GUICtrlSetState($ChkKLite, $gui_Checked)
GUICtrlSetState($ChkNero, $gui_Checked)
GUICtrlSetState($ChkAcro, $Gui_UNCHECKED)
GUICtrlSetState($ChkFlash, $Gui_UNCHECKED)
GUICtrlSetState($ChkJava, $Gui_UNCHECKED)
GUICtrlSetState($ChkNod, $Gui_UNCHECKED)
GUICtrlSetState($ChkOffice, $Gui_UNCHECKED)
GUICtrlSetState($ChkRar, $Gui_UNCHECKED)
GUICtrlSetState($ChkRegW, $Gui_UNCHECKED)
GUICtrlSetState($ChkNada, $Gui_UNCHECKED)
Case $Btn_Util
GUICtrlSetState($ChkAcro, $gui_Checked)
GUICtrlSetState($ChkFlash, $gui_Checked)
GUICtrlSetState($ChkJava, $gui_Checked)
GUICtrlSetState($ChkRar, $gui_Checked)
GUICtrlSetState($ChkDVD, $Gui_UNCHECKED)
GUICtrlSetState($ChkKLite, $Gui_UNCHECKED)
GUICtrlSetState($ChkNero, $Gui_UNCHECKED)
GUICtrlSetState($ChkNod, $Gui_UNCHECKED)
GUICtrlSetState($ChkOffice, $Gui_UNCHECKED)
GUICtrlSetState($ChkRegW, $Gui_UNCHECKED)
GUICtrlSetState($ChkNada, $Gui_UNCHECKED)
Case $Btn_Inst
$win = GUICreate("Instalando", 300, 100, 100, 100)
GUISetState(@SW_SHOW)
$Lab_1 = GUICtrlCreateLabel("", 10, 10, 290, 90)
If _Checked($ChkAcro) Then
GUICtrlSetData($Lab_1, "Instalando Acrobat Reader X")
GUICtrlSetState($ChkNada, $Gui_UNCHECKED)
Sleep(1000)
EndIf
If _Checked($ChkFlash) Then
GUICtrlSetData($Lab_1, "Instalando Flash Player para Internet Explorer")
GUICtrlSetState($ChkNada, $Gui_UNCHECKED)
Sleep(1000)
EndIf
If _Checked($ChkJava) Then
GUICtrlSetData($Lab_1, "Instalando Java ER")
GUICtrlSetState($ChkNada, $Gui_UNCHECKED)
Sleep(1000)
EndIf
If _Checked($ChkKLite) Then
GUICtrlSetData($Lab_1, "Instalando K-Lite CodePack")
GUICtrlSetState($ChkNada, $Gui_UNCHECKED)
Sleep(1000)
EndIf
If _Checked($ChkNero) Then
GUICtrlSetData($Lab_1, "Instalando Nero 10 HD Platinum")
GUICtrlSetState($ChkNada, $Gui_UNCHECKED)
Sleep(1000)
EndIf
If _Checked($ChkNod) Then
GUICtrlSetData($Lab_1, "Instalando Nod 32 4.01")
GUICtrlSetState($ChkNada, $Gui_UNCHECKED)
Sleep(1000)
EndIf
If _Checked($ChkOffice) Then
GUICtrlSetData($Lab_1, "Instalando Microsoft Office")
GUICtrlSetState($ChkNada, $Gui_UNCHECKED)
Sleep(1000)
EndIf
If _Checked($ChkDVD) Then
GUICtrlSetData($Lab_1, "Instalando Power DVD 11")
GUICtrlSetState($ChkNada, $Gui_UNCHECKED)
Sleep(1000)
EndIf
If _Checked($ChkRar) Then
GUICtrlSetData($Lab_1, "Instalando WinRar 4.01")
GUICtrlSetState($ChkNada, $Gui_UNCHECKED)
Sleep(1000)
EndIf
If _Checked($Radio1) Then
GUICtrlSetData($Lab_1, "Registrando Windows - Acer")
GUICtrlSetState($ChkNada, $Gui_UNCHECKED)
Sleep(1000)
EndIf
If _Checked($Radio2) Then
GUICtrlSetData($Lab_1, "Registrando Windows - Compaq")
GUICtrlSetState($ChkNada, $Gui_UNCHECKED)
Sleep(1000)
EndIf
If _Checked($Radio3) Then
GUICtrlSetData($Lab_1, "Registrando Windows - Dell")
GUICtrlSetState($ChkNada, $Gui_UNCHECKED)
Sleep(1000)
EndIf
If _Checked($Radio4) Then
GUICtrlSetData($Lab_1, "Registrando Windows - Gateway")
GUICtrlSetState($ChkNada, $Gui_UNCHECKED)
Sleep(1000)
EndIf
If _Checked($Radio5) Then
GUICtrlSetData($Lab_1, "Registrando Windows - HP")
GUICtrlSetState($ChkNada, $Gui_UNCHECKED)
Sleep(1000)
EndIf
If _Checked($Radio6) Then
GUICtrlSetData($Lab_1, "Registrando Windows - Samsung")
GUICtrlSetState($ChkNada, $Gui_UNCHECKED)
Sleep(1000)
EndIf
If _Checked($Radio7) Then
GUICtrlSetData($Lab_1, "Registrando Windows - Vaio")
GUICtrlSetState($ChkNada, $Gui_UNCHECKED)
Sleep(1000)
EndIf
If _Checked($Radio8) Then
GUICtrlSetData($Lab_1, "Registrando Windows - Toshiba")
GUICtrlSetState($ChkNada, $Gui_UNCHECKED)
Sleep(1000)
EndIf
GUIDelete($win)
If _Checked($ChkNada) Then
GUIDelete($win)
MsgBox(0, "Error", "Seleccione una opción")
EndIf
Case $GUI_EVENT_CLOSE
GUIDelete($win)
Case $Btn_Cerrar
Exit
EndSwitch
WEnd