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?


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

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Try use shell instead of run.

Run: does not wait for the program to complete. Script execution continues immediately.
Shell: Script execution is stopped until the program exits.
Answered 09/05/2006 by: AngelD
Red Belt

Please log in to comment
0
So just swap the oshell.run with oshell.shell?
Answered 09/05/2006 by: dbowe
Orange Belt

Please log in to comment
0
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.
Answered 09/06/2006 by: AngelD
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity