Phew figured it out with the help of Peter:
read the msdn info re deferred custom actions:
To write the value of a property into the installation script for use during
a deferred execution custom action
Insert a small custom action into the installation sequence that sets the
property of interest to a property having the same name as the deferred
execution custom action. For example, if the primary key for the deferred
execution custom action is "MyAction" set a property named "MyAction" to the
property X which you need to retrieve. You must set the "MyAction" property
in the installation sequence before the "MyAction" custom action. Although
any type of custom action can set the context data, the simplest method is
to use a property assignment custom action (for example Custom Action Type
51).
At the time when the installation sequence is processed, the installer will
write the value of property X into the execution script as the value of the
property CustomActionData.

so I had a property named as the custom action and a deferred custom action:
<CustomAction Id="CA_SetProperty_SetWebConfigConnectionStrings"
Property="CA_SETWEBCONFIGCONNECTIONSTRINGS"
Value="[DATABASE_USERNAME]|[DATABASE_PASSWORD]|[DATABASE_SERVERNAME]|[DATABASE_NAME]|[WINDOWSLOGON_TEST_CONNECTION]|[DIRECTORY_PATH_SERVER]"/>

<CustomAction Id="CA_SETWEBCONFIGCONNECTIONSTRINGS"
BinaryKey="BIN_CustomAction"
DllEntry="CallUpdateAdminWebConfigSqlConnectionString" Impersonate="no"
Execute="deferred" Return="check" />

<InstallExecuteSequence>
      <Custom Action="CA_SetProperty_SetWebConfigConnectionStrings"
Before="CA_SETWEBCONFIGCONNECTIONSTRINGS">NOT Installed</Custom>
      <Custom Action="CA_SETWEBCONFIGCONNECTIONSTRINGS"
After="InstallFiles">NOT Installed</Custom>

The IMPORTANT part is that within your custom action dll function you get
the CustomActionData property not CA_SETWEBCONFCONNECTIONSTRINGS property...

string tempString = (GetSessionProperty(session, "CustomActionData",
false));

Steve




--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/calling-a-deferred-customaction-dll-using-CAQuietExec-tp7581555p7581594.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to