How to mask input with VBScript?

前端 未结 2 1901
星月不相逢
星月不相逢 2021-01-29 05:09

does anyone have an idea how to mask the InputBox in VBScript without using html (work security issues)? I\'m using windows 10. Thank you very much, any help is greatly apprecia

2条回答
  •  [愿得一人]
    2021-01-29 05:53

    In VBScript you essentially have 2 options for masked input:

    • Using the console and a ScriptPW.Password object:

      Set oInput = CreateObject("ScriptPW.Password")
      WScript.StdOut.Write "Enter password: "
      pw = oInput.GetPassword
      
    • Using a custom HTML dialog.

    [Source]

    Masking input in the builtin InputBox dialog is not possible.

提交回复
热议问题