VB Script Password InputBox
-
I am working on some VB Script and am using an InputBox that accepts a password. When the user types in the password, I would like it to show up as ********* Any help doing this would be great. Here is some of the code: strUserIn = InputBox("Enter Password") if strUserIn <> "" then Set fs = CreateObject("Scripting.FileSystemObject") strFileName = fs.BuildPath(Wscript.ScriptFullName & "\..", "~userp.txt") strFileName = fs.GetAbsolutePathName(strFileName) Set ts = fs.OpenTextFile(strFileName, 2, True) ts.WriteLine strUserIn ts.Close end if
-
I am working on some VB Script and am using an InputBox that accepts a password. When the user types in the password, I would like it to show up as ********* Any help doing this would be great. Here is some of the code: strUserIn = InputBox("Enter Password") if strUserIn <> "" then Set fs = CreateObject("Scripting.FileSystemObject") strFileName = fs.BuildPath(Wscript.ScriptFullName & "\..", "~userp.txt") strFileName = fs.GetAbsolutePathName(strFileName) Set ts = fs.OpenTextFile(strFileName, 2, True) ts.WriteLine strUserIn ts.Close end if
VBScript and the Windows Script Host don't yet support a password-type input box yet. You'll have to use an external component of some kind to do this or make your code run in an HTML page and use an HTML password box. But, there are limitation on what your script can do inside a browser. RageInTheMachine9532