home *** CD-ROM | disk | FTP | other *** search
- program makedir(input,output);
-
- {
-
- Program accepts information from the user and makes the file
- 'lan.bat'.
-
- }
-
- const
- version = '1.00';
- progname = 'INSTALL ';
- ctlh = #08;
- cret = #13;
- linf = #10;
- ctrlz= #26;
-
- type
- string2=string[2];
- string3=string[3];
-
-
- var
- outfiler:text;
- ch:char;
- floppydrive,
- harddrive:char;
- output_file:string[12];
- trimmer:string[4];
-
- procedure databox;
- begin
- gotoxy(7,6);
- write ('Floppy Drive: ',floppydrive);
- gotoxy(7,7);
- write (' Hard Drive: ',harddrive);
- gotoxy(7,8);
- write (' Data List: ',output_file,' ');
- gotoxy(6,9);
- if trimmer = 'TRIM' then
- write('Trim function: ON ')
- else
- write('Trim function off ');
- gotoxy(3,19);
- write(' ');
- end;
-
- procedure boxlike;
-
- begin
- clrscr;
- gotoxy(0,0);
- writeln ('┌─────────────────────────────────────────────────────────────────────────────┐');
- writeln ('│ │');
- writeln ('│ │');
- writeln ('│ │');
- writeln ('│ │');
- writeln ('│ │');
- writeln ('│ │');
- writeln ('│ │');
- writeln ('│ │');
- writeln ('│ │');
- writeln ('│ │');
- writeln ('│ │');
- writeln ('└─────────────────────────────────────────────────────────────────────────────┘');
- writeln ('┌─────────────────────────────────────────────────────────────────────────────┐');
- writeln ('│ To change options, type (F)loppy drive, (H)ard drive, (L)an datafile │');
- writeln ('│ (T)rim capability or e(X)it. │');
- writeln ('└─────────────────────────────────────────────────────────────────────────────┘');
- gotoxy(29,3);
- write ('F L O P P Y - L A N');
- gotoxy(52,4);
- write ('System (C) by:');
- gotoxy(52,6);
- write ('Leonard P. Levine');
- gotoxy(52,7);
- write ('3942 N. Oakland Ave. #241');
- gotoxy(52,8);
- write ('Shorewood, WI 53211');
- gotoxy(52,9);
- write ('(414) 962-4719');
- gotoxy(52,10);
- write ('len@evax.milw.wisc.edu');
- gotoxy(3,12);
- write ('Program: ',progname);
- gotoxy(52,12);
- write('Version: ',version);
- databox;
- end;
-
- procedure cleanup;
- begin
- gotoxy(3,19);
- writeln (' ');
- writeln (' ');
- writeln (' ');
- writeln (' ');
- writeln (' ');
- writeln (' ');
- end;
-
-
- {main Program}
- begin
- floppydrive:= 'A';
- harddrive := 'C';
- output_file := 'LAN.FIL';
- trimmer := 'TRIM';
- boxlike;
- ch := ' ';
- while ch <> 'X' do
- begin
- write ('Enter option (F,H,L,T,X,?) ');
- read (kbd,ch);
- ch := upcase(ch);
- case ch of
- 'F': begin
- writeln ('Floppy Drive Change');
- write (' Enter A or B: ');
- floppydrive := ' ';
- while not (floppydrive in ['A','B']) do
- begin
- read (kbd,floppydrive);
- floppydrive := upcase(floppydrive);
- end;
- databox; cleanup;
- end;
- 'H': begin
- writeln ('Hard Drive Change');
- write (' Enter C, D, E, or F: ');
- harddrive := ' ';
- while not (harddrive in ['C','D','E','F']) do
- begin
- read (kbd,harddrive);
- harddrive := upcase(harddrive);
- end;
- databox; cleanup;
- end;
- 'L': begin
- writeln ('Change Lan Data File');
- write (' Enter name of new Lan Data File: ');
- readln (output_file);
- if output_file = '' then output_file := 'LAN.FIL';
- databox; cleanup
- end;
- 'T': begin
- writeln ('Change Trim Option');
- write (' Should the TRIM function be turned ON (y,n): ');
- while not (ch in ['Y','y','N','n']) do read (kbd,ch);
- if upcase(ch) = 'Y' then trimmer := 'TRIM' else trimmer := ' ';
- ch := ' ';
- databox; cleanup
- end;
- 'X': writeln ('eXit this Program');
- '?': begin
- writeln ('Help:');
- writeln ('This program rewrites the LAN.BAT file with changes in the floppy and hard');
- writeln ('drives and changes in the user data filename. Each hard disk machine should');
- writeln ('have its own version of LAN.BAT to permit appropriate choice of drives. The');
- writeln ('Trim Option permits much less space to be used on the floppy drive.');
- write ('Type any character: ');
- read (kbd,ch);
- cleanup;
- end;
- end;
- gotoxy(3,21);
- write(' ');
- end;
- writeln;
- writeln;
- write (' Should I rewrite the LAN.BAT file (y,n): ');
- ch := ' ';
- while not (ch in ['Y','y','N','n']) do read (kbd,ch);
- if upcase(ch) = 'Y' then
- begin
- writeln;
- writeln;
- writeln (' Updating LAN.BAT');
- assign (outfiler,'LAN.BAT');
- rewrite(outfiler);
- writeln (outfiler,'@echo off');
- writeln (outfiler,'rem programs install, lanmkdir and lancomp (C) L. P. Levine');
- writeln (outfiler,'lanmkdir ',floppydrive,harddrive,' ',output_file);
- writeln (outfiler,'command /c \lan\x1 ');
- writeln (outfiler,'lancomp ',trimmer);
- writeln (outfiler,'command /c \lan\x2');
- writeln (outfiler,'del x?.?at');
- close (outfiler);
- end
- else
- begin
- writeln;
- writeln;
- writeln (' Not updating LAN.BAT');
- end;
- end.
-
- {
-
- @echo off
- cd \lan
- lanmkdir AC LAN.FIL
- command /c \lan\x1
- lancomp TRIM
- command /c \lan\x2
- rem del x?.?at
-
- }