Trying to uninstall 2 apps with 1x .vbs script...
It is uninstalling one of the applications that i want to uninstall, but not the other.......its not to do with the uninstall string ( if i swap over the strings then it uninstalls the other app fine but again......its not doing both of the uninstalls ).
Can anyone spot what im misisng in my script?
Can anyone spot what im misisng in my script?
Option Explicit
On Error Resume Next
Dim oShell, sUninstallString
Set oShell = CreateObject("WScript.Shell")
Const UNINSTALLPATH = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
Const PRODCODE = "InstallShield_{8D3D93DA-B0C4-4C56-8FB9-67CB050EB15D}"
Const PRODCODE2 ="{6257E290-5E8E-11D4-9B8D-00D0B72459DD}"
Const PACKAGE = "Setup.exe"
Uninstall
Install
Set oShell = Nothing
WScript.Quit
'*****************************************************************************************
'Check for existance of Rits Client and if present uninstall it.
'*****************************************************************************************
Sub Uninstall()
On Error Resume Next
Err.Clear
sUninstallString = oShell.RegRead (UNINSTALLPATH & PRODCODE & "\UninstallString")
If err.number = 0 Then
oShell.Run "C:\Program Files\Common Files\InstallShield\Driver\8\Intel 32\IDriver.exe" & """/M{8D3D93DA-B0C4-4C56-8FB9-67CB050EB15D}""", 0,True
End If
sUninstallString = ""
sUninstallString = oShell.RegRead (UNINSTALLPATH & PRODCODE2 & "\UninstallString")
If err.number = 0 Then
oShell.Run "RunDll32 C:\PROGRA~1\COMMON~1\INSTAL~1\engine\6\INTEL3~1\Ctor.dll,LaunchSetup " & """C:\Program Files\InstallShield Installation Information\{6257E290-5E8E-11D4-9B8D-00D0B72459DD}\Setup.exe""" & " UNINST /S /f1""C:\Packages\RitsClient\uninst.iss""", 0,True
End If
End Sub
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
AngelD
18 years ago
Posted by:
AngelD
18 years ago
Hi dbowe,
hmmm thought you wrote kix ... didn't see the it was vbscript first so skip my comment on shell.
I may be due to that the main process spawns a child process and then drops but the child process is still running and interfere with the next executed process even if bWaitOnReturn is set to True. You may need to launch this in another way and check if the child process also has finished it's execution.
hmmm thought you wrote kix ... didn't see the it was vbscript first so skip my comment on shell.
I may be due to that the main process spawns a child process and then drops but the child process is still running and interfere with the next executed process even if bWaitOnReturn is set to True. You may need to launch this in another way and check if the child process also has finished it's execution.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.