How can I accept hidden input from a VBScript script?

John Savill

October 29, 2006

1 Min Read
ITPro Today logo in a gray background | ITPro Today

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?

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like