LM_NET: Library Media Networking

Previous by DateNext by Date Date Index
Previous by ThreadNext by Thread Thread Index
LM_NET Archive



>Re: kidproofing DOS machines

There might be some commercial menus that can do what you wish, but I prefer
doing it myself.

Fortunately, DOS provides some tools that can help teachers protect their
data and at the same time allow students to safely and freely use the computer.
Those tools are the ATTRIB command and batch files.

Attrib is a very useful command for protecting files from the casual computer
sneak and/or destructo derby student. It is not capable of stopping the truly
knowledgeable PC abuser, but it is the first line of defense against
accidental or intentional data loss.

Here is how it works: Attrib is a DOS command you invoke at the C prompt
and its most useful features for computer users is first, the ability
to hide files and second, the ability to protect files from erasure.

Here is a working example: Let's say I want to protect all the files in
the DOS directory itself (a very *Good* idea!). I will change to that
directory and then type:

Attrib +h +r <enter>

Be sure and use a space before the + signs (the letters themselves
can be capitalized or not).

By using that command all the files will still be usable, but now they
will be hidden (the h factor) and also can't be erased or copied over
(the r or read only factor).

When you type a DIR in that directory you will not see those files listed.

*Tip* (to spot hidden file type this undocumented DOS command:dir,
(dir with a comma)

To restore all the files the way they were before you can merely reverse
the process with a negative sign: Attrib -h -r <enter>

You can hide just one file at a time the same way: here are three files you
*SHOULD* protect that way: Attrib +h +r command.com; attrib +h +r autoexec.bat;
and attrib +h +r config.sys.

Now another neat and little-known feature of Attrib is that it can also do
the same thing to the directory listing itself. After you hide and make
read only all the files in the DOS directory you can do the same to the
directory listing. Type: Attrib +h +r \DOS <enter>
(drive letter optional)

Directory hiding is very useful on those directories that are very important,
but seldom used. Examples: \Stacker; \DOS; \Mouse; \Norton; etc.

One potential problem with using the attrib +h is that a few
programs need to use and cannot find the data files if
they are hidden (The New Print Shop can't find its graphics). If that is
the case you can still protect the program by making the running files
read only (attrib +r) and remove the attrib on files you need to change or edit
(attrib -r *.pss for example to unprotect the sign data files).
(attrib -r *.psl for letterheads, and etc. for the rest of the files you
create and may need to edit.)

Hiding the directory listing for the Print Shop will also help some in
preventing deletions, but of course if a student types the terrible del
command with the wildcard at the C:\ the *ONLY* files in the root saved will
be those that are read only files.

And ninty-nine times out of a hundred the deletion of a your root files (or else
 where) is an
accident by the computer user. The person thinks they are in the directory
they want to delete and don't realize they are at the root directory. DOS gives
you this final safety valve question "All files in directory will
be deleted! Are you sure (Y/N)?


So read only attributes are a necessity to save stuff that is harder
to replace than your average programs and should be used whenever possible.

Now to my second lifesaver for bulletproofing your PC. Batch files can be
easily made to run your programs from the command prompt while your files
stay hidden and/or read only.

Batch files (files with .bat extensions) are the third type of files that
actually start a program (.exe and .com are the other two).

You can easily make a batch file for practically all of your programs and
even hide the batch file! Then you merely type the code word at the C prompt
to start the program.

Here is an example using the Print Shop: go into your word processor or
text editor and make a new file called ps.bat or gotops.bat. Type these
words in the file (capitals can be used or not) :

cd c:\newps <enter>
ps

Then save it as a text file and make sure it gets copied or moved to your
root directory. That's all there is to it and you then merely type ps at
the C: prompt and it will go into the program. You can rename that file to
anything you wish if you need to (at any time, once a week or daily if need
be) by this command: ren ps.bat shop.bat (or whatever) and also hide that
file: attrib +h ps.bat (or whatever)

By hiding the directory of the Newps and hiding the batch file you limit
student interaction with those files.

Now, how do you make batch files for other programs? As you can see from
the example the change directory symbol (cd) is followed by the directory
listing (c:\newps) and your other batch programs follow that same pattern.
Thenext line merely has the running file that starts that program (extension
is optional).

So here is another example to get you started:

Make a new text file named Win.bat in your text editor or word processor
and then type:

cd c:\windows
win

Now you have a batch file to start Windows. Type win at the C: prompt and
you will be into Windows. (if you want to stop displaying the Windows
logo on startup change the second line of the batch file to this:win :
(win followed by a space and a colon)

Batch files are pretty slick when you get the hang of them.

Good Luck and don't wait for disaster! Bulletproof your PC today! I have
used these methods for three-year-old computer users and hundreds of
middle school special education students. I have never had a computer yet
(knock on wood!) put out of operation by those users.


Russell Smith
rssmith@tenet.edu
Educational Technologist
Sweetwater, Texas 79556-1801


LM_NET Archive Home