Error on ManagedUI in XP

Jul 18, 2016 at 3:42 PM
Edited Jul 18, 2016 at 3:44 PM
Good day.
If you create msi using code like this
projectRT.ManagedUI = new ManagedUI();
project.ManagedUI.InstallDialogs.Add<WelcomeDialog>()
                                            .Add<LicenceDialog>()
                                            .Add<SetupTypeDialog>()
                                            .Add<FeaturesDialog>()
                                            .Add<InstallDirDialog>()
                                            .Add<ProgressDialog>()
                                            .Add<ExitDialog>();

            project.ManagedUI.ModifyDialogs.Add<MaintenanceTypeDialog>()
                                           .Add<FeaturesDialog>()
                                           .Add<ProgressDialog>()
                                           .Add<ExitDialog>();
when you install it on XP, you will get "silent" installations
also e.ManagedUIShell in Project_UILoaded is empty only in xp

Video
http://screencast.com/t/uh6hMNqF
Test project
https://dl.dropboxusercontent.com/u/50919138/WixSharp%20Setup6.zip
Jul 18, 2016 at 4:52 PM
Hi Satrn,

Can you please test if you can run Custom_UI/EmbeddedUI sample on your XP. It looks like the whole EmbeddedUI MSI model is failing for whatever reason. "e.ManagedUIShell" is just a symptom of the same problem.

Thank you
Jul 18, 2016 at 8:02 PM
Same result.
Look at another computer with another virtual xp.
Again no UI
Jul 19, 2016 at 5:28 AM
Hm... then it looks like that target system MSI doesn't support EmbeddedUI. "Custom_UI/EmbeddedUI" sample is an extremely lean setup project that doesn't have any Wix# infrastructure. It's purpose is to only demonstrate how to use MSI EmbeddedUI model. As opposite to ManagedUI which is based on EmbeddedUI model and on top of it it deliverers integrated fully redefined custom UI resembling standard MSI UI.

Thus preliminary analysis makes me to interpret the problem as one of these possible scenarios:
  1. WinXP limitations prevents MSI runtime from handling EmbeddedUI. It is quite plausible as EmbeddeUI was brought to MSI much later. It's pure WinXP/MSI problem. Nothing we can do about it.
  2. WinXP has older version of MSI runtime present so the old runtime cannot handle EmbeddedUI from your msi file. It is less probable as most likely MSI runtime would complain about new msi file format. Though I never tested it. It's pure WinXP/MSI problem but it can be fixed by upgrading MSI runtime.
  3. Wix# EmbeddedUI integration has some limitations, which are exposed only on WinXP. It's possible but can only be confirmed by testing. I am travelling right now so it's hard for me to find a PC (or virtual image) with WinXP for testing.
I'll be back next week and see what can be done.
In a mean time can you please use logging to have a look if the runtime even trying to load EmbededUI?
Txs
Jul 19, 2016 at 5:53 AM
I just found that I have a copy of virtual XP on my laptop. I will investigate it but a very quick test reveled that runtime reports no error whatsoever. This confirms (not 100% yest) that on XP EmbeddedUI is just ignored. I will do some further research but if you really need to target XP with custom UI then the only choice you have is a CustomCLRDialog. I tested and it works on XP. You will find the sample.
Jul 19, 2016 at 6:04 AM
Edited Jul 27, 2016 at 1:22 PM
OK. The mystery is solved. EmbeddedUI is stored in the MsiEmbeddedUI table and this table is not supported on Windows Installer 4.0 or earlier. This table is available beginning with Windows Installer 4.5. And WinXP MSI is v3.5. Thus this table is just completely ignored on XP. (MSDN)

This means that the problem cause is #2 item from my prev post. It's strange there is no any warning at runtime, but nothing we can do about that.

Thus will need either to prompt user to upgrade MSI or you can use CustomCLRDialog approach. Later one is arguably more practical.
Jul 27, 2016 at 12:50 PM
Thanks for help.
If someone is interested:
There is Windows Installer 4.5 for XP
https://msdn.microsoft.com/en-us/library/windows/desktop/aa371185(v=vs.85).aspx

Download here
https://www.microsoft.com/en-us/download/details.aspx?id=8483
To know user Windows Installer version you can check version of msi.dll