home *** CD-ROM | disk | FTP | other *** search
- * ┌─────────────────────────────────────────────────────────────────────┐ *
- * │ PROG NAME: CONFIGCK.PRG. Check user's CONFIG.SYS file. │ *
- * │ Copyright (c) 1989 Tech III, Inc. All rights reserved. │ *
- * │ Tech III of San Pedro, California (213) 547-2191. │ *
- * │ "The bridge connecting people and technology."(tm) │ *
- * └─────────────────────────────────────────────────────────────────────┘ *
-
- PUBLIC mdrive
- DO msg2user WITH 'Checking FILES setting in your CONFIG.SYS file...'
- STORE '' TO mdrive
- USE system
- LOCATE FOR LABEL = 'DRIVE'
- IF RECCOUNT() = 0
- APPEND BLANK
- ENDIF
- IF .NOT. EMPTY(contents)
- STORE contents + ':' TO mdrive
- ELSE
- STORE 'C:' TO mdrive
- ENDIF
- STORE .t. TO checking
- DO WHILE checking
- DO WHILE checking .AND. .NOT. FILE(mdrive + '\CONFIG.SYS')
- STORE ' ' TO mdrive
- ACTIVATE WINDOW msg2user
- CLEAR
- @ 00,01 SAY "Can't find your system CONFIG.SYS file."
- @ 01,01 SAY "Enter drive letter (or blanks to bypass this safety check)."
- @ 02,01 SAY "Location of CONFIG.SYS is drive: " GET mdrive PICTURE '!'
- READ
- IF EMPTY(mdrive)
- STORE .f. TO checking
- LOOP
- ENDIF
- STORE LTRIM(mdrive + ':') TO mdrive
- IF FILE(mdrive + '\CONFIG.SYS')
- REPLACE NEXT 1 contents WITH LEFT(mdrive,1)
- ENDIF
- ENDDO no FILE
- IF .NOT. checking
- LOOP
- ENDIF
- config = FOPEN(mdrive + '\CONFIG.SYS')
- STORE -1 TO fileset
- STORE .t. TO looking
- DO WHILE looking .AND. .NOT. FEOF(config)
- inputline = FGETS(config)
- IF 'FILES' $ UPPER(inputline)
- STORE VAL(LTRIM(SUBSTR(inputline,AT('=',inputline)+1))) TO fileset
- ENDIF
- IF fileset # -1
- STORE .f. TO looking
- ENDIF
- ENDDO
- = FCLOSE(config)
- IF fileset < 50
- DO msg2user WITH 'CONFIG.SYS PROBLEM: Your FILES setting is not high enough.',;
- 'A minimum of 50 is suggested. Check the documentation ',;
- 'before continuing. CURRENT SETTING: ' + LTRIM(STR(fileset,4))
- IF .NOT. YESNO('Proceed cautiously until you resolve this message.')
- QUIT
- ENDIF
- ENDIF fileset < 50
- STORE .f. TO checking
- ENDDO checking
- USE
- IF VAL(LTRIM(SYS(12))) < 70000
- DO msg2user WITH 'MEMORY PROBLEM: ONLY ' + LTRIM(SYS(12)) + ' AVAILABLE!',;
- 'Not enough to run this program: PROCEED AT YOUR OWN RISK!', ;
- 'Data may be lost if you do not quit now.'
- IF .NOT. YESNO('A NO answer cancels this program safely now, YES will proceed at risk.')
- QUIT
- ENDIF
- ENDIF
- RETURN
-