Dans un premier temps, je cherche à tester... Le premier problème est la récupération du code retour de l'exécution d'une commande!
Il n'aime pas particulièrement la commande suivante :
Set err1 = WshShell.Run "REG QUERY HKEY_LOCAL_MACHINE\Software\Uninst", now
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| Option Explicit
OSCheck()
Sub OSCheck()
Dim err1, WshShell, vbHide, Shell
Set WshShell = WScript.CreateObject("WScript.Shell" )
Set err1 = WshShell.Run "REG QUERY HKEY_LOCAL_MACHINE\Software\Uninst", now
If err1 = 1 Then
MsgBox "DESINSTALLATION..."
wscript.sleep 200
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegWrite "HKLM\Software\Citrix\Uninst",now
MsgBox "DESINSTALLATION TERMINEE"
Else
wscript.echo "script deja execute"
wscript.sleep 200
WScript.Quit
End if
End Sub |
Merci de bien vouloir m'apporter votre aide
Partager