I am making a simple username and password storage program in vbs. After entering the username, I need to have a password input. I can't however, find a way to not show the input in plaintext and convert it to ****** This is what i have already:
x=MsgBox("VBScript username and password storage")
username = InputBox("Please enter your username", "Credentials storage", "Your username goes here")
passwd = InputBox("Please enter your password", "Credentials storage", "Your password goes here")
Set obj = CreateObject("Scripting.FileSystemObject")
Const ForWriting = 2
Set obj1 = obj.OpenTextFile("test.txt", ForWriting)
obj1.WriteLine(username & " " & passwd)
obj1.Close
Set obj=Nothing
I also tried doing this which I found as an answer on another question
Set oInput = CreateObject("ScriptPW.Password")
WScript.StdOut.Write "Enter password: "
pw = oInput.GetPassword
But when i ran it it said "ActiveX component can't create object "ScriptPW.Password"
Is there a way to hide the text in line 3 or fix my problem?