When I use in my custom dialog Control Edit with attribute password set to "yes"
<Control Id="TextBoxPass" Type="Edit" Password="yes" Property="SQLPASSWORD">
the text box have double frame in Windows Server 2012.In other versions of Windows Server (2008, 2008R2, 2003) it looks like normal text box. How can I change this behavior? (I mean delete double frame)
Quick answer: AFAIK, you can't change this behavior.
Long answer: If you run Microsoft Spy++ and search for both controls you will see the class for the regular edit is RichEdit20W
, while for the password is Edit
.
Then inspecting the Window Styles you will find the WS_BORDER
. This is the culprit for the border. In WiX and in MSI there is no way to code the window styles of a control, so I assume there is no solution to this issue.
Additionally, some styles (like ES_PASSWORD) can be changed using Orca and editing the Attributes
column in table Control
. The solution would be to have both edits set as password and after the build you manually edit the Attributes
setting of the non-password control to 196611
.
In case you want to automate this process, I think you can code an application using the MSI API to execute a query against the package and change the value.
Here is a real example: