john@moncol.UUCP (John Ruschmeyer) (07/24/85)
We are going to be setting up a number of AT&T 6300's with hard disks in one of our labs for student use. Students will be expected to keep their files on floppies with only DOS, compilers, utilities, etc. residing on the hard disk. We would like to make a format utility available, but wish to avoid the possibility of a student accidentally wiping out the hard disk. Does anyone, therefore, have or know of a utility which will only allow drive A: (and B: ?) to be formatted? ( The only such utility I know of is the version of FORMAT that comes with the Tandy 1000, but I'm not sure if it's legal to run that since the college owns no Tandys.) Any pointers/advice/patches/code will be appreciated. Send replies by mail, I will summarize if there is demand. -- Name: John Ruschmeyer US Mail: Monmouth College, W. Long Branch, NJ 07764 Phone: (201) 222-6600 x366 UUCP: ...!vax135!petsd!moncol!john ...!princeton!moncol!john ...!pesnta!moncol!john Silly quote: Little boy, I don't care if your dog can talk. Please tell him this is a TARDIS, not a "Way-Back Machine".
tomk@ur-laser.uucp (Tom Kessler) (07/26/85)
>We would like to make a format utility available, but wish to avoid >possibility of a student accidentally wiping out the hard disk. >Does anyone, therefore, have or know of a utility which will only allow >drive A: (and B: ?) to be formatted? ( The only such utility I know of is >the version of FORMAT that comes with the Tandy 1000, but I'm not sure if >it's legal to run that since the college owns no Tandys.) But what about the guy who brings in his own copy of DOS on a sloppy disk complete with his own format command. It doesn't take even an above average type to figure this sort of thing out.-- -------------------------- Tom Kessler {allegra |seismo }!rochester!ur-laser!tomk Laboratory for Laser Energetics Phone: (716)- 275 - 5101 250 East River Road Rochester, New York 14623
jnw@mcnc.UUCP (John White) (07/27/85)
> Does anyone, therefore, have or know of a utility which will only allow > drive A: (and B: ?) to be formatted? You can rename the format command and/or hide it in a subdirectory. Then, write a format.bat file that does "format a:" using the real format and always passing it an argument. By adding lines like "if x%1==xb: goto do_b" you can format other drives. After the drive specifier you can put "%1 %2 %3 %4 %5" so arguments like /s will be passed. For example, if format is renamed to hdformat then format.bat might look like: if x%1==xa: goto do_a if x%1==xb: goto do_b hd%0 a: %1 %2 %3 %4 %5 goto stop :do_a hd%0 a: %2 %3 %4 %5 goto stop :do_b hd%0 b: %2 %3 %4 %5 :stop I haven't tested this so beware, but you get the general idea. Note that %0 is used so "format/s" will work. "format b: /s" will also work, but "format b:/s" will not. Hope this helps. - John N. White <mcnc!jnw>
bc@cyb-eng.UUCP (Bill Crews) (07/29/85)
> Does anyone, therefore, have or know of a utility which will only allow > drive A: (and B: ?) to be formatted? What I would probably do is write a quicky C program to ask for the drive letter, make sure it is A: or B: (or whatever you like), and either put out a usage message or exec IBM's format.com. Depending on your choice of C compiler, the function to be called to perform the exec might be exec(), fork(), or system(). If you have more than one, I would recommend system(), since then all you have to do is pass a DOS command line to it. That's easy. -- / \ Bill Crews ( bc ) Cyb Systems, Inc \__/ Austin, Texas [ gatech | ihnp4 | nbires | seismo | ucb-vax ] ! ut-sally ! cyb-eng ! bc
peter@kitty.UUCP (Peter DaSilva) (07/31/85)
> >We would like to make a format utility available, but wish to avoid > >possibility of a student accidentally wiping out the hard disk. ============ > But what about the guy who brings in his own copy of DOS on a sloppy > disk complete with his own format command. It doesn't take even an > above average type to figure this sort of thing out.-- > Tom Kessler {allegra |seismo }!rochester!ur-laser!tomk You can't keep anybody from screwing up an MS-DOS system on purpose. But you can try to protect it from a few accidents. Since FORMAT on a hard disk system formats c: by default (incredibly stupid), this is a reasonable request.
hes@ecsvax.UUCP (Henry Schaffer) (08/02/85)
FORMAT (on an XT) formats the *default* disk by default. Therefore, if someone brings in a floppy, and *runs* from it, a FORMAT will format that (probably a:) drive. If you've used one of the methods to keep the FORMAT on your c: drive from hitting that drive, the this user could only accidently reformat c: by copying FORMAT off the floppy onto c: (or by logging in to c: and then commanding a:FORMAT). So there still is some protection. --henry schaffer
glen@intelca.UUCP (Glen Shires) (08/02/85)
> We would like to make a format utility available, but wish to avoid the > possibility of a student accidentally wiping out the hard disk. A simple way to do it is to create a file FORMAT.BAT which contains: ECHO OFF C:\etc\etc\DOFORMAT A: Where "etc" is any directory name, possibly not in the PATH. Then the commands: FORMAT A: FORMAT C: FORMAT all format disk in drive A: Not foolproof, but quick and dirty! -- ^ ^ Glen Shires, Intel, Santa Clara, Ca. O O Usenet: {ucbvax!amd,pur-ee,hplabs}!intelca!glen > ARPA: "amd!intelca!glen"@BERKELEY \-/ --- stay mellow