home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / xwplascr.zip / XWPL0208.ZIP / release / install / soundoff.cmd < prev    next >
OS/2 REXX Batch file  |  2000-01-04  |  1KB  |  35 lines

  1. /* SOUNDOFF.CMD: this script disables all XFolder sounds in
  2.    case something goes severely wrong
  3.    (W) (C) Ulrich Möller. All rights reserved.
  4.  */
  5.  
  6. "@echo off"
  7. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  8. call SysLoadFuncs
  9.  
  10. say "This script will disable all XFolder sounds, while leaving all the "
  11. say "other system sounds intact. Use this script in case you keep getting "
  12. say "errors when XFolder tries to play sounds."
  13. call charout ,"Are you sure you wish to disable XFolder sounds? (Y/N) >"
  14. key = ''
  15. do until (pos(key,"YN") > 0)
  16.    key = translate(SysGetKey("NOECHO"))
  17. end;
  18. say key;
  19. say "";
  20. if (key = "Y") then do
  21.     MMINI = GetBootDrive()||"\MMOS2\MMPM.INI";
  22.     rc = SysINI(MMINI, "MMPM2_AlarmSounds", "555", "DELETE:");
  23.     rc = SysINI(MMINI, "MMPM2_AlarmSounds", "556", "DELETE:");
  24.     rc = SysINI(MMINI, "MMPM2_AlarmSounds", "558", "DELETE:");
  25.     rc = SysINI(MMINI, "MMPM2_AlarmSounds", "559", "DELETE:");
  26.     rc = SysINI(MMINI, "MMPM2_AlarmSounds", "560", "DELETE:");
  27. end;
  28.  
  29. exit;
  30.  
  31. GetBootDrive: procedure
  32.     parse upper value VALUE( "PATH",, "OS2ENVIRONMENT" ) with "\OS2\SYSTEM" -2 boot_drive +2
  33. return boot_drive
  34.  
  35.