windows-installerinstallshieldinstallshield-2009

How can I retrieve the value of a MSI property on the time of Uninstallation?


I have an Installer for an application, which I use some customactions in that. At the time of installation I have been using some Custom MSI properties like DBHOST etc. to determine the database host.

And the default value for this is localhost.

But I have been setting this DBHOST property with some other value (like 192.168.1.3) through the commandline at the time of installation. and the installation worked properly with the property set through the commandline.

But When I used the

    MsiGetProperty

function in a customation that has to be executed during the uninstallation time, I got the default value (localhost) instead of the value that i have set through commandline while installation (192.168.1.3)

Can Any one help me in this.? why this happened.? Is it needed to do anything else to get the same value for the MSI property at the time of uninstallation?

Thanks In Advance...


Solution

  • A property value is not persistent, this means that on uninstall it will not remember the last value it had during the install and it will use its default one. The best and easier solution is to write this value in a registry entry and retrieve it during the uninstall using a registry search.