[wix-users] passing APPLICATIONDIRECTORY to a custom action

kurt.jensen at us.ophiropt.com kurt.jensen at us.ophiropt.com
Thu May 18 07:29:21 PDT 2017


Thanks!  That works.

<SetProperty Id="CAInstall" Value="AppDir=[APPLICATIONDIRECTORY]" Sequence="execute" Before="CAInstall"/>

can be accessed inside of CAInstall() by this code:

string appDir = session.CustomActionData["AppDir"]

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of John Buuck
Sent: Thursday, May 18, 2017 8:06 AM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] passing APPLICATIONDIRECTORY to a custom action

>From my experience, the SetProperty Value="[APPLICATIONDIRECTORY]" needs to be more like

Value="AppDir=[APPLICATIONDIRECTORY];OtherKey=OtherValue;" (a semicolon-delimeted list of key=value pairs).

Then in your CAInstall custom action retrieve the [APPLICATIONDIRECTORY] by

session.CustomActionData["AppDir"]  (index using the key part of the value)

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of kurt.jensen at us.ophiropt.com
Sent: Thursday, May 18, 2017 9:58 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] passing APPLICATIONDIRECTORY to a custom action

Thanks.

But, what index do I use to access the value?   session.CustomActionData["CAInstall"]?

Does the SetProperty ID have to match the CustomAction Id?

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Nir Bar
Sent: Thursday, May 18, 2017 7:18 AM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] passing APPLICATIONDIRECTORY to a custom action

You need to set the value at runtime:
<SetProperty Id="CAInstall" Value="[APPLICATIONDIRECTORY]" Sequence="execute" Before="CAInstall"/>





--
https://JetBA.net - Native and WPF WiX BootstrapperApplication Frameworks







____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/ This message may contain confidential information of MKS Instruments, Inc. or its subsidiaries. If you are not the intended recipient and have received this message in error, then any use or distribution is prohibited. Accordingly, please notify me immediately by e-mail and delete this message. Thank you.

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
This message may contain confidential information of MKS Instruments, Inc. or its subsidiaries. If you are not the intended recipient and have received this message in error, then any use or distribution is prohibited. Accordingly, please notify me immediately by e-mail and delete this message. Thank you.



More information about the wix-users mailing list