Hi
I would like to access the "SourceDir" property in a deferred custom action.
While i can access other directories via the CustomAction property (see example
below). The SourceDir ActionData remains empty. I must be doing something
wrong. I sure it's something silly, that only a wix newby can stumble over.
Any help appreciated.
Thanks
My sample code:
<InstallExecuteSequence>
<Custom Action="TestCA.SetProperty" After="InstallInitialize"/>
<Custom Action="TestCA" After="TestCA.SetProperty"/>
</InstallExecuteSequence>
<CustomAction Id="TestCA.SetProperty" Return="check"
Property="TestCA"
Value="SourceDir=[SourceDir];INSTALLDIR=[INSTALLDIR];AppDataFolder=[AppDataFolder]">
</CustomAction>
<CustomAction Id="TestCA" BinaryKey="CustomActionDll" DllEntry="TestMethod"
Impersonate="no" Execute="deferred" Return="check">
</CustomAction>
In the C# code:
[CustomAction]
public static ActionResult TestMethod(Session session)
{
session.Log("CustomAction TestMethod called!");
.
try{
// empty
string showMe = session.CustomActionData["SourceDir"];
// working, path
string showMe = session.CustomActionData["AppDataFolder"];
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users