Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
Credits 8 Posts 2 Joined 2006-05-24 11:19 20-year member UID 55909
Status Offline
How to set a password input in batch processing?
I want to load a line in the autoexec.bat of the system to prompt for a password. If the password I enter is correct, it will continue to execute. If it is incorrect, it will continue to prompt for the password 3 times. (It can also jump to other batch processing to execute if the password input is incorrect.)
I heard that it can be written with SET?
Hope the expert can answer
Credits 4,432 Posts 1,512 Joined 2002-10-18 00:00 23-year member UID 19 Gender Male
Status Offline
Regarding dengt:
There are also codes that don't use third - party tools, but they are relatively complicated. If you are interested, you can refer to ; if it is allowed to display the password in plain text, then the problem degenerates into obtaining the password string from the input end and then comparing it, and the code can be simpler.