home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 12 / CD_ASCQ_12_0294.iso / vrac / pmd21ed.zip / VIRSCAN.CMD < prev   
OS/2 REXX Batch file  |  1993-10-29  |  2KB  |  75 lines

  1. /* REXX-Prozedur für VIRUS-SCANNER-SETUP */
  2. CALL RXFUNCADD 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  3. CALL SysLoadFuncs
  4.  
  5. IniFile = 'PMDSKCPY.INI'
  6. IniApp  = 'PM_DISKCOPY'
  7. IniKey  = 'SCAN_PGM'
  8.  
  9. SAY 'Virus Scanner Setup for PM Diskcopy 2.1C or higher'
  10. SAY ''
  11. Rc = SYSFILETREE(IniFile,Dummy,'F')
  12. Default = 0
  13. IF (Rc = 0 & dummy.0 = 1) THEN DO
  14.   ScanFormatString = SYSINI(IniFile,IniApp,IniKey)
  15.   IF (ScanFormatString <> 'ERROR:') THEN
  16.     SAY 'Current Setting:' ScanFormatString ''
  17.   ELSE DO
  18.     SAY 'Current Setting: <PM Diskcopy default>'
  19.     Default = 1
  20.   END
  21. END
  22. ELSE DO
  23.   SAY 'INI-File' IniFile 'not found !'
  24.   SAY 'Be sure to start this command in the directory where'
  25.   SAY 'PM DISKCOPY was installed !'
  26.   SAY 'Press <ESC> to cancel or <ENTER> to go on...'
  27.   InKey = 0
  28.   DO WHILE (InKey <> 13 & InKey <> 27)
  29.     PARSE UPPER VALUE SYSGETKEY('NOECHO') WITH Key
  30.     InKey = c2d(key)
  31.   END
  32.   IF (InKey = 27) THEN DO
  33.     SAY 'Command canceled'
  34.     EXIT 1
  35.   END
  36. END
  37.  
  38. IF (Default = 0) THEN DO
  39.   SAY 'Return to PM Diskcopy default setting (Y/N) ?'
  40.   InKey = 0
  41.   DO WHILE (InKey <> 'Y' & InKey <> 'N')
  42.     PARSE UPPER VALUE SYSGETKEY('NOECHO') WITH InKey
  43.   END
  44.   IF (Inkey = 'Y') THEN DO
  45.     Rc = SYSINI(IniFile,IniApp,IniKey,'DELETE:')
  46.     IF (Rc = 'ERROR:') THEN
  47.       SAY 'Update of INI-File' IniFile 'failed!'
  48.     ELSE
  49.       SAY 'Setting for virus scanner returned to default.'
  50.     EXIT 0
  51.   END
  52. END
  53.  
  54. SAY 'Now enter the new setting and press <ENTER>'
  55. SAY '(Only pressing <ENTER> will leave the setting unchanged)'
  56. SAY 'e.g.   D:\TOOLS\ANTIVIR.EXE /SCAN %D'
  57. SAY '  or   C:\OS2\APPS\OS2SCAN.EXE %D'
  58. SAY 'note:  %D is a placeholder for the selected drive of PM Diskcopy.'
  59. SAY '       If your virus scanner supports the name of the drive to be'
  60. SAY '       scanned on the command line, just use %D instead of the drive'
  61. SAY '       name. PM Diskcopy will then replace %D with the real drive name'
  62. SAY '       (e.g. A: or B:).'
  63. PULL Answer
  64. IF (answer <> '') THEN DO
  65.   Rc = SYSINI(IniFile,IniApp,IniKey,answer||D2C(0))
  66.   IF (Rc = 'ERROR:') THEN
  67.     SAY 'Update of INI-File' IniFile 'failed!'
  68.   ELSE
  69.     SAY 'New setting of virus scanner:' answer
  70. END
  71. ELSE
  72.   SAY 'Setting for virus scanner not changed.'
  73.  
  74. EXIT 0
  75.