What would be the Windows batch equivalent for HTML's input type=“password”?

前端 未结 12 2105
有刺的猬
有刺的猬 2020-12-01 18:51

I need to get authentication credentials from the users within a Windows script but the classic \"first Google result\" approach:

SET /P USR=Username: 
SET /         


        
12条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-01 19:25

    I assume that you want no echo of the password on the screen.

    If a pop-up window is ok for you, you could use e.g. VBScript to show an IE window displaying a password field. Here's an example.

    As an alternative you could call your script from an HTA (HTML Application) file (see Introduction to HTML Applications (HTAs).

    Regards, divo

提交回复
热议问题