Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

ENI TORRENT DEPLOY (V2)

wackou Jun 20th, 2014 2,051 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. #include <ButtonConstants.au3>
  2. #include <GUIConstantsEx.au3>
  3. #include <GUIListBox.au3>
  4. #include <StaticConstants.au3>
  5. #include <WindowsConstants.au3>
  6. #include <GuiListView.au3>
  7. #include <MsgBoxConstants.au3>
  8. #include <ListviewConstants.au3>
  9. ;~ recupere les salles et torrent dispo
  10. Run("powershell.exe .\SCRIPTS\start.ps1")
  11. ;~ installation du logo
  12. FileInstall("logo.jpg", @ScriptDir & "\logo.jpg")
  13. ;~ on attend que l'extraction soit finis
  14. Sleep (5000)
  15. ;~ definition de la GUI
  16. $Form = GUICreate("ENI TORRENT DEPLOY", 409, 359, 223, 143)
  17. $LOGO = GUICtrlCreatePic(".\logo.jpg", 16, 8, 100, 100)
  18. ;~ BOUTTONS
  19. $LANCER = GUICtrlCreateButton("LANCER", 272, 216, 115, 65)
  20. $QUITTER = GUICtrlCreateButton("QUITTER", 152, 80, 75, 25)
  21. $PROPOS = GUICtrlCreateButton("A PROPOS", 152, 24, 75, 25)
  22. $TEXTE = GUICtrlCreateLabel("Sélectionner une salle puis un cours", 232, 56, 174, 17)
  23. GUICtrlSetBkColor(-1, 0xFF0000)
  24. ;~ LISTES
  25. $salles = GUICtrlCreateList("", 12, 164, 100, 188)
  26. $cours = GUICtrlCreateList("", 156, 164, 100, 188)
  27. ;~ LECTURE FICHIERS
  28. $sData = "|" & StringReplace(FileRead(@ScriptDir & ".\TEMP\salles.txt"), @CRLF, "|")
  29. $tData = "|" & StringReplace(FileRead(@ScriptDir & ".\TEMP\torrent.txt"), @CRLF, "|")
  30. ;~ TEXTES
  31. $Label_salles = GUICtrlCreateLabel("Salles disponibles", 16, 144, 87, 17)
  32. $Label_cours = GUICtrlCreateLabel("Cours disponibles", 160, 144, 86, 17)
  33.  
  34. ;~ REMPLIS LES LISTES
  35. GUICtrlSetData($salles, $sData)
  36. GUICtrlSetData($cours, $tData)
  37. GUISetState(@SW_SHOW)
  38.  
  39.  
  40. While 1
  41.         $nMsg = GUIGetMsg()
  42.         Switch $nMsg
  43.                 Case $GUI_EVENT_CLOSE, $QUITTER
  44.                         Exit
  45.                 Case $LANCER
  46.                         $Ssalles = GUICtrlRead($salles)
  47.                         $Scours = GUICtrlRead($cours)
  48.                         run("powershell.exe "".\SCRIPTS\computers.ps1"" '"  & $Ssalles & "'") ;~on recupere les PC de la salle
  49.                         Sleep (2000)
  50.                         run("powershell.exe "".\SCRIPTS\deploiement.ps1"" '"  & $Scours & "'") ;~on commence le deploiement
  51.                  Case $PROPOS
  52.                         MsgBox (0,"A propos","Créé par WACKOU (www.wackou.com)")
  53.         EndSwitch
  54. WEnd
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top