PDA

View Full Version : CA during Uninstall needs installed file



JesseBearden
06-26-2006, 06:59 PM
I'm new to MSI, so please bear with me.

Our product installs an exe that then needs to be run once during install with a command line option. It also gets run during uninstall with a different command line option. (It also has a reinstall option, but that's not too important here I don't think)

So for the purposes of install and uninstall I made 4 Custom Actions with the following conditions:

Install
&App=3 AND !App=2
RollbackInstall
&App=3 AND !App=2

Uninstall
&App=2 AND !App=3
RollbackUninstall
&App=2 AND !App=3

I placed the Install sequences at the end just before install finalize and made them deferred execution. For the uninstall, I placed them before files are installed/removed and also made them deferred execution, but InstallShield complains that a CustomAction that uses an installed file needs to be after InstallFiles.

Can someone give me some guidance on how this situation should be handled?

Jesse

RobertDickau
06-27-2006, 02:13 PM
As long as your uninstallation works, you should be able to ignore the warning; from the "Build Errors and Warnings" topic:
...exception to this is when you run this custom action on uninstallation. In that case, the file has already been installed so the custom action does not have to occur after InstallFiles.

JesseBearden
06-27-2006, 04:07 PM
Thanks Robert, you're a hero to most.

Jesse