|
Answer» so, lately i had an idea to MAKE a program that will STORE the password in a txt file and other programs would read and use it here is the code to a program that will generate the password:
echo off title S.A.F.E setup color 0a ver echo S.A.F.E PROTOCOL INITIATED break> %userprofile%\documents\psscod.txt PAUSE :setup set password=%random% echo %password%> %userprofile%\documents\psscod.txt echo this is your S.A.F.E password: %password% set /P passcode= please repeat password. If %passcode%==%password% goto t If NOT %passcode%==%password% goto N :t echo setup completed succesfully. pause exit :n echo error INCORRECT password! echo resetting protocol.. pause goto setup
and here is the code to implement it to other programs but it doesn't work:
echo off echo enter S.A.F.E password for /f "delims=" %%v in (%userprofile%\documents\psscod.txt) do set var=%%v&goto next :next set /p passcode=> If %passcode%==%v% goto t If NOT %passcode%==%v% goto n :t echo password correct goto program :n echo password incorrect! pause exit :program echo yay! pause
can you just help me and correct the second piece of the code?
|