MAKEMSI quickly and reliably creates MSI files in a non-programmatic way
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
[Bottom][Contents][Prev]: Conditions[Next]: Scheduling of Custom Actions
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->Windows Installer FAQ (the basics)->Custom Actions

Windows Installer Basics: Custom Actions

Windows Installer has native support for installing INI files, registry, files, services and many other things, anything outside of its capabilities are scripted (coded) by you in JSCRIPT, VBSCRIPT or in the form of a compiled EXE or DLL.

Some of the commands MAKEMSI provide for this purpose are (many other commands generate custom actions):

Note that "MSIEXEC.EXE" (version 4+, in Vista) is build with the "NXCOMPAT" option, this will be an issue if any of your code (or the libraries it uses) is not NX compliant. See "KB929710" for more information.

Windows Installer splits the definition of a custom action into two main steps:

  1. The definition of a custom action (defined in the "CustomAction" table). Windows installed also defines some standard actions.

  2. Its scheduling in one or more sequence tables (such as the "InstallExecuteSequence" table).

    When scheduling a custom action you will specify under what conditions it will execute. You should also consider the need for commit and rollback custom actions.

A deferred (in-script) custom action must be sequenced between the "InstallInitialize" and "InstallFinalize" actions (see the "CustomActionData" section to see how data is passed). If it uses or runs files installed by this MSI then the custom action must be run deferred and sequenced after the file installation!

EXE based custom actions have many issues (see the blog "Integration Hurdles for EXE Custom Actions"), for this reason you'd never write one, however sometimes you have to use what is available! If you were starting from scratch then you'd probably write a "DLL" based one instead (perhaps using the "DllCa-C" command).

Windows Installer 4 (Vista) Privileges

Windows Installer service has the following specific privileges:

Its possible that this list may change but you get the idea... This list is more restrictive than that for previous versions.

As Custom Actions inherit the same privileges from the Windows Installer service, your custom actions will have only these privileges, even when running in an elevated context. If your application installation requires configuration that requires other privileges, it can't be done via a Custom Action.

Links to Custom Action Related Resources


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: Conditions[Next]: Scheduling of Custom Actions


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Saturday May 28 2022 at 3:11pm
Visit MAKEMSI's Home Page
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.