how get msi code error.

Jul 27, 2016 at 2:06 PM
Object GenericSetup (WixSharp.Msi.dll ) have only ErrorStatus. Could you add error code?
Coordinator
Jul 28, 2016 at 5:02 AM
Edited Jul 28, 2016 at 11:28 AM
Not a problem.
Grab the latest NuGet prerelease v1.0.41.2 and you can use MsiSession.MsiErrorCode property, which is set to the return value of the MsiInterop.MsiInstallProduct
Jul 28, 2016 at 6:23 AM
thanks
Aug 1, 2016 at 9:09 AM
how I can get MSI property value? (new RegValueProperty("FLASH_CURRENT_VERSION", RegistryHive.LocalMachine, @"SOFTWARE\Wow6432Node\Macromedia\FlashPlayerActiveX", "Version"))
Coordinator
Aug 1, 2016 at 11:19 AM
Not sure I understand the question.

If you are asking about MSI session property and you are still talking about GenericSetup (WixSharp.Msi.dll ) then it is via Session object. It will have either indexer or something similar.

Though the C# code fragment for accessing registry that you provided indicates that you may be talking about something else.
Aug 2, 2016 at 6:50 AM
in setup.cs file i use condition => new LaunchCondition(@"(Installed OR FLASH_CURRENT_VERSION)", "Flash Player is not installed.Please install Flash Player.")
and project property => new RegValueProperty("FLASH_CURRENT_VERSION", RegistryHive.LocalMachine, @"SOFTWARE\Wow6432Node\Macromedia\FlashPlayerActiveX", "Version")
This work when i run setup.msi. If the key is "SOFTWARE\Wow6432Node\Macromedia\FlashPlayerActiveX\Version" does not exist, I get message "Flash Player is not installed.Please install Flash Player."
but when I run MySetup.exe (custom UI with GenericSetup) it return error 1603. Рow to find value FLASH CURRENT_VERSION in MySetup?
Coordinator
Aug 2, 2016 at 9:56 AM
MSI is a complicated system. I fact overcomplicated.

The fact that it runs as "mesiexec.exe+setup.msi" but not as "setup.exe+setup.msi" indicates that there is nothing wrong with the actual msi. And the change in the msi behavior at runtime can only be explained by the differences in the used msi hosting model. For example in case of EmbeddeUI scenario MSI runtime completely ignores InstallUISequence and any actions scheduled for this sequence will not be executed. This is the nature of the MSI architecture. You may also experience problems with custom/standard actions that require elevation if your host (setup.exe) is not elevated.

Thus for all practical reasons you probably better off by just doing your LaunchCondition evaluation directly in your host application (setup.exe) at startup. After all it's just reading a single registry value with C#.