0

I have an WiX-based installer for an agent that gets pushed out to remote machines and runs silently. On one particular machine, I got error 1704 because an installation of the .NET Framework 4.5.2 was suspended:

MSI (s) (34:E0) [11:13:38:561]: Note: 1: 1704 2: Microsoft .NET Framework 4.5.2 
MSI (s) (34:E0) [11:13:38:561]: Product: [MyProduct] -- Error 1704. An installation for Microsoft .NET Framework 4.5.2 is currently suspended.  You must undo the changes made by that installation to continue.  Do you want to undo those changes?

My installer does nothing with the .NET Framework other than check for its existence in an install condition. But because the installer is run silently, it just continues after encountering this error, which would normally be a messagebox shown to the user. This resulted in the .NET Framework 4.5.2 being rolled back (effectively uninstalling it) and breaking all sorts of things.

Is there a way of aborting the install if error 1704 (or any particular error) is encountered?

Edit: The complete command line for MSIEXEC.exe is as follows: MSI (s) (BC:38) [17:25:21:859]: Command Line: FORCESILENTUI=1 REBOOT=ReallySuppress ALLUSERS=1 MSIRESTARTMANAGERCONTROL=Disable STAGINGPATH=C:\windows\Temp CURRENTDIRECTORY=C:\windows\system32 CLIENTUILEVEL=3 CLIENTPROCESSID=5540

Steve Dinn
  • 31
  • 5
  • That is news to me, can we have the full msiexec.exe command line you used to install silently please? – Stein Åsmul Jan 10 '19 at 16:07
  • In your log file - if available - search for "command line" - it should show all property values at least. Or just look in the batch file used to install with - obviously. – Stein Åsmul Jan 10 '19 at 17:13
  • This sounds strange to me since I would expect your setup to just end like what is reported here: [Roll back suspended .MSI install from command-line](https://serverfault.com/questions/496109/roll-back-suspended-msi-install-from-command-line). Are you sure rollback was triggered? **Maybe that was a messed up machine in the first place?** Perhaps they have something weird in their tools or environment where you deploy that does this rollback auto-magically? – Stein Åsmul Jan 11 '19 at 06:25
  • I've added the command line up in the original post. Most of the parameters are properties that are used in custom actions. I traced down the "FORCESILENTUI" usage and found it to be only to stop showing messageboxes that the custom actions would show. I don't believe it has any effect on behaviour when encountering errors, and that specific error is not encountered during a custom action. – Steve Dinn Jan 11 '19 at 19:51
  • That is very interesting. It is conceivable that the MSIRESTARTMANAGERCONTROL set to Disabled could trigger this behavior. This is because it disables the Restart Manager feature and relies on the FilesInUse dialog to handle file overwrite warnings - and also a number of other technical details. Will try to have a look when I get a chance. In the mean time, [some facts about the Restart Manager](https://stackoverflow.com/a/50935008/129130) (mid page). – Stein Åsmul Jan 12 '19 at 05:08
  • Never ended up finding a good WiX-based solution to this. Whenever I ran the installer with no UI, it always rolled back the suspended install. After all was said and done, I kind of 'cheated', and implemented a custom action to check the 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\InProgress' key for any in-progress installs, and to fail the install if any were found. – Steve Dinn Jan 15 '19 at 18:34

0 Answers0