Quantcast
Channel: Spiceworks Community - Latest topics
Viewing all articles
Browse latest Browse all 183240

Hide user password input from batch file

$
0
0

I am creating a batch file that has a variable of setting a SQL sa password in the configuration file. 

This isn't hidden in the command view and it is show in plain text. Is there a simple way of adding this to the batch file?

Here is my code this is my first ever attempt:

 :top1
set /p SAPWD="Enter SA password: "

set /p answer="You typed %SAPWD%% is this correct?"

if /I NOT %answer%==y GOTO top1

Any suggestions?


Viewing all articles
Browse latest Browse all 183240

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>