Ryan is correct. The CustomActionData is the Value from the CustomAction. We pass parameters to many of our functions. In this example it is Jscript, but no huge difference between that and VBScript other than you use VBScriptCall. Note the Value has the comma delimiters. This is in turn used in the Script to parse the parameters.
<CustomAction Id="AddComboLoanNodeInitialize" Property="AddComboLoanNode" Value="[E3CONTAINERDIR]web.config,ComboLoanMenu,Financing Package,0,0" /> <CustomAction Id="AddComboLoanNode" Execute="deferred" BinaryKey="EditConfigFilesJs" JScriptCall="AddAppSettings" /> Jscript function. Note the commented out line is used when debugging the script OUTSIDE of the installer. Handy to use prior to incorporating into the installer. The comma is used to split the parameters back out for the function to utilize. function AddAppSettings() { var sData = Session.Property("CustomActionData"); //var sData = ".\\wrd.web.config,FontName2,test2,1"; var vParams = sData.split(","); var sWebConfig = vParams[0]; var sKeyName = vParams[1]; var sKeyValue = vParams[2]; var bCommented = vParams[3]; var bOverride = 1; // controls if the key value is overriden if (vParams.length > 4){ bOverride = vParams[4]; } SNIP ------------------------------------------------------------------------ ---- -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ryan O'Neill Sent: Wednesday, July 30, 2008 9:55 AM To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] WiX-users Digest, Vol 26, Issue 155 Message: 5 Check down the page (look for 'parameters' or 'CustomActionData'). -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dane Anderson (Volt) Sent: 30 July 2008 17:36 To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] WiX-users Digest, Vol 26, Issue 155 Message: 5 [EMAIL PROTECTED] wrote > Message: 5 > Date: Wed, 30 Jul 2008 14:13:11 +0100 > From: "Ryan O'Neill" <[EMAIL PROTECTED]> > Subject: Re: [WiX-users] Passing parameters to a VB Script function > Via the VBScriptCall attribute > To: "'General discussion for Windows Installer XML toolset.'" > <wix-users@lists.sourceforge.net> > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="us-ascii" > > Alex has a good write-up on this here > http://blogs.technet.com/alexshev/archive/2008/07/01/from-msi-to-wix-par t-19 -the-art-of-custom-action-part-1.aspx You are correct, that is a good write up on using VBScriptCall in a custom action, but it does NOT address my problem. In all of his examples (which I read yesterday), NONE of his functions have any parameters. I have been handed (and told to use) VB Script functions like: ' Execute a given command and route console output ' to the MSI log. Function Exec(cmd) ... and ' Write a message to the MSI log. Function LogInfo(msg) ... and ' Get the value of a property defined in the MSI. Function GetProperty(name) ... I need to pass cmd into the function Exec, and msg into LogInfo, and name into GetProperty as parameters (not properties). Is there a way to do that within Wix? Or, do I need to create a workaround (put the parameters into properties, and a flag as to which function to call into another and call a wrapper function that pulls the parameters out of the properties, and then calls the proper function with the proper parameters)? ------------------------------------------------------------------------ - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus Database: 270.5.7/1581 - Release Date: 30/07/2008 06:56 ------------------------------------------------------------------------ - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users