A friend asked me a few days ago to help him write a batch file so that after his computer boots twice, it would ask whoever boots it for a password. So I wrote the following, but the result is that no matter how many times it boots, it always asks for the password :-) It made me look really bad! I took another look, and it seems like the order is wrong, but I still can't figure out how it should actually be written. Could one of you experts help this newbie out? Thanks in advance!
@echo off
echo k >1.txt
if exist 2.txt goto over
if exist 1.txt goto 1
goto end
:1
ren 1.txt 2.txt
ver
c:\password
:end
exit
@echo off
echo k >1.txt
if exist 2.txt goto over
if exist 1.txt goto 1
goto end
:1
ren 1.txt 2.txt
verc:\password
:end
exit

