j'ai créé des GUI avec différents boutons (chacun me permettant de réaliser une action particulière)
ma première GUI:
Code : Tout sélectionner
#include <GUIConstants.au3>
GUICreate("Préparation STATION XP_START - by Zoub") ; crée une boite de dialogue avec texte centré
Opt("GUICoordMode",2)
$Button_1 = GUICtrlCreateButton ("1 - Actions PRE-CLONAGE",10, 3, 180)
$Button_2 = GUICtrlCreateButton ("2 - Actions POST-CLONAGE", -180, 3, 180)
$Button_3 = GUICtrlCreateButton ("3 - Installation applications", -180, 3, 150)
$Button_4 = GUICtrlCreateButton ("4 - Kaspersky", -150, 3, 100)
$Button_5 = GUICtrlCreateButton ("5 - TCP IP", -100, 3, 100)
GUISetState () ; will display an dialog box with 2 button
; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $Button_1
#include <Process.au3>
; ouverture fenetre PRE-CLONAGE
RunWait ("C:\temp\scripts auto it\preclone.exe")
Case $msg = $Button_2
#include <Process.au3>
; ouverture fenetre POST-CLONAGE
RunWait ("C:\temp\scripts auto it\postclone.exe")
Case $msg = $Button_3
#include <Process.au3>
; ouverture fenetre INSTALLATION APPLIS
RunWait ("C:\temp\scripts auto it\installapp.exe")
Case $msg = $Button_4
#include <Process.au3>
; ouverture fenetre KASPERSKY
RunWait ("C:\temp\scripts auto it\install kav.exe")
Case $msg = $Button_5
#include <Process.au3>
; ouverture fenetre TCPIP
RunWait ("C:\temp\scripts auto it\tcpip.exe")
EndSelect
Wend
Code : Tout sélectionner
#include <GUIConstants.au3>
GUICreate("Préparation STATION XP_PRECLONE - by Zoub") ; crée une boite de dialogue avec texte centré
; ============================================================================================================
; Sortie station du domaine NT: Arret Auto + Autologon au prochain reboot sur compte "Administrateur" local
; Suppression Pagefile: reboot auto + Autologon au prochain reboot sur compte "Administrateur" local + suppression fichier
; Preparateur ESU:
; ============================================================================================================
Opt("GUICoordMode",2)
$Button_1 = GUICtrlCreateButton ("1 - Modification ID station + NEWSID", 10, 3, 200)
$Button_2 = GUICtrlCreateButton ("2 - Execution fichier modif Autologon",-200, 3, 200)
......
$Button_14 = GUICtrlCreateButton ("14 - Retour", -80, 3, 80)
GUISetState () ; will display an dialog box with 2 button
; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $Button_1
#include <Process.au3>
; Modification de L'ID de la station + Newsid
; reboot automatique
; autologon sur compte "Administrateur" local
RunWait ("C:\temp\clone\id.bat")
; tempo 500 ms
Sleep(500)
Case $msg = $Button_2
#include <Process.au3>
; Modification Autologon1.reg
; Modification Autologon2.reg
; Modification Sufdns.reg
; Modification mdpadmin.bat
; Modification compte.bat
; Modification mdpdaip.bat
; Modification integ1.bat
; Modification integ2.bat
; Modification sortie.bat
RunWait ("C:\temp\clone\modif autologon.exe")
; tempo 500 ms
Sleep(500)
............
Case $msg = $Button_14
#include <Process.au3>
; fermeture fenetre PRECLONE
RunWait ("C:\temp\killpreclone.bat")
EndSelect
Wend
j'ai essayé "GUIDelete()": ça ferme bien la GUI en cours mais aprés je ne peux plus fermer la première GUI
pour le moment j'ai trouvé un utilitaire sur le oueb qui me tue le process de la seconde GUI mais je préfèrerai faire ça par AUTOIT si c'est possible
merci pour vous réponse
zouzou (débutant chez AUTOIT)