How can I accept hidden input from a VBScript script?

A. If you require user input from a script but don't want it displayed to screen, you can use the .Net ScriptPW.Password object, as the following code shows:


Set oScriptPW = CreateObject("ScriptPW.Password") wscript.echo "Type text and press the Enter key: " strHiddenText = oScriptPW.GetPassword() wscript.echo "Text entered was : " & strHiddenText

This works only on XP and Windows 2000 and earlier versions?

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.