cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Airbaal
Level 3

Running InstallScript only during INSTALLs

Forgive me if this has already been answered, but I have searched both the internet and here, and haven't found something that works.

I have a basic MSI project, and have an InstallScript that I have run after the InstallFinalize event. This works fine. However, my problem is that this script runs both during installs and uninstalls. What is the if(..) statement to only have it run during installs? I've tried REMOVEALLMODE=0, but that did not seem to work.

Thanks!
Labels (1)
0 Kudos
(2) Replies
Sairen
Level 7

Don't use an if statement in that case. Set the condition on the Custom Action that's running the InstallScript function. If you only want it to run on first install, set it to "NOT Installed" (the word 'Installed' is case-sensitive)

Hope that helps.
0 Kudos
Airbaal
Level 3

Thanks for the help! That worked (of course)!

Thanks again.
0 Kudos