Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. Option Explicit
  2. '
  3. '   Author :    EminoMeneko
  4. '   Date :  2011年12月04日 EST
  5. '   Script Name :   Age of Empires II : The Conquerors Extension Launcher for Windows 7
  6. '   Version :   1.0
  7. '   Description :
  8. '       AoE2 Launcher for Win7
  9. '   Tue le processus Explorer.exe pendant que l'on joue afin de corriger les
  10. '   graphismes et relances celi-ci automatiquement à la fermeture du jeu.
  11.  
  12. 'Editez le chemin si nécessaire
  13. Dim Chemin, Executable, Complet
  14. Chemin = "C:\Program Files (x86)\Microsoft Games\Age of Empires II\age2_x1\"
  15. 'Chemin = "C:\Program Files\Microsoft Games\Age of Empires II\age2_x1\"
  16. Executable = "age2_x1.exe"
  17. Complet = Chemin & Executable
  18. 'On vérifie la présence d'espaces et on entoure de multiples guillements si nécessaire.
  19. If InStr(Complet, " ") > 0 Then Complet = """" & Complet & """"
  20.  
  21. ' Création d'un objet Shell
  22. Dim WshShell
  23. Set WshShell = WScript.CreateObject("WScript.Shell")
  24.  
  25. ' Suppression du processus Explorer
  26. WshShell.Run "taskkill /F /IM explorer.exe", 1, True
  27.  
  28. 'Lancement bloquant du jeu
  29. 'MsgBox "Chemin appelé : " & Complet, 0, "Lancement du jeu"
  30. WshShell.Run  Complet, 1, True
  31.  
  32. ' Relancement du processus Explorer.exe
  33. WshShell.Run "Explorer.exe", 1, False
  34.  
  35. ' Libération de l'objet Shell
  36. Set WshShell = Nothing