Variable d'environnement VBS ?
Bonjour tout le monde,
J'ai fait un script tout simple pour exécuter un exe, mais la variable d'environnement pose un problème... Qu'elle est mon erreur ?
Voici mon script
Code:
1 2 3 4 5 6 7
| Dim WshShell, oProgramfiles
Set WshShell = WScript.CreateObject("WScript.Shell")'** Création de l'objet Shell **
oProgramfiles = WshShell.ExpandEnvironmentStrings("%PROGRAMFILES%")
'lance le fichier contact
Set aContact = WScript.CreateObject("WScript.Shell")
aContact.Run oProgramfiles & ("\Internet Explorer\iexplore.exe") |
:aie:?
Merci à vous !