Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Option Explicit
- '
- ' Author : EminoMeneko
- ' Date : 2011年12月04日 EST
- ' Script Name : Age of Empires II : The Conquerors Extension Launcher for Windows 7
- ' Version : 1.0
- ' Description :
- ' AoE2 Launcher for Win7
- ' Tue le processus Explorer.exe pendant que l'on joue afin de corriger les
- ' graphismes et relances celi-ci automatiquement à la fermeture du jeu.
- 'Editez le chemin si nécessaire
- Dim Chemin, Executable, Complet
- Chemin = "C:\Program Files (x86)\Microsoft Games\Age of Empires II\age2_x1\"
- 'Chemin = "C:\Program Files\Microsoft Games\Age of Empires II\age2_x1\"
- Executable = "age2_x1.exe"
- Complet = Chemin & Executable
- 'On vérifie la présence d'espaces et on entoure de multiples guillements si nécessaire.
- If InStr(Complet, " ") > 0 Then Complet = """" & Complet & """"
- ' Création d'un objet Shell
- Dim WshShell
- Set WshShell = WScript.CreateObject("WScript.Shell")
- ' Suppression du processus Explorer
- WshShell.Run "taskkill /F /IM explorer.exe", 1, True
- 'Lancement bloquant du jeu
- 'MsgBox "Chemin appelé : " & Complet, 0, "Lancement du jeu"
- WshShell.Run Complet, 1, True
- ' Relancement du processus Explorer.exe
- WshShell.Run "Explorer.exe", 1, False
- ' Libération de l'objet Shell
- Set WshShell = Nothing
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement