I am trying to get a password input in a cmd program made in BATCH. I was wondering if it was possible to have bash-like password input in BATCH. ICYDK, i am talking about when you type a password in bash, it doesn't show the characters but instead the whole field is just blank.
I am currently using this:
powershell -Command $pword = read-host "Enter password" -AsSecureString ; ^
$BSTR=[System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($pword) ; ^
[System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR) > .tmp.txt
set /p password=<.tmp.txt & del .tmp.txt
I was just wondering if it is possible.