Hey,
I want to copy the msi log file to another location. To do so, i want to
pass the MsiLogFile to a c# custom action. I tried several way, but it
seems, that the session. customactiondata is empty. Here my code, maybe
someone got an idea what i did wrong.
<Property Id="LOGFILEPATH" Value="c:\temp\huhu.log"/>
<CustomAction
Id="LogFileCopySetVariable"
Return="check"
Execute="immediate"
Property="LogFilecopy"
Value="LOGFILEPATH=[LOGFILEPATH]" />
<CustomAction
Id="LogFileCopy"
Return="check"
Execute="deferred"
BinaryKey="MMDCustomActions.CA.dll"
DllEntry="LogFileCopy" />
<Custom Action="LogFileCopySetVariable" Before="LogFileCopy">NOT
Installed</Custom>
<Custom Action="LogFileCopy" After="CallProductRegistration">NOT
Installed</Custom>
and now the c# code:
[CustomAction]
public static ActionResult LogFileCopy(Session session)
{
session.Log("TESTOR");
string t = session.CustomActionData["LOGFILEPATH"];
session.Log("Test: " + t);
return ActionResult.Success;
}
--
View this message in context:
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/WIX3-8-System-Collections-Generic-KeyNotFoundException-The-given-key-was-not-present-in-the-dictiona-tp7596132.html
Sent from the wix-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users