[wix-users] Passing data into a deferred ca

Phill Hogland phill.hogland at rimage.com
Tue Jun 7 05:48:18 PDT 2016


The DTF C# CustomAction class implementation assumes the multi-key/value form of:
Value="KeyName1=Value1;KeyName2=Value2"

But that is only one implementation.  The C++ WcaUtil has in my view, a wider and more flexible array of options.  By default the WcaWriteXxxToCaData and WcaReadXxxFromCaData uses WCHAR MAGIC_MULTISZ_DELIM = 128 or WCHAR delim[] = { 0x80, 0 }; as the delimiter, but there are functions to change the delimiter, IIRC.

On a side note, one of the key 'tricks' that I had to figure out when trying to use Lux/Nit was to write a small C++ function that replaced  MAGIC_MULTISZ_DELIM  with a ASCII char (such as '*', not used in my test data) when passing the CustomActionData string created by my immediate ca into a Property when unit testing.  This is done based on a Lux Mutation.

More relevant to this thread, I have some immediate C++ CAs which use the above functions and then call a DTF C# deferred CA.  When passing multiple variables I had to write my own parsing function because the data is not in the form assumed by the DTF class.

When passing sensitive data in a Property mark it as hidden, as John indicated.
When passing sensitive data in the CustomActionData property to a deferred CA that you author, then set the  CustomAction/@HideTarget='yes' flag.
When passing sensitive data to a CA in a library (such as a WixUtil function, where you cannot author the CustomAciton/@HideTarget flag) then create a Property of the same name as the deferred CA function, and set the Property/@Hidden flag.

________________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Joseph L. Casale <jcasale at activenetwerx.com>
Sent: Monday, June 6, 2016 5:43:30 PM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] Passing data into a deferred ca

Hi John,
As far as I know, passing multiple key/value pairs is done by setting the Value attribute as follows:

    Value="KeyName1=Value1;KeyName2=Value2"

So the issue arises when the values contain = or ; characters. I was calling ToString on the entire object
and parsing it myself but it's an issue waiting to arise when the input matches the parsing technique unexpectedly.

I had not decalred the property, so I will try that and mark it hidden.

Rollback is not an issue as the CA which uses the key/value's only sets registry entries under a key that
the installer creates. Currently, when a user uninstalls the application or the installer faults and rolls back,
the entire key is removed without leaving any entries.

Thanks for the help,
jlc

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of John Cooper
Sent: Monday, June 6, 2016 4:27 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Passing data into a deferred ca

Mark it Hidden and don't log it inside your custom action.  Outside, Hidden properties will appear as asterisks.  You can use a CustomActionData object to pass any number of key value pairs.  What are you doing for rollback?

--
John Merryweather Cooper
Senior Software Engineer | Integration Development Group | Enterprise Notification Service
Jack Henry & Associates, Inc.® | Lenexa, KS  66214 | Ext:  431050 |JoCooper at jackhenry.com




-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Joseph L. Casale
Sent: Monday, June 6, 2016 4:43 PM
To: 'wix-users at lists.wixtoolset.org' <wix-users at lists.wixtoolset.org>
Subject: [wix-users] Passing data into a deferred ca

The e-mail below is from an external source.  Please do not open attachments or click links from an unknown or suspicious origin.

I have a deferred CA that requires several key/value pairs. Most of which are passwords and hence will most certainly contain the characters used to unpack the string.

As a result, I have written anther CA which runs immediate and has access to the session so that I can query all the values I need and serialize them myself into a single value which I push back into the session.

That all works fine except the CA which provides the custom action data value can't access a private property so I can only populate the deferred CAs input if the immediate CA pushes a public property back in. How can I ensure the result of the first CA are not logged?

Thanks,
jlc


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

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.


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

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



More information about the wix-users mailing list