I don't know what you're changing but to use Orca to change a textbox edit control to a password field you need to set the Password attribute as described here - edit-control After opening the .msi file with Orca go to the Control Table and find the Edit control for the dialog that you want to turn into a password field. Change the attributes of that field.
For example,
How to config Password Box in Windows Installer
I use Visual studio 2008 for the installation project. The current project has a password field in the Textboxes. It shows "******" during the installation. I am trying to add a new Textbox with a password field, however, the new field added displays a normal text format.
I have compared the 2 Textboxes and could not see any differences.
Open the .msi with Orca, the working one is Type 8499 and the no working one is 307.
My question is where and how to configure the "Type"?
I did change the Type from 307 to 8499 in Orca and saved, but is still displayed in normal text format.
Thanks for help,
Jason
-
RLWA32 45,691 Reputation points
2020-09-22T16:14:30.527+00:00
1 additional answer
Sort by: Most helpful
-
RLWA32 45,691 Reputation points
2020-09-23T13:59:31.793+00:00 I'm writing this as an answer because of the 1000 character limit on comments. Using Orca to update an installer (.msi file) after every build is tedious. The process can be automated by using the installer project's post-build event to run a script. Continuing with my previous example, the following script when run as a post-build event will update the .msi file to add the password attribute to the Edit2 control of the CustomTextA dialog.
The script file should be place in the same folder as the installer project (.vdproj file). The post-build event command assumes that cscript.exe is on the path.
EditToPassword.js -
// EditToPassword.js <msi-file> // Performs a post-build fixup of an msi to add the password attribute to an edit field in the control table // Constant values from Windows Installer var msiOpenDatabaseModeTransact = 1; var msiViewModifyReplace = 4 if (WScript.Arguments.Length != 1) { WScript.StdErr.WriteLine(WScript.ScriptName + " file"); WScript.Quit(1); } var filespec = WScript.Arguments(0); var installer = WScript.CreateObject("WindowsInstaller.Installer"); var database = installer.OpenDatabase(filespec, msiOpenDatabaseModeTransact); var sql var view var record var attribute try { WScript.Echo("Updating the Control table..."); // Add password attribute to edit control sql = "SELECT `Dialog_`, `Control`, `Type`, `X`, `Y`, `Width`, `Height`, `Attributes`, `Property`, `Text`, `Control_Next`, `Help` FROM `Control` WHERE `Dialog_`='CustomTextA' AND `Control`='Edit2'"; view = database.OpenView(sql); view.Execute(); record = view.Fetch(); attribute = record.IntegerData(8); attribute += 2097152; record.IntegerData(8) = attribute; view.Modify(msiViewModifyReplace, record); view.Close(); database.Commit(); } catch(e) { WScript.StdErr.WriteLine(e); WScript.Quit(1); }
Command line to use for installer project post-build event -
cscript.exe "$(ProjectDir)EditToPassword.js" "$(BuiltOuputPath)"