home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1997 November / PCO1197.ISO / FilesBBS / OS2 / CL079WB1.ARJ / CL079WB1.ZIP / ClearINI.CMD < prev    next >
Encoding:
Text File  |  1997-08-19  |  1.9 KB  |  61 lines

  1. /* ClearINI.CMD    REXX script to remove CantaLoup-entries from INI-Files     */
  2. /*                 CantaLoup 0.79 WB1                                         */
  3.  
  4. /* uses SysIni to change User-INI */
  5. CALL RxFuncAdd 'SysIni', 'rexxutil', 'SysIni'
  6. CALL RxFuncAdd 'SysCls', 'rexxutil', 'SysCls'
  7.  
  8. value       = ''
  9. task        = 1
  10. application = 'CantaLoup Mailer '
  11. iniPathFile = VALUE('CL',, OS2ENVIRONMENT)
  12. if iniPathFile <> "" THEN do
  13.     string = SUBSTR(iniPathFile, LENGTH(iniPathFile), 1)
  14.     if (string <> '\') & (string <> '/') THEN
  15.       iniPathFile=insert(IniPathFile,'\')
  16.    end
  17. iniPathFile=insert(IniPathFile, 'CL.INI')
  18.  
  19. call SysCls
  20. say '-------------------------------------------------------------------------------'
  21. say '   CantaLoup 0.79 WB1 -- remove CantaLoup INI-entries'
  22. say
  23. say '   This Procedure will help you removing INI-entries for '
  24. say '   CantaLoup 0.79 WB1'
  25. say '-------------------------------------------------------------------------------'
  26. say
  27. say 'Remove CantaLoup settings from INI-File? (y|n) : ';
  28. call charout , '--> ';
  29. pull answer;
  30. if translate(answer)='Y' then do
  31.    Say 'Please enter the full name of the INI-File. (with directory)'
  32.    Say '(default: 'iniPathFile') '
  33.    call charout , '--> ';
  34.    pull inifile
  35.    If inifile = "" Then inifile = iniPathFile
  36.  
  37.    Say 'Please enter the Task number.'
  38.    Say '(default: 'task')'
  39.    call charout , '-->';
  40.    pull task
  41.  
  42.    If task = "" THEN task = 1;
  43.    If task < 10 then application = insert(application, "0")
  44.    application = insert(application, task);
  45.  
  46.    keyname     = 'Info 00'
  47.    call SysIni inifile, application, keyname, value
  48.    call charout , '   .';
  49.  
  50.    keyname     = 'Event 00'
  51.    call SysIni inifile, application, keyname, value
  52.    call charout , '   .';
  53.  
  54.    say
  55.    say '   CantaLoup Task 'task' settings removed.'
  56. end
  57. else
  58.    say '   Keeping CantaLoup settings.'
  59.  
  60.  
  61.