View Full Version : Creating a CA that fires after install or patch, not uninstall?

06-06-2008, 01:09 PM

I've typically created InstallScript installers in the past for more control but want to keep things simple so I'm trying to stick with Basic MSI these days. I want to do something simple and that is launch my application (EXE) after the installation is complete AND also after a patch (not quick patch) is applied. I can create a VB.NET EXE that will read the registry to find the install location and locate the EXE and then launch it. Now that we can use managed code in CA's, I figured I can finally create a CA to do what I need.

Having little to no experience with CA's, can anyone provide a few pointers as to how to configure this CA to do as I suggested. I know how to configure the managed code part, but where in the sequence to put this and how to prevent this CA from running during an uninstall? I only want to launch the application after an install and after a patch update.

Thank you.

06-06-2008, 01:42 PM
To run an action after installation/patching is complete, you'll want the action after both InstallFiles and PatchFiles in the Execute sequence, scheduled for deferred execution, in system context if it makes any system changes.

As for the condition, you can detect a first-time installation with condition Not Installed and detect a patch with condition PATCH; so some combination of those should be appropriate.

(As an aside, a system search or other method might help locate the executable with fewer moving parts, but that's another story.)