I have a custom action where I'm trying to use SourceDir. I don't
think SourceDir is accessible at the point the CA will run, so I want
to pass it through CustomActionData. The CA executes fine, but when I
try to access CustomActionData, it's blank. I know this is probably a
simple problem but I'm stuck.
Wix code:
<Binary Id="CADLL"
SourceFile="$(var.CustomActions.TargetDir)$(var.CustomActions.TargetName).CA.dll"
/>
<CustomAction
Id="SetSourceDirProperty"
Property="DisplaySourceDir"
Value="[SOURCEDIR]"/>
<CustomAction
Id="DisplaySourceDir"
BinaryKey="CADLL"
DllEntry="DisplaySourceDir"
Execute="deferred"
Return="check" />
<InstallExecuteSequence>
<Custom Action="SetSourceDirProperty"
Before="InstallInitialize">Not Installed</Custom>
<Custom Action="DisplaySourceDir"
After="InstallInitialize"
Overridable="yes">Not Installed</Custom>
</InstallExecuteSequence>
C# code:
[CustomAction]
public static ActionResult DisplaySourceDir(Session session)
{
string cad = session["CustomActionData"];
MessageBox.Show("CustomActionData: '" + cad + "'.");
return ActionResult.Success;
}
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users