locked
text box with password mask RRS feed

  • Question

  • Hello,

    I need to create install packet, what can create database from script. Creating database was easy part, but I am faceing now intresting problem.I need textbox,where i can hide password.if your password is qwerty,password in textbox is like *****.I am using visual studio 2008 setup project. I can not find any property, Where can i specify character for letter. How about sitsuation, where user spesify database information(server,user,password), and leave some textbox empty.How can I tell the user that You did not give all the information.

    I dont is it even possible to do with visual studio 2008 setup project.If there is easier ways to this installation packet, please let me now


    Jouni
    Monday, April 27, 2009 5:48 PM

Answers

All replies

  • You'd have to do this manually after your MSI is built if there's no support in Visual Studio to set the Passsword attribute. Using the MSI editor Orca, open your MSI file, go to the Control table and find the dialog in question, then the text control for the password.
    http://msdn.microsoft.com/en-us/library/aa368044.aspx 

    then change the Attributes for that control, adding the Password value documented here:
    http://msdn.microsoft.com/en-us/library/aa368042(VS.85).aspx 
    Phil Wilson
    • Proposed as answer by RobinDotNet Tuesday, April 28, 2009 6:45 AM
    • Marked as answer by Kira Qian Monday, May 4, 2009 4:57 AM
    Monday, April 27, 2009 7:29 PM
  • Thank you. That was helpful tip.Why you have to first build msi packet, and after that you can edit control to password textbox. By the way have couple questions more.
    1 how can I test if password is weak or not ?
    2. How I can inform user or prevent going next dialog, if user doenst give all the information ?
    Tuesday, April 28, 2009 5:50 AM
  • The big answer is that Visual Studio setups don't give you IDE support for everything you can do with MSI setups. The small answer is that in this particular case there's no IDE support to set the Password bit on a control. There's also no support for checking values entered there at the time that the user clicks the Next button. Youd have to test it later in a custom action, but the install will be pretty much over by then.

    What are you going to do if the user needs to change the password or it's an existing password that expires? Maybe you should do this in a configuration program (instead of during the install) so that the user doesn't have to install again if the password needs to change.
    Phil Wilson
    Tuesday, April 28, 2009 10:21 PM
  • That is really good solution to create configuration program.I am just testing and partising, that what i can do  withvisual studio setup. I have one more question. First i tell you little bit back ground. I need to create installation, packet where user can choose witch program he/she wants to install(between clientside and serverside program).if user choose client side, setup program start asking client informations. if user choose server side, msi packet asking server side information. Is this possible with visual studio 2008 and what is the best way to do it.
    Wednesday, April 29, 2009 5:54 AM