Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!uunet!talgras!uncal From: uncal@talgras.UUCP (Al Amet) Newsgroups: comp.os.msdos.programmer Subject: Re: Need help installing passsword protection Message-ID: <71@talgras.UUCP> Date: 29 Apr 91 14:48:06 GMT References: <28226@uflorida.cis.ufl.EDU> Reply-To: uncal@talgras.UUCP (Al Amet (Unc Al)) Organization: Tallgrass Technologies Inc. Lines: 30 In article <28226@uflorida.cis.ufl.EDU> jdb@reef.cis.ufl.edu (Brian K. W. Hook) writes: >I want to install a rudimentary password protection program on my computer >system. It currently resides as the firstline of my AUTOEXEC.BAT file, >unfortunaetly this can be circumvented via repeated hitting of Ctrl-C on >boot up. You can do it quite easily from within your autoexec.bat file, I know because I have done it. The password program I created returns a different error levels for each user so I can talyor the personality files for games. The last line at the end of your autoexec.bat should be the name of a loop-back file. The loop back file then contains the following lines: :BEGIN COMMAND /C CHCKPASS IF EXIST BADPASS GOTO BEGIN REN GOODPASS BADPASS CHCKPASS is a batch file containing the following lines: PASSWORD IF ERRORLEVEL 1 REN BADPASS GOODPASS All that is necessary is that if a valid password is accepted the program returns an error level. BADPASS/GOODPASS is a dummy file that is used as a semaphore. If an attempt is made to break out of the password program the break condition causes the batch file to shell out of command.com back into the original loop back batch file. The only other thing is BREAK and ECHO must be off while attempting this or they can shell out of the loop back file.