I forget who the author was, But I copied this out of a magazine. It stopped the students from modifying my Autoexec.bat files.
BERNIE
One of the first things DOS does after starting up is to look for a file called AUTOEXEC.BAT and try to run it if it's there, right? Not so if it's booting up BERNIE. The mechanism that tries to sniff out the existence of a bootup file is buried in COMMAND.COM. This bootup file doesn't have to be called AUTOEXEC.BAT. In fact it doesn't have to end in .BAT. It's easy to change the name of this bootup file to something like BERNIE. We have all experienced some DOS programs that have insisted that they modify AUTOEXEC.BAT even if there is no need to do so. EG: Games. It also confuses the daylights out of anyone who snoops on your PC when you are not there.
First make copies of COMMAND.COM and AUTOEXEC.BAT and stash them in a safe place. To return your system to normal just copy them back over the modified COMMAND.COM and AUTOEXEC.BAT.
Here is how we do it.
Copy DEBUG.COM from your DOS Directory to the ROOT Directory.
To get the ball rolling enter
DEBUG COMMAND.COM.
You should see a hyphen at the left edge of the screen. This is the DEBUG prompt. Type in
S 100 5000 "AUTO"
and DEBUG should print two pairs of four digit hexadecimal numbers, (hex numbers can be made up of 0-9 A-F), separated by a colon. Ignore the leftmost four digits they will vary from system to system and we don't need them anyway. Take note of the rightmost four digits: this is where the name \AUTOEXEC.BAT is located inside COMMAND.COM.
Now enter
E**** "DOS\BERNIE "
but substitute those rightmost digits for ****. EG: if your digits were 54BA:130F you would use 130F as your four digits. Note: leave two blank spaces before the quotation marks at the end of BERNIE " the characters have to add up to eight EG: BERNIE = six characters AUTOEXEC = eight. Remember if your new name for AUTOEXEC doesn't add up to eight characters, space in the remainder before the quote marks.
Now type W, hit the enter key, type Q, and hit the enter key.
Finally, copy your AUTOEXEC.BAT routine to the DOS subdirectory and name it BERNIE or whatever you called it, and then delete AUTOEXEC.BAT from the root directory.
EG: copy autoexec.bat\dos\bernie
del autoexec.bat
You can then create a phony AUTOEXEC.BAT file in the root directory that contains the line
Access Denied or something like Network isn't Responding See your Administrator.