There is a program that needs to run in DOS under Win98. To prevent accidental operation, I want to design password protection so that it asks for a password while running. The program I wrote runs fine in DOS6.22 and DOS under WinXP, but in DOS under Win98, DOS under WinME, and DOS7.1, it still cannot pass. This program needs to run in DOS under Win98, because it has to access a FAT32 disk while running. Part of the code is as follows:
In DOS6.22:
In WinXP:
Question: how can this be done in DOS under Win98?
[ Last edited by HYQ9 on 2007-4-18 at 08:50 PM ]
In DOS6.22:
set get=
get s "Please enter password:"
if "%get%" == "123456" goto RUN
goto EXIT
:RUN
(omitted)
:EXIT
echo The password you entered is incorrect. Press any key to exit!
pause >NUL
In WinXP:
set /p a=Please enter password:
if %a% == 123456 goto RUN
goto EXIT
:RUN
(omitted)
:EXIT
echo The password you entered is incorrect. Press any key to exit!
pause >NUL
Question: how can this be done in DOS under Win98?
[ Last edited by HYQ9 on 2007-4-18 at 08:50 PM ]
