Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stopping an installation if previous version is detected 1

Status
Not open for further replies.

Lorrec

Technical User
Sep 5, 2007
8
0
0
US
I am looking to install Adobe Reader 8 on systems but I want to exclude any system that currently have Adobe 6/7 Std. and Pro. I am using a script supplied by a co-worker. So far, I have been able to detect the previous Adobe versions but I am not sure how to cancel the installation once they are detected. The installation just continues on and installs Adobe Reader 8. Below is my detection script for Reader 7. Thank you for any assistance.

If colSoftware.Count > 0 Then
For Each objSoftware in colSoftware
Wscript.Echo objSoftware.Caption & vbtab & _
objSoftware.Version
LogInfo sLogFile, "WARNING - Found " & strARPName1 & " listed in Add/Remove Programs...a previous install of this application already exists", LogTypeWarning
LogInfo sLogFile, "WARNING - The existing install of " & strARPName & " will now be reinstalled.", LogTypeWarning
Next
LogInfo sLogFile, "No previous install of " & strARPName1 & " exists on this computer...continuing with current installation", LogTypeInfo
End If

Set colSoftware = Nothing later

intAppnum=1
strComputer = "." 'this computer
 
If colSoftware.Count > 0 Then
WScript.Quit ' if you want the script to terminate
Else
'commands to install Adobe 8
End If


--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
Thank you for the quick response.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top