
abongrand1.5524922171066755E12 asked a question.
Running a batch only during installation (not uninstall)
How to run a batch (.bat) in the custom action, "only during installation"? (not during uninstall)
I know for uninstall only, i just need to use (remove="ALL") in the installation exec condition.
How for installation only?
Thanks.
greetings, H.
In Installshield, you can use the condition "Not Installed". (I don't know if this condition exists in AdminStudio). The CA is then executed only while the first installation - not while uninstalling or while a minor upgrade.
greetings, H. "
i confirm that CA execute my batch during uninstall :s
Ok if i have understand i must put in installation exec condition :
remove="Not installed"
Right?
As I said, I don't know AdminStudio, but in Installshield the REMOVE condition is in capital letters. So you could also use condition REMOVE="" to prevent the CA from being executed while uninstalling.
In AdminStudio/InstallShield (or, more generally, Windows Installer), the following conditions are usually what works well:
First Time-install only: NOT Installed AND NOT REINSTALL
Uninstall-only: Installed AND REMOVE~="ALL"
Patch Operation: Installed AND PATCH
Maintenance: Installed AND NOT PATCH AND NOT REMOVE~=ALL
Auto-Repair: REINSTALLMODE="pocmus"
REMOVE="" might actually not work well for you, since this would not evaluate correctly when in maintenance mode and removing a feature.
If you're curious as to how these properties are set, and what data they hold, I'd recommend searching MSDN for "(name of property) property". Good information on understanding what they do and how they work.