home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / ocim_snd.zip / SOUNDS.CMD < prev   
OS/2 REXX Batch file  |  1996-07-22  |  1KB  |  39 lines

  1. /* exit */
  2. /* Exit if no 2/REXX Support installed */
  3.  
  4. If RxFuncQuery('SysLoadFuncs') \= 0 Then
  5.   If RxFuncAdd('SysLoadFuncs','RexxUtil','SysLoadFuncs') <>0 Then Do
  6.     Say 'Unable to init REXX Utility function loader.'
  7.     signal ENDE
  8. end
  9. call SysLoadFuncs
  10.  
  11. IniFilename="OS2-CIM.INI"
  12.  
  13. arg cmdline  /* Copy command line arg to var cmdline */
  14.  
  15. call patch
  16.  
  17. signal ENDE
  18.  
  19. /* --------------------------------------------- */
  20. patch: procedure expose IniFilename LogFile
  21. "@attrib " IniFilename "-rh >NUL" 
  22.    /* Delete READ-ONLY and HIDDEN Atributes of INI File */
  23.  
  24. if stream(IniFilename,'c','query exists')="" then do 
  25.   say
  26.   say "ERROR: "IniFilename" does not exist in this directory!"
  27.   say "Current directory is:" directory()
  28.   "@pause"
  29.   signal ENDE
  30. end
  31.  
  32. say "Updating "IniFilename"..."
  33.  
  34. "@copy " IniFilename " BACKUP.INI >NUL"
  35.  
  36. erg=SysIni(IniFileName, "General Preferences", "Sounds", "ON"D2C(0)) 
  37. erg=SysIni(IniFileName, "Sounds", "Play-Sounds", "ON"D2C(0)) 
  38.  
  39. ENDE: