wix - Custom property is empty -
I have a custom action, which stores the file location in the property at the earliest stage. Then I have a deferred phase, which reads this property and creates a file:
string configfilepath = session.CustomActionData ["configPath"]; String configfileName = session.CustomActionData ["configfile"]; ... Everything works by now. If I uninstall, I would like to delete this file, so I have another deferred action, which runs after deleting the file. I works, the problem is that the property is empty (session.CustomActionData is empty). Why? I have set it on the stage immediately, whenever the installation is being uninstalled. And if I can read it in the custom setUpConfig verb, then why can not I read it on the custom deleted configuration action? I think an option is to store this value to install the phase in the registry and then uninstall it from there, then read it from there. But I would like to know why I can set the property when setting up the program, and why it has not been set to uninstall. Action, which determines proeprty in both cases is executed.
& lt; Custom Action ID = "Configure File Location" property = "setUpConfig" Execute = "instant" value = "configPath = [website]; ConfigFile = config_template.asp" /> & Lt; Custom Action ID = "Set up ConfiFin" BinRieke = "MySmart Action" DLLInterity = "Config file" Execute = "Postponed" Impersonation = "No" Return = "Check" /> & Lt; Custom Action ID = Exclude "deleted config" binary = "MySmart Action" DLLInterity = "DeleteCustomFile" = "deferred" impersonation = "no" return = "check" /> & Lt; InstallExecuteSequence & gt; & Lt; After custom action = "config location" = "launch condition" /> & Lt; Custom Action = "setUpConfig" = "InstallFinalize" before & gt; & Lt ;! [CDATA [Do not remove = "All"]] /> & Lt; Custom action = "RemoveFiles" after "deleted config" & gt; & Lt ;! [CDATA [REMOVE = "ALL"]] /> & Lt; / InstallExecuteSequence & gt; To pass data in a deferred custom action you must set Property
With a name that matches CustomAction / 0 Id . You are doing the right thing for the setUpConfig custom action via the instant ConfigFileLocation custom action. However, there is no immediate custom action to set removeConfig custom code property named removeConfig . removeConfig custom action's custom action data property is empty.
Comments
Post a Comment