- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: INSTALLDIR not available at uninstall time in InstallScript
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
INSTALLDIR not available at uninstall time in InstallScript
Hi,
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);
Appreciate anyhelp.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi all,
appreciate any help with this. I need to use INSTALLDIR value at uninstall time from the install script code.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
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.