Tips on Scheduling

In all my reading and research on the scheduling of actions within the MSI, I’ve never found a really good explanation of what really happens when. Even more confusing is that the names which were given to custom action scheduling options are misleading; as far as I can tell, both “Immediate” and “Deferred” execution actions may be taking place around the same time. The best example is that the actual extraction and copying of files to the local system is scheduled in the “Immediate” context but actually takes place along with the “Deferred” actions!

But don’t fret-there’s only a few things you need to know to make your custom actions work. Take a good look at the following documents and you should find everything you need to know.

  • From the WPS documentation under “Wise Package Studio\Help,” WindowsInstallerEditor.chm or WindowsInstallerEditor.pdf: the articles titled, “About Installation Sequences,” “Tips on Custom Action Location”, and “Tips on Custom Action Conditions.”
  • From the Custom Actions section of the MSI SDK: Many of the articles here are worth a read, although thankfully Wise will save you from some of the gory details of adding up binary flags and such. But in particular, make sure you have read at least “Sequencing Custom Actions” and “Deferred Custom Actions,” as you are likely to use the deferred context and must understand the differences.

Another big “Thank you!” goes to Wise Solutions, as they have added a tremendously helpful feature to WPS 4.5 (and presumably WfWI 5.0): now, when you have selected certain execution options (e.g. immediate vs. deferred) that have restrictions on where in the sequence lists they can go (e.g. before or after InstallFinalize), now WIE/WfWI will grey-out and prevent you from sequencing your custom action inappropriately. What an excellent idea!