Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 7

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.


Appreciate anyhelp.

Labels (1)
0 Kudos
(2) Replies
Level 7

Hi all,

appreciate any help with this.  I need to use INSTALLDIR value at uninstall time from the install script code.

0 Kudos
Revenera Moderator Revenera Moderator
Revenera Moderator

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.

0 Kudos