I have a problem with the WiX installer in contact with pending / immediate user actions. Please excuse my english.
I want to pass some properties entered by the user into a pending user action. I know that for this I need immediate user actions and "CustomActionData". I implement it that way.
Binary:
<Binary Id='myAction' SourceFile='.\TemplateGeneration.CA.dll'/>
Immediate user action:
<CustomAction Id='Datenuebergabe' Property='DoSomething' Value='InstalllocVar=[INSTALLLOCATION]'/>
Pending user action:
<CustomAction Id='TemplateGenerationInstallKey' BinaryKey ='myAction' DllEntry='DoSomething' Impersonate='no' Execute='deferred' Return='check' HideTarget='yes'/>
InstallExecuteSequence Function
<InstallExecuteSequence> <Custom Action="Datenuebergabe" Sequence="1399"/> <Custom Action="TemplateGenerationInstallKey" Before="InstallFinalize"/> </InstallExecuteSequence>
Property call in deferred user action:
string somedata = session.CustomActionData["InstalllocVar"]; TemplateEngineCall(somedata+"templates", "install_key_cmd", somedata+"scripts", "install_key.cmd");
My problems: If I try to install my program, it will break. With this code, I can only pass one property, but I need to commit more than one.
For information: When I look at the log file, there is a System.Collections.Generic.KeyNotFoundException property during a user action call.
Why is this not working? Well, I need a deferred user action to write to the "program files folder". Because of the necessary rights, a deferred user action is required, and the immediate execution of user actions before the deferred action should help handle the properties. Can this be done?
I hope you understand what my problems are and you can help me.