Flash Player Deploy - "IsIllegalUpgrade" returns "3"
Hi everybody,
I'm deploying software on about 200 Windows 7 pcs using "Matrix42 - Empirum". So far, deploying Adobe Flash Player was quite easy, I downloaded the *.msi and deployed it with (more or less) this command line:
Call MsiExec /I "%SRC%\install_flash_player_21.0.0.242_active_x.msi" REBOOT=REALLYSUPPRESS ARPSYSTEMCOMPONENT=1 /qb-! /Li "%MSILogFile%"
After that, I copied "mms.cfg" to "C:\Windows\System32\Macromed\Flash" and everything was fine.
The second latest version of Flash Player I deployed was 21.0.0.182. Everything was fine until I started rolling out 21.0.0.242. When you roll out software via Matrix42, it looks if an older version of this software is installed, if yes, it uninstalls the old version first and installs the new version then.
During the last deploy, a few pcs threw an error while installing 21.0.0.242. I searched through the logs and noticed that a "procedure" named "IsIllegalUpgrade" returns a value "3", instead of "1" like the rest of the procedures. I found out, that the installer creates a script named "IsIllegalUpgrade.vbs", runs it and deletes it afterwards. I managed to keep the script and looked ad it, it just compares the old an new version of Flash Player and returns a value to the installer. In my case, the script returns "3", which causes the installer to abort. At this point, the uninstaller has already removed the old version (182), no Flash Player is installed on the pc.
Unfortunately it's not visible in the script WHERE it reads the values from. When I run the script manually, nothing happens.
Does anybody know this error or can tell me, WHERE the script gets its value from..?
Thanks in advance,
Markus
LOGFILE:
=== Logging started: 18.05.2016 14:04:56 ===
Action start 14:04:56: INSTALL.
Action start 14:04:56: ISSetAllUsers.
Action ended 14:04:56: ISSetAllUsers. Return value 1.
Action start 14:04:56: AppSearch.
Action ended 14:04:56: AppSearch. Return value 1.
Action start 14:04:56: LaunchConditions.
Action ended 14:04:56: LaunchConditions. Return value 1.
Action start 14:04:56: FindRelatedProducts.
Action ended 14:04:56: FindRelatedProducts. Return value 1.
Action start 14:04:56: ValidateProductID.
Action ended 14:04:56: ValidateProductID. Return value 1.
Action start 14:04:56: MakePropsAvailable.
Action ended 14:04:56: MakePropsAvailable. Return value 1.
Action start 14:04:56: IsIllegalUpgrade.
Action ended 14:04:56: IsIllegalUpgrade. Return value 3.
Action ended 14:04:56: INSTALL. Return value 3.
MSI (s) (68:94) [14:04:56:837]: Product: Adobe Flash Player 21 NPAPI -- Installation operation failed.
MSI (s) (68:94) [14:04:56:837]: Das Produkt wurde durch Windows Installer installiert. Produktname: Adobe Flash Player 21 NPAPI. Produktversion: 21.0.0.242. Produktsprache: 1033. Hersteller: Adobe Systems Incorporated. Erfolg- bzw. Fehlerstatus der Installation: 1603.
=== Logging stopped: 18.05.2016 14:04:56 ===
HERE IS THE SCRIPT (IsIllegalUpgrade.vbs):
Function LeftShift(ByVal Num, ByVal ShiftBy)
LeftShift = Num * (2 ^ ShiftBy)
End Function
Function ConvertVersionStringToArrayOfTwoLongs(ByVal VersionString)
'Converts a dotted quad version string into an array of two longs for easier comparisons
Dim VersionNumbers, VersionParts, Counter
VersionNumbers = Array(0, 0, 0, 0)
VersionStrings = Split(VersionString, ".")
For Counter = 0 To UBound(VersionStrings)
VersionNumbers(Counter) = CLng(VersionStrings(Counter))
Next
Dim MajorDotMinor, BugFixDotBuild
'Combine the Major and Minor numbers, then combine the BugFix and Build numbers
MajorDotMinor = LeftShift(VersionNumbers(0), 16) + VersionNumbers(1)
BugFixDotBuild = LeftShift(VersionNumbers(2), 16) + VersionNumbers(3)
ConvertVersionStringToArrayOfTwoLongs = Array(MajorDotMinor, BugFixDotBuild)
End Function
Function CompareTwoVersionStrings(ByVal VersionString1, ByVal VersionString2)
'Returns -1 if VersionString1 < VersionString2
'Returns 0 if VersionString1 = VersionString2
'Returns 1 if VersionString1 > VersionString2
Dim ConvertedVersion1, ConvertedVersion2, ReturnValue
ConvertedVersion1 = ConvertVersionStringToArrayOfTwoLongs(VersionString1)
ConvertedVersion2 = ConvertVersionStringToArrayOfTwoLongs(VersionString2)
If ConvertedVersion1(0) < ConvertedVersion2(0) Then
ReturnValue = -1
ElseIf ConvertedVersion1(0) = ConvertedVersion2(0) Then
If ConvertedVersion1(1) < ConvertedVersion2(1) Then
ReturnValue = -1
ElseIf ConvertedVersion1(1) = ConvertedVersion2(1) Then
ReturnValue = 0
Else
ReturnValue = 1
End If
Else
ReturnValue = 1
End If
CompareTwoVersionStrings = ReturnValue
End Function
Sub LogMessage(msg)
Dim rec
Set rec = Session.Installer.CreateRecord(1)
rec.StringData(0) = "Error : " & msg
Session.Message &H01000000,rec
End Sub
Function IsIllegalUpgrade()
Dim ProductVersion, PreviousVersion, ReturnValue
ProductVersion = Session.Property("ProductVersion")
PreviousVersion = Session.Property("PREVIOUS_VERSION")
ReturnValue = CompareTwoVersionStrings(ProductVersion, PreviousVersion)
If ReturnValue >= 0 Then
IsIllegalUpgrade = 0 'This tells the MSI that the upgrade should be allowed
Else
LogMessage("The version of the Player that you are trying to install is lower than what is currently installed.")
IsIllegalUpgrade = 3 'This tells the MSI to abort
End If
End Function