Page 1 of 1
SET /P credentials q
Posted: 11 Dec 2009 15:00
by sxekjb
if you're using set /p to prompt for user credentials, is there a way to make whatever text that's entered in clear text.
Posted: 11 Dec 2009 15:21
by avery_larry
You'll have to define what you mean by "clear text" for us.
Posted: 11 Dec 2009 17:23
by sxekjb
Sorry, I don't think clear text are the words I'm looking for, but I'm trying to use set /p to prompt for credentials to set as a variable. Is there a way to make whatever the user enters to not show up, or just doesn't show any characters.
example: set /p pw=password please:
when the user enters the password it's gonna show up on screen.
Posted: 11 Dec 2009 23:52
by DosItHelp
sxekjb,
Here is a related post:
http://www.dostips.com/forum/viewtopic.php?p=602
Here is a function you may want to try:
http://www.dostips.com/DtCodeCmdLib.php#Function.pwd
Basically the best dos solution we found so far is to temporary change the foreground and background color to similar colors (same color doesn't work) for the time the password is being entered.
DosItHelp?
Posted: 12 Dec 2009 21:39
by sxekjb
Thanks! that function worked out very nicely.