INSTALLDIR not available at uninstall time in InstallScript
I have a Basic MSI project. I have a custom action that invokes a function in installscript code in setup.rul.
But INSTALLDIR value is not available.
e.g. I tried a simple message box as below and the value is an empty string.
MessageBox("INSTALLDIR location: " + INSTALLDIR, INFORMATION);
Hi @agshah ,
If you want to get installdir value on uninstall, you need to first store the installdir value in some registry while installing the setup.exe
and use another customaction to get the stored value from the registry on uninstall with condition to run only on uninstall.
Please refer below KB article which explain on how to store installdir in registry, which is written for major upgrade, however the use case is same.
Please refer a below link which discusses similar issue.