Skip to main content
Participating Frequently
May 19, 2016
Question

Flash Player Deploy - "IsIllegalUpgrade" returns "3"

  • May 19, 2016
  • 1 reply
  • 2351 views

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

This topic has been closed for replies.

1 reply

_maria_
Legend
May 19, 2016

I'm not familiar with Matrix42, what does it use (reg entry, control panel, ??) to uninstall the previous version?

Did any of the systems that are failing have a beta version installed previous to deploying 21.0.0.242?

Please upload the entire MSI verbose log file and the FlashInstall.log file from an impacted system to cloud.acrobat.com/send using the instructions How to share a document .  Post the link to the uploaded files in your reply.


The FlashInstall.log file is saved at C:\Windows\System32\Macromed\Flash.  If this is a 64-bit OS, there's another FlashInstall.log file saved at C:\Windows\SysWOW64\Macromed\Flash.  Both files are needed from a 64-bit OS.

Participating Frequently
May 20, 2016

No, we didn't deploy any beta-versions of Flash-Player, the second-latest version was 21.0.0.182 (official, not beta).

I uploaded the 3 requested  files to

https://files.acrobat.com/a/preview/e17aafbd-bdd6-460f-9d02-28087d0229db

The MSI verbose log is called "FP_Test.log".

But I think the more important log is the one, that is created in C:\Windows\temp:

=== Logging started: 20.05.2016  11:37:02 ===

Action start 11:37:02: INSTALL.

Action start 11:37:02: ISSetupFilesExtract.

Action ended 11:37:02: ISSetupFilesExtract. Return value 1.

Action start 11:37:02: ISSetAllUsers.

Action ended 11:37:02: ISSetAllUsers. Return value 1.

Action start 11:37:02: AppSearch.

Action ended 11:37:02: AppSearch. Return value 1.

Action start 11:37:02: LaunchConditions.

Action ended 11:37:02: LaunchConditions. Return value 1.

Action start 11:37:02: FindRelatedProducts.

Action ended 11:37:02: FindRelatedProducts. Return value 1.

Action start 11:37:02: ValidateProductID.

Action ended 11:37:02: ValidateProductID. Return value 1.

Action start 11:37:02: MakePropsAvailable.

Action ended 11:37:02: MakePropsAvailable. Return value 1.

Action start 11:37:02: IsIllegalUpgrade.

Action ended 11:37:02: IsIllegalUpgrade. Return value 3.

Action ended 11:37:02: INSTALL. Return value 3.

MSI (s) (0C:F8) [11:37:02:415]: Product: Adobe Flash Player 21 ActiveX -- Installation operation failed.

MSI (s) (0C:F8) [11:37:02:420]: Das Produkt wurde durch Windows Installer installiert. Produktname: Adobe Flash Player 21 ActiveX. Produktversion: 21.0.0.242. Produktsprache: 1033. Hersteller: Adobe Systems Incorporated. Erfolg- bzw. Fehlerstatus der Installation: 1603.

=== Logging stopped: 20.05.2016  11:37:02 ===

I think, this is the reason why the MSI aborts (bold lines). The one-million-dollar-question here is, what this script (IsIllegalUpgrade.vbs) does and where it gets its values from.

Here is the script (I appended .txt to the end):

https://files.acrobat.com/a/preview/1a927c7d-9086-40d7-9c99-e3dc740f97a9

In my opinion, we have 2 possibilities here:

- The script reads some wrong information from the msi (a greater version number than 21.0.0.242)

- The script reads "bad information" and the calculation at the end of the script does something like a divison by zero.

I tried to run the script in a DOS-box with cscript.exe...unfortunately no output.

Just to be sure, I tried this procedure on a test machine:

- Open the Flash-Player-MSI with SuperOrca

- Delete any line that contains "IsIllegalUpgrade"

- Save msi

- Deployed it

===> THAT WORKS, no errors

That could be a workaround, at least for this version. But I am sure, I will have exactly the same problem when I deploy the next version of Flash-Player...

Best regards,

Markus

_maria_
Legend
May 20, 2016

Hi,

Thanks for providing the files.  We are reviewing the log files.  How does Matrix42 attempt to uninstall the currently installed version?

On the systems that fail to upgrade, is 21.0.0.182 still installed?  Or is the system left with Flash Player installed?

The script checks if the installation is a downgrade attempt, if it is, the installation stops:

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


And as you've concluded, for some reason, it thinks the version being installed is lower than what is currently installed.  We have seen similar situations in the past, where uses have deleted the previous MSI install files saved in the server cache, that are used to remove installed versions.  This is usually with SCCM. I'm not at all familiar with Matrix42 and don't now the process it uses to uninstall software.

--

Maria