rickmorrison
MIS
I am trying to find out if anyone knows a way for me to verify a software version through use of a VBScript. For example, I am in the process of rolling out Adobe updates for Adobe Professional and Standard. What I would like to be able to do is incorporate code into my "rollout" script to make sure that the updates are not rolled out unless Adobe version 7.0.5 is detected. Once detected then updates 7.0.7, 7.0.8 and 7.0.9 can be rolled out. Can anyone help me with this request? Here is the script I have so far:
<package>
<job id="vbs">
<script language="VBScript">
Set oShell = CreateObject("WScript.Shell")
strLaunchCmd = "msiexec.exe /i AcroStan.msi TRANSFORMS=AcroStan.mst /qb- REBOOT=ReallySuppress"
oShell.CurrentDirectory = "J:\APPS\Acrobat 7 Standard MSI"
'intRetVal = oShell.Run(strLaunchCmd,1,True)
strLaunchCmd = "msiexec.exe /p update707std.msp /qb- REBOOT=ReallySuppress Reinstallmode=omus reinstall=all"
intRetVal = oShell.Run(strLaunchCmd,1,True)
strLaunchCmd = "msiexec.exe /p update708std.msp /qb- REBOOT=ReallySuppress Reinstallmode=omus reinstall=all"
intRetVal = oShell.Run(strLaunchCmd,1,True)
strLaunchCmd = "msiexec.exe /p update709std.msp /qb- REBOOT=ReallySuppress Reinstallmode=omus reinstall=all"
intRetVal = oShell.Run(strLaunchCmd,1,True)
If intRetVal = 3010 Then
MsgBox "Installation is finished but you need a reboot!"
ElseIf intRetVal = 1641 Then
' Reboot is started by MSI (ForceReboot action)
' and installation will continue after boot
WScript.Sleep 30000
ElseIf intRetVal = 0 Then
MsgBox "Installation was successful"
Else
MsgBox "Installation failed - Error #" & intRetVal
End if
</script>
</job>
</package>
<package>
<job id="vbs">
<script language="VBScript">
Set oShell = CreateObject("WScript.Shell")
strLaunchCmd = "msiexec.exe /i AcroStan.msi TRANSFORMS=AcroStan.mst /qb- REBOOT=ReallySuppress"
oShell.CurrentDirectory = "J:\APPS\Acrobat 7 Standard MSI"
'intRetVal = oShell.Run(strLaunchCmd,1,True)
strLaunchCmd = "msiexec.exe /p update707std.msp /qb- REBOOT=ReallySuppress Reinstallmode=omus reinstall=all"
intRetVal = oShell.Run(strLaunchCmd,1,True)
strLaunchCmd = "msiexec.exe /p update708std.msp /qb- REBOOT=ReallySuppress Reinstallmode=omus reinstall=all"
intRetVal = oShell.Run(strLaunchCmd,1,True)
strLaunchCmd = "msiexec.exe /p update709std.msp /qb- REBOOT=ReallySuppress Reinstallmode=omus reinstall=all"
intRetVal = oShell.Run(strLaunchCmd,1,True)
If intRetVal = 3010 Then
MsgBox "Installation is finished but you need a reboot!"
ElseIf intRetVal = 1641 Then
' Reboot is started by MSI (ForceReboot action)
' and installation will continue after boot
WScript.Sleep 30000
ElseIf intRetVal = 0 Then
MsgBox "Installation was successful"
Else
MsgBox "Installation failed - Error #" & intRetVal
End if
</script>
</job>
</package>