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 our own properties to a deferred custom action.