|
Answer» If this is POSSIBLE i want to see if I can do this please help.
I have a guest account on my computer that other people get on and i wanted to see if i could make a .bat FILE that would make it so if someone wanted to get on the INTERNET they could CLICK the batch file and enter a password that would then connect them to the internet i have the internet blocked so they cant get on now.
I have this in notepad
echo off echo. echo Please enter a password set /p m=password.- pause >nul start iexplore
______________
This works but they can enter any password they want is there a way so they have to enter a specific word to continue on???
please help Welcome to the CH forums.
Please read this.
You can test the word entered using an IF command.
Below shows a batch script which works when %pword% is set as an Environment Variable in the user account.
Code: [Select]echo off cls
echo. echo. echo.
set /p m= Please enter your password:
IF NOT %m%==%pword% goto bad
start iexplore
exit
:bad echo. echo. echo.
echo Password "%m%" is invalid
echo. echo. echo Press any key to continue pause >nul cls
Good luck with your project.I entered that into an MS-DOS computer (not the BIT about starting iexplore) and it doesn't run the program - it just says syntax error for the set command. What can I use instead?
(running MS-DOS 5.0)Bones92 - yep, the SET /P switch is not available in MS-Dos. You could try the Setenv utility from here.
I only have bare-bones Dos 7.10 available right now so can't test it for you.
Good luck
|