Code : Tout sélectionner
#include <GUIConstantsEx.au3>
#include <Array.au3>
Opt("GUIOnEventMode", 1)
Dim $a_installer[23][2]=[["", ""], ["0", "SupprXP.exe"], ["0", "BasicXP.exe"], ["0", "OpenXP.exe"], ["0", "NeroXP.exe"], ["0", "FireFoxXP.exe"], ["0", "AvastXP.exe"], ["0", "EarthXP.exe"], ["0", "ItunesXP.exe"], ["0", "VLCXP.exe"], ["0", "WinRARXP.exe"], ["0", "ChromeXP.exe"], ["0", "SkypeXP.exe"], ["0", "PhotoFiltre.exe"], ["0", "Picasa3.exe"], ["0", "Office2003.exe"], ["0", "Office2000.exe"], ["0", "Works9.exe"], ["0", "Works85.exe"], ["0", "tagueurXP.exe"], ["0", "BitDef2009.exe"], ["0", "KS2009.exe"], ["0", "msn.exe"]]
$gui = GUICreate("Chrono Informatique", 450, 380)
GUISetIcon("Data\autorun.ico")
GUISetOnEvent($GUI_EVENT_CLOSE, "quitter")
$installer = GUICtrlCreateButton("Installer", 80, 340, 89, 25)
GUICtrlSetOnEvent( -1,"install")
$quitter = GUICtrlCreateButton("Quitter", 280, 340, 89, 25)
GUICtrlSetOnEvent( -1,"quitter")
$checkall = GUICtrlCreateCheckbox("Selection du Basic", 30, 200, 120, 30)
GUICtrlSetOnEvent( -1,"allcheck")
$checkall2 = GUICtrlCreateCheckbox("Selection des gratuits", 30, 230, 120, 30)
GUICtrlSetOnEvent( -1,"allcheck2")
$check1 = GUICtrlCreateCheckbox("Suppr Temp", 45, 10)
GUICtrlSetOnEvent( -1,"checkbox")
GUICtrlSetTip(-1, "Suppression des fichiers temporaires et System Volume Information")
$check2 = GUICtrlCreateCheckbox("Basique", 45, 40)
GUICtrlSetOnEvent( -1,"checkbox")
GUICtrlSetTip(-1, "Installation du Basique")
$check3 = GUICtrlCreateCheckbox("Open Office", 45, 70)
GUICtrlSetOnEvent( -1,"checkbox")
GUICtrlSetTip(-1, "Installation d'Open Office 3.0")
$check4 = GUICtrlCreateCheckbox("Nero", 45, 100)
GUICtrlSetOnEvent( -1,"checkbox")
GUICtrlSetTip(-1, "Installation de Nero 7")
$check5 = GUICtrlCreateCheckbox("FireFox", 180, 10)
GUICtrlSetOnEvent( -1,"checkbox")
GUICtrlSetTip(-1, "Installation de FireFox 3.0.1")
$check6 = GUICtrlCreateCheckbox("Avast", 180, 40)
GUICtrlSetOnEvent( -1,"checkbox")
GUICtrlSetTip(-1, "Installation d'Avast Home 4.8")
$check7 = GUICtrlCreateCheckbox("Google Earth", 180, 70)
GUICtrlSetOnEvent( -1,"checkbox")
GUICtrlSetTip(-1, "Installation de Google Earth")
$check8 = GUICtrlCreateCheckbox("iTunes", 180, 130)
GUICtrlSetOnEvent( -1,"checkbox")
GUICtrlSetTip(-1, "Installation d'iTunes 8 et QuickTime")
$check9 = GUICtrlCreateCheckbox("VLC", 180, 160)
GUICtrlSetOnEvent( -1,"checkbox")
GUICtrlSetTip(-1, "Installation de VLC")
$check10 = GUICtrlCreateCheckbox("WinRAR", 180, 190)
GUICtrlSetOnEvent( -1,"checkbox")
GUICtrlSetTip(-1, "Installation de WinRAR 3.80")
$check11 = GUICtrlCreateCheckbox("Google Chrome", 180, 100)
GUICtrlSetOnEvent( -1,"checkbox")
GUICtrlSetTip(-1, "Installation de Google Chrome")
$check12 = GUICtrlCreateCheckbox("Skype", 180, 220)
GUICtrlSetOnEvent( -1,"checkbox")
GUICtrlSetTip(-1, "Installation de Skype 4.0")
$check13 = GUICtrlCreateCheckbox("PhotoFiltre", 180, 250)
GUICtrlSetOnEvent( -1,"checkbox")
GUICtrlSetTip(-1, "Installation de PhotoFiltre")
$check14 = GUICtrlCreateCheckbox("Picasa 3", 180, 280)
GUICtrlSetOnEvent( -1,"checkbox")
GUICtrlSetTip(-1, "Installation de Picasa 3")
$check15 = GUICtrlCreateCheckbox("Office 2003", 315, 10)
GUICtrlSetOnEvent( -1,"checkbox")
GUICtrlSetTip(-1, "Installation de Microsoft Office 2003 Pro")
$check16 = GUICtrlCreateCheckbox("Office 2000", 315, 40)
GUICtrlSetOnEvent( -1,"checkbox")
GUICtrlSetTip(-1, "Installation de Microsoft Office 2000")
$check17 = GUICtrlCreateCheckbox("Works 9", 315, 70)
GUICtrlSetOnEvent( -1,"checkbox")
GUICtrlSetTip(-1, "Installation de Microsoft Works 9")
$check18 = GUICtrlCreateCheckbox("Works 8.5", 315, 100)
GUICtrlSetOnEvent( -1,"checkbox")
GUICtrlSetTip(-1, "Installation de Microsoft Works 8.5")
$check19 = GUICtrlCreateCheckbox("Logo Chrono", 45, 160)
GUICtrlSetOnEvent( -1,"checkbox")
GUICtrlSetTip(-1, "tatouage du poste")
$check20 = GUICtrlCreateCheckbox("BitDefender 2009", 315, 160)
GUICtrlSetOnEvent( -1,"checkbox")
GUICtrlSetTip(-1, "Installation de BitDefender Antivirus 2009")
$check21 = GUICtrlCreateCheckbox("Kaspersky 2009", 315, 190)
GUICtrlSetOnEvent( -1,"checkbox")
GUICtrlSetTip(-1, "Installation de Kaspersky Antivirus 2009")
$check22 = GUICtrlCreateCheckbox("MSN", 180, 310)
GUICtrlSetOnEvent( -1,"checkbox")
GUICtrlSetTip(-1, "Installation de MSN")
GuiSetState ( )
While 1
Sleep(100)
WEnd
Func checkbox()
Switch @GUI_CtrlId
Case $check1
If _Ischecked($check1) then
$a_installer[1][0] = "1"
Else
$a_installer[1][0] = "0"
EndIf
Case $check2
If _Ischecked($check2) then
$a_installer[2][0] = "1"
Else
$a_installer[2][0] = "0"
EndIf
Case $check3
If _Ischecked($check3) then
$a_installer[3][0] = "1"
Else
$a_installer[3][0] = "0"
EndIf
Case $check4
If _Ischecked($check4) then
$a_installer[4][0] = "1"
Else
$a_installer[4][0] = "0"
EndIf
Case $check5
If _Ischecked($check5) then
$a_installer[5][0] = "1"
Else
$a_installer[5][0] = "0"
EndIf
Case $check6
If _Ischecked($check6) then
$a_installer[6][0] = "1"
Else
$a_installer[6][0] = "0"
EndIf
Case $check7
If _Ischecked($check7) then
$a_installer[7][0] = "1"
Else
$a_installer[7][0] = "0"
EndIf
Case $check8
If _Ischecked($check8) then
$a_installer[8][0] = "1"
Else
$a_installer[8][0] = "0"
EndIf
Case $check9
If _Ischecked($check9) then
$a_installer[9][0] = "1"
Else
$a_installer[9][0] = "0"
EndIf
Case $check10
If _Ischecked($check10) then
$a_installer[10][0] = "1"
Else
$a_installer[10][0] = "0"
EndIf
Case $check11
If _Ischecked($check11) then
$a_installer[11][0] = "1"
Else
$a_installer[11][0] = "0"
EndIf
Case $check12
If _Ischecked($check12) then
$a_installer[12][0] = "1"
Else
$a_installer[12][0] = "0"
EndIf
Case $check13
If _Ischecked($check13) then
$a_installer[13][0] = "1"
Else
$a_installer[13][0] = "0"
EndIf
Case $check14
If _Ischecked($check14) then
$a_installer[14][0] = "1"
Else
$a_installer[14][0] = "0"
EndIf
Case $check15
If _Ischecked($check15) then
$a_installer[15][0] = "1"
Else
$a_installer[15][0] = "0"
EndIf
Case $check16
If _Ischecked($check16) then
$a_installer[16][0] = "1"
Else
$a_installer[16][0] = "0"
EndIf
Case $check17
If _Ischecked($check17) then
$a_installer[17][0] = "1"
Else
$a_installer[17][0] = "0"
EndIf
Case $check18
If _Ischecked($check18) then
$a_installer[18][0] = "1"
Else
$a_installer[18][0] = "0"
EndIf
Case $check19
If _Ischecked($check19) then
$a_installer[19][0] = "1"
Else
$a_installer[19][0] = "0"
EndIf
Case $check20
If _Ischecked($check20) then
$a_installer[20][0] = "1"
Else
$a_installer[20][0] = "0"
EndIf
Case $check21
If _Ischecked($check21) then
$a_installer[21][0] = "1"
Else
$a_installer[21][0] = "0"
EndIf
Case $check22
If _Ischecked($check22) then
$a_installer[21][0] = "1"
Msgbox(64, "Attention", "Attention MSN est déjà dans le Basique, a ne cocher que si vous voulez MSN seul !")
Else
$a_installer[21][0] = "0"
EndIf
EndSwitch
EndFunc
Func allcheck()
If _Ischecked($checkall) Then
Local $i
GUICtrlSetState($check1,$GUI_CHECKED)
GUICtrlSetState($check2,$GUI_CHECKED)
GUICtrlSetState($check3,$GUI_CHECKED)
GUICtrlSetState($check4,$GUI_CHECKED)
GUICtrlSetState($check5,$GUI_CHECKED)
For $i = 1 to Ubound($a_installer) - 1
$a_installer[$i][0] = "1"
Next
Else
Local $i
GUICtrlSetState($check1,$GUI_UNCHECKED)
GUICtrlSetState($check2,$GUI_UNCHECKED)
GUICtrlSetState($check3,$GUI_UNCHECKED)
GUICtrlSetState($check4,$GUI_UNCHECKED)
GUICtrlSetState($check5,$GUI_UNCHECKED)
For $i = 1 to Ubound($a_installer) - 1
$a_installer[$i][0] = "0"
Next
EndIf
EndFunc
Func allcheck2()
If _Ischecked($checkall2) Then
Local $i
GUICtrlSetState($check5,$GUI_CHECKED)
GUICtrlSetState($check6,$GUI_CHECKED)
GUICtrlSetState($check7,$GUI_CHECKED)
GUICtrlSetState($check8,$GUI_CHECKED)
GUICtrlSetState($check9,$GUI_CHECKED)
GUICtrlSetState($check10,$GUI_CHECKED)
GUICtrlSetState($check11,$GUI_CHECKED)
GUICtrlSetState($check12,$GUI_CHECKED)
GUICtrlSetState($check13,$GUI_CHECKED)
GUICtrlSetState($check14,$GUI_CHECKED)
For $i = 1 to Ubound($a_installer) - 1
$a_installer[$i][0] = "1"
Next
Else
Local $i
GUICtrlSetState($check5,$GUI_UNCHECKED)
GUICtrlSetState($check6,$GUI_UNCHECKED)
GUICtrlSetState($check7,$GUI_UNCHECKED)
GUICtrlSetState($check8,$GUI_UNCHECKED)
GUICtrlSetState($check9,$GUI_UNCHECKED)
GUICtrlSetState($check10,$GUI_UNCHECKED)
GUICtrlSetState($check11,$GUI_UNCHECKED)
GUICtrlSetState($check12,$GUI_UNCHECKED)
GUICtrlSetState($check13,$GUI_UNCHECKED)
GUICtrlSetState($check14,$GUI_UNCHECKED)
For $i = 1 to Ubound($a_installer) - 1
$a_installer[$i][0] = "0"
Next
EndIf
EndFunc
Func install()
$Statut_Checkbox1 = GUICtrlRead($check1)
$Statut_Checkbox2 = GUICtrlRead($check2)
$Statut_Checkbox3 = GUICtrlRead($check3)
$Statut_Checkbox4 = GUICtrlRead($check4)
$Statut_Checkbox5 = GUICtrlRead($check5)
$Statut_Checkbox6 = GUICtrlRead($check6)
$Statut_Checkbox7 = GUICtrlRead($check7)
$Statut_Checkbox8 = GUICtrlRead($check8)
$Statut_Checkbox9 = GUICtrlRead($check9)
$Statut_Checkbox10 = GUICtrlRead($check10)
$Statut_Checkbox11 = GUICtrlRead($check11)
$Statut_Checkbox12 = GUICtrlRead($check12)
$Statut_Checkbox13 = GUICtrlRead($check13)
$Statut_Checkbox14 = GUICtrlRead($check14)
$Statut_Checkbox15 = GUICtrlRead($check15)
$Statut_Checkbox16 = GUICtrlRead($check16)
$Statut_Checkbox17 = GUICtrlRead($check17)
$Statut_Checkbox18 = GUICtrlRead($check18)
$Statut_Checkbox19 = GUICtrlRead($check19)
$Statut_Checkbox20 = GUICtrlRead($check20)
$Statut_Checkbox21 = GUICtrlRead($check21)
$Statut_Checkbox22 = GUICtrlRead($check22)
If $Statut_Checkbox1 = "1" then
Run("\\chrono\Technicien\_Install Basique\Exe Box\SupprXP.exe")
ProcessWaitClose("SupprXP.exe")
EndIf
If $Statut_Checkbox2 = "1" then
Run("\\chrono\Technicien\_Install Basique\Exe Box\BasicXP.exe")
ProcessWaitClose("BasicXP.exe")
EndIf
If $Statut_Checkbox3 = "1" then
Run("\\chrono\Technicien\_Install Basique\Exe Box\OpenXP.exe")
ProcessWaitClose("OpenXP.exe")
EndIf
If $Statut_Checkbox4 = "1" then
Run("\\chrono\Technicien\_Install Basique\Exe Box\NeroXP.exe")
ProcessWaitClose("NeroXP.exe")
EndIf
If $Statut_Checkbox6 = "1" then
Run("\\chrono\Technicien\_Install Basique\Exe Box\AvastXP.exe")
ProcessWaitClose("AvastXP.exe")
ProcessClose("ashSimpl.exe")
EndIf
If $Statut_Checkbox7 = "1" then
Run("\\chrono\Technicien\_Install Basique\Exe Box\EarthXP.exe")
ProcessWaitClose("EarthXP.exe")
ProcessClose("googleearth.exe")
EndIf
If $Statut_Checkbox8 = "1" then
Run("\\chrono\Technicien\_Install Basique\Exe Box\ItunesXP.exe")
ProcessWaitClose("ItunesXP.exe")
EndIf
If $Statut_Checkbox9 = "1" then
Run("\\chrono\Technicien\_Install Basique\Exe Box\VLCXP.exe")
ProcessWaitClose("VLCXP.exe")
EndIf
If $Statut_Checkbox10 = "1" then
Run("\\chrono\Technicien\_Install Basique\Exe Box\WinRARXP.exe")
ProcessWaitClose("WinRARXP.exe")
EndIf
If $Statut_Checkbox11 = "1" then
Run("\\chrono\Technicien\_Install Basique\Exe Box\ChromeXP.exe")
ProcessWaitClose("ChromeXP.exe")
ProcessClose("chrome.exe")
EndIf
If $Statut_Checkbox12 = "1" then
Run("\\chrono\Technicien\_Install Basique\Exe Box\SkypeXP.exe")
ProcessWaitClose("SkypeXP.exe")
EndIf
If $Statut_Checkbox13 = "1" then
Run("\\chrono\Technicien\_Install Basique\Exe Box\PhotoFiltre.exe")
ProcessWaitClose("PhotoFiltre.exe")
EndIf
If $Statut_Checkbox14 = "1" then
Run("\\chrono\Technicien\_Install Basique\Exe Box\Picasa3.exe")
ProcessWaitClose("Picasa3.exe")
ProcessWaitClose("Picasa.exe")
EndIf
If $Statut_Checkbox15 = "1" then
Run("\\chrono\Technicien\_Install Basique\Exe Box\Office2003.exe")
ProcessWaitClose("Office2003.exe")
EndIf
If $Statut_Checkbox16 = "1" then
Run("\\chrono\Technicien\_Install Basique\Exe Box\Office2000.exe")
ProcessWaitClose("Office2000.exe")
EndIf
If $Statut_Checkbox17 = "1" then
Run("\\chrono\Technicien\_Install Basique\Exe Box\Works9.exe")
ProcessWaitClose("Works9.exe")
EndIf
If $Statut_Checkbox18 = "1" then
Run("\\chrono\Technicien\_Install Basique\Exe Box\Works85.exe")
ProcessWaitClose("Works85.exe")
EndIf
If $Statut_Checkbox19 = "1" then
Run("\\chrono\Technicien\_Install Basique\Exe Box\tagueurXP.exe")
ProcessWaitClose("tagueurXP.exe")
EndIf
If $Statut_Checkbox20 = "1" then
Run("\\chrono\Technicien\_Install Basique\Exe Box\BitDef2009.exe")
ProcessWaitClose("BitDef2009.exe")
EndIf
If $Statut_Checkbox21 = "1" then
Run("\\chrono\Technicien\_Install Basique\Exe Box\KS2009.exe")
ProcessWaitClose("KS2009.exe")
EndIf
If $Statut_Checkbox5 = "1" then
Run("\\chrono\Technicien\_Install Basique\Exe Box\FireFoxXP.exe")
ProcessWaitClose("FireFoxXP.exe")
EndIf
If $Statut_Checkbox22 = "1" then
Run("\\chrono\Technicien\_Install Basique\Exe Box\msn.exe")
ProcessWaitClose("msn.exe")
EndIf
MsgBox(64, "GUI", "FIN D'INTERVENTION AUTOMATIQUE")
ProcessClose("Install Basic XP.exe")
EndFunc
Func quitter()
Exit
EndFunc
Func _Ischecked($control)
Return BitAND(GUICtrlRead($control), $GUI_CHECKED) = $GUI_CHECKED
EndFunc