So I'm sure I've used this logic before and never had a problem.  Below is the part of my script which is causing me problems.  So the EV install bombs out with a 1603 code, confirmed in the message box, the script then goes on and shows the "successful" message box.  It should in theory skip this and quit after the Else statement.  Am I missing something really obvious here?  Why is the If Statement returning True when x = 1603?

Dim strVersion, i, x
Set WshShell = WScript.CreateObject("WScript.Shell")
strComputer = "."

' Install Enterprise Vault and return exit code
x = WshShell.Run("msiexec /i Symantec_Enterprise_Vault_Outlook_Add-in-en.msi /qb!",1,True)
msgbox x
' If Enterprise Vault installed successfully Check IE
If x = 0 OR 3010 Then
    msgbox "successful"
    msgbox x


msgbox "quit without installing anything"

End If


Answer Summary:
x = 0 OR x=3010 should be used in If condition instead of x = 0 OR 3010
0 Comments   [ - ] Hide Comments


Please log in to comment

Answer this question or Comment on this question for clarity



Condtion should be like this..

If x = 0 OR x=3010 Then

Answered 09/04/2012 by: jagadeish
Red Belt

  • I new I was missing something stupid... It was a long day!!

    Cheers Jagadeish :-)
Please log in to comment