If you've worked with Visual Studio Deployment projects, you know that it's not possible to have a password field in built-in dialogs. Although there are workarounds like editing the MSI file with ORCA or having a custom form displayed at the end of the installation, these methods require additional work.
After searching for a solution, I found Mr. Mohammed M. Malek's article. After following the instructions, I created the template file to be used for this purpose.
Using the Code
- Download the zip file and extract VsdUsernamePasswordDlg.wid file to a temporary location
- Close Visual Studio instances (if any)
- Copy the extracted file to C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\Deployment\VsdDialogs\1033 folder
After completing the steps, create a Visual Studio setup project and try adding a dialog to it. You should see something like this:
Let's hope future Visual Studio versions won't need this tweak. :)