home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / new-lnch.zip / NEW-LNCH.CMD next >
OS/2 REXX Batch file  |  1994-11-15  |  3KB  |  61 lines

  1. /* New-Lnch.cmd            Modify, Eliminate, or Restore the LaunchPad */
  2. /* copyright Joe Gilvary, 1994 */
  3.  
  4. ARG action
  5. call rxfuncadd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
  6. call sysloadfuncs
  7. SELECT
  8.    when (action='M' | action='E') then DO
  9.       Call Aistriu
  10.       exit
  11.    end
  12.    when action='R' then DO
  13.       Call Deisiu
  14.       exit
  15.    end
  16.    when action='H' then DO
  17.       "Type new-lnch.txt | more"
  18.        exit
  19.    end
  20. otherwise DO
  21.        SAY
  22.        SAY " This REXX program will (M)odify, (E)liminate, or (R)estore the LaunchPad,"
  23.        SAY " but you must input one of the letters 'M, E, or R' at the command line."
  24.        SAY " For example, to restore the LaunchPad as it existed when you installed Warp,"
  25.        SAY " type 'NEW-LNCH R' and press enter. You can use upper or lower case letters."
  26.        SAY " You don't need to (R)estore an original LaunchPad to install the modified"
  27.        SAY " version. You can use (M)odify or (R)estore at any time. If you want to be rid"
  28.        SAY " of the LaunchPad, or want to use the modified version, remove 'LAUNCHPAD'"
  29.        SAY " from the 'AUTOSTART' line of your config.sys file."
  30.        SAY
  31.       exit
  32.      end
  33. end
  34.  
  35. /* The real work */
  36. /* Aistriú will optionally remove the LaunchPad, or remove the original and create a new */
  37. /* LaunchPad that doesn't know about the double click of MB1 on the Desktop.               */
  38.  
  39. /* If you want to have only a modified LaunchPad, remove the "LAUNCHPAD" from the  */
  40. /* "AUTOSTART" line in your config.sys. OS/2 will recreate the original LaunchPad itself */
  41. /* at your next reboot, and then you'll have TWO LaunchPads, one of each flavor.            */
  42.  
  43. Aistriu:
  44. call SysDestroyObject '<WP_LAUNCHPAD>'
  45. call SysDestroyObject '<WP_LaunchPad>'
  46. IF action='E' THEN exit
  47. classresult=SysRegisterObjectClass('WPLaunchPad', PMWP)
  48. objectresult=SysCreateObject('WPLaunchPad' ,  'LaunchPad' ,  '<WP_DESKTOP>', 'OBJECTID=<WP_LaunchPad>')
  49. exit
  50.  
  51. /* Deisiú will restore the LaunchPad with its installation time default settings. This means   */
  52. /* using 'new-lnch r' will install a LaunchPad on your desktop which pops up when you      */
  53. /* double-click MB1 on the Desktop, just as it did immediately after your Warp install.         */
  54. /* You can accomplish the same thing by placing "LAUNCHPAD" in your "AUTOSTART" */
  55. /* line of the config.sys file. That will NOT remove the modified LaunchPad, however.        */
  56.  
  57. Deisiu:
  58. call SysDestroyObject '<WP_LaunchPad>'
  59. objectresult=SysCreateObject('WPLaunchPad' ,  'LaunchPad' ,  '<WP_DESKTOP>', 'OBJECTID=<WP_LAUNCHPAD>')
  60. exit
  61.