wixsharp icon indicating copy to clipboard operation
wixsharp copied to clipboard

InstallLocation Registry Value Not showing Correctly in Multi-Instance MSI

Open MithileshL-26 opened this issue 6 months ago • 1 comments

Hello @oleg-shilo ,

In a multi-instance installation environment on Windows, the InstallLocation value under the registry key: "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"

is showing up as blank after installation.

To address this, I tried setting the property like this in my installer project:

project.Properties = new[]
{
    new Property("ARPINSTALLLOCATION", "[INSTALLDIR]") 
};

However, in the registry, the value of InstallLocation is being saved as the literal string [INSTALLDIR] instead of setting it to the actual installation path.

How can I correctly set the InstallLocation registry value so that it reflects the actual installation path for each instance, especially in a multi-instance MSI setup?

MithileshL-26 avatar Jul 10 '25 07:07 MithileshL-26

Unfortunately, I am not aware of how MSI/WiX handles multi-instance installation environments. I set the issue label to help wanted so someone with the knowledge can help.

As for property, the value of property is not expendable from the other property names. It is a default literal value for the property.

Though you can set the property manually in the onLoad event:

project.Load += args =>
{
    if (args.IsInstalling)
        args.Session["ARPINSTALLLOCATION"] = args.InstallDir;
};

oleg-shilo avatar Jul 13 '25 11:07 oleg-shilo