Preventing custom action data from being displayed in the install log
When you install an MSI file with logging turned on, the Property
elements that you've set will be displayed in the log. To make things more secure, the first thing we should do is add the Hidden
attribute to each Property
element that contains private information. For example, say we had a property called PASSWORD
and we set its Hidden
attribute to yes
, as follows:
<Property Id="PASSWORD" Value="my_password" Hidden="yes" />
Now, the value of that property will be replaced with asterisks in the log:
Property(S): PASSWORD = **********
Unfortunately, if we pass that same property to a deferred custom action using the CustomActionData
technique shown in the previous recipe, such as the following:
<SetProperty Id="CA_ReadProperty" Value="PASSWORD=[PASSWORD]" Sequence="execute" Before="CA_ReadProperty" />
Then the PASSWORD
value will be visible. Here's a...