In a verbose installation log, what is the resulting value of the TestCA
property?

-----Original Message-----
From: daniel.knoep...@noser.com [mailto:daniel.knoep...@noser.com] 
Sent: Tuesday, July 13, 2010 8:24 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Accessing Source directory in Deferred Custom Action
(ApDataFolder etc. is working, just not SourceDir)

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=[AppDataF
older]">

</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
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
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
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to