Passing information entered by a user to a deferred custom action

When the end user provides information to the installer, either through a user interface or the command line, we typically store it in WiX properties so that it can be used later during InstallExecuteSequence. However, we cannot pass these properties directly to a custom action that is scheduled as deferred during InstallExecuteSequence. If you try, you'll get the following error in the install log:

Microsoft.Deployment.WindowsInstaller.InstallerException: Cannot access session details from a non-immediate custom action

This is because deferred actions have a heightened level of security and only allow a few properties to be accessed. In this recipe, we will discuss a way to pass ...

Get WiX Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.