Case is everything.  LogFilecopy <> LogFileCopy.

--
John Merryweather Cooper
Build & Install Engineer - ESA
Jack Henry & Associates, Inc.®
Shawnee Mission, KS  66227
Office:  913-341-3434 x791011
jocoo...@jackhenry.com
www.jackhenry.com



-----Original Message-----
From: ThomasW [mailto:lord.lya...@web.de] 
Sent: Thursday, July 31, 2014 9:20 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] [WIX3.8] System.Collections.Generic.KeyNotFoundException: 
The given key was not present in the dictionary.

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
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
NOTICE: This electronic mail message and any files transmitted with it are 
intended
exclusively for the individual or entity to which it is addressed. The message, 
together with any attachment, may contain confidential and/or privileged 
information.
Any unauthorized review, use, printing, saving, copying, disclosure or 
distribution 
is strictly prohibited. If you have received this message in error, please 
immediately advise the sender by reply email and delete all copies.


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

Reply via email to