Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"SET /P variable" command prompt command - how to set the password?

Status
Not open for further replies.

grofaty

IS-IT--Management
Jan 16, 2003
370
SI
Hi,
In my batch file on Windows 2003 SP1 I use the following command:
Code:
set /P password=Enter database password:
to enable user to enter password. Variable 'password' is then entered as database password.

I would like to hide user entered password so that password would not be displayed on screen. Can this be done?

Thanks,
Grofaty
 
Hi,
I have found out solution from web page:


Code:
@echo off
echo hP1X500P[PZBBBfh#b##fXf-V@`$fPf]f3/f1/5++u5>in.com
set /p password=Enter password:<nul
for /f "tokens=*" %%i in ('in.com') do set password=%%i
del in.com
echo.
echo The Password is:"%password%"

Thanks,
Grofaty
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top