home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / reset.cmd < prev    next >
OS/2 REXX Batch file  |  1994-08-11  |  3KB  |  89 lines

  1. /*
  2. **  RESETOBJ.CMD
  3. **
  4. **  Rebuild VisPro/REXX program objects in the workplace shell desktop folder
  5. */
  6.  
  7. '@echo off'
  8.  
  9. CALL RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  10. CALL SysLoadFuncs
  11.  
  12. CALL SysCls
  13.  
  14. SAY "This program will restore the VisPro/REXX Workplace Shell objects"
  15. SAY "on your desktop.  You may use this program if the VisPro/REXX"
  16. SAY "folder on your desktop was accidentally deleted or corrupted."
  17. SAY "If you have not installed VisPro/REXX yet, you will need to do"
  18. SAY "so before running this program."
  19. SAY ""
  20. SAY "Press Y to continue, or N to exit the program.  "
  21.  
  22. ANSWER=SysGetKey()
  23. PARSE UPPER VALUE ANSWER with ANSWER
  24.  
  25. IF ANSWER <> 'Y' THEN
  26.    EXIT
  27. OS2_DIR= SysSearchPath('PATH','CMD.EXE')
  28. OSDIR=LEFT(OS2_DIR,3)
  29.  
  30. CALL SysFileSearch 'SET VISPRORX=',OSDIR'CONFIG.SYS','FILE.'
  31.  
  32. i=FILE.0
  33. IF FILE.I <> 0 THEN DO
  34.    parse var file.i . '=' PRODUCTDIR
  35.    SAY ""
  36.    SAY "The VisPro/REXX objects will be reconstructed from the installation"
  37.    SAY "found in the "PRODUCTDIR" directory."
  38.    SAY ""
  39.    END
  40. ELSE DO
  41.    SAY ""
  42.    SAY "The VisPro/REXX path was not found in your CONFIG.SYS file."
  43.    SAY "You need to have VisPro/REXX installed and your CONFIG.SYS file"
  44.    SAY "updated before attempting to execute this program."
  45.    EXIT
  46.    END
  47.  
  48.  
  49. PROJECTDIR=PRODUCTDIR'\PROJECTS'
  50. SAMPLESDIR=PRODUCTDIR'\SAMPLES'
  51.  
  52. /* Create Workplace Shell folder for VisPro/REXX */
  53. Call SysCreateObject "WPFolder", "VisPro/REXX", "<WP_DESKTOP>","OBJECTID=<VISPRORX>;ICONFILE=" PRODUCTDIR"\VPRFLDR.ICO", "r"
  54.  
  55. /* Create 'Projects' subdirectory within the VisPro/REXX folder */
  56. Call SysCreateObject "WPShadow", "PROJECTS", "<VISPRORX>", "SHADOWID="PROJECTDIR||";OBJECTID=<VPPROJECTS>", "r"
  57.  
  58. /* Create 'Samples' subdirectory within the VisPro/REXX folder */
  59. Call SysCreateObject "WPShadow", "SAMPLES", "<VISPRORX>","SHADOWID="SAMPLESDIR";OBJECTID=<VPSAMPLES>", "r"
  60.  
  61. /* Create shadow of "READLAN.ME" within the VisPro/REXX folder */
  62. Call SysCreateObject "WPShadow", "READ.ME", "<VISPRORX>","SHADOWID="PRODUCTDIR"\read.me;OBJECTID=<VPREADME>", "r"
  63.  
  64. /* Create 'Project' template within the Projects folder of the VisPro/REXX folder */
  65. Call SysCreateObject "WPFolder", "Project", PROJECTDIR,"TEMPLATE=YES;ICONFILE=" PRODUCTDIR'\VPRFLDR.ICO', "r"
  66.  
  67. /* Creating shadow object for the Color Palette */
  68. Call SysCreateObject "WPShadow", "Color Palette", "<VISPRORX>","SHADOWID=<WP_CLRPAL>"||";OBJECTID=<VPCLRPAL>", "r"
  69.  
  70. /* Creating shadow object for the Font Palette */
  71. Call SysCreateObject "WPShadow", "Font Palette", "<VISPRORX>","SHADOWID=<WP_FNTPAL>"||";OBJECTID=<VP_FNTPAL>", "r"
  72.  
  73. /* Creating shadow object for the REXX Information book */
  74. Call SysCreateObject "WPShadow", "REXX Information", "<VISPRORX>","SHADOWID=<WP_REXREF>"||";OBJECTID=<VP_REXREF>", "r"
  75.  
  76. /* Creating shadow object for the QELIB Information book */
  77. CALL SysCreateObject "WPProgram","Q+E Information","<VISPRORX>","EXENAME=VIEW.EXE;PARAMETERS="PRODUCTDIR"\VPQELIB.INF;STARTUPDIR="PRODUCTDIR,"r"
  78.  
  79. /* Creating shadow object for the VisPro/REXX tutorial-demo */
  80. Call SysCreateObject "WPProgram", "Tutorial/Demo", "<VISPRORX>","EXENAME="PRODUCTDIR'\VPDEMO.EXE'||";OBJECTID=<VP_DEMO>", "r"
  81.  
  82. SAY ""
  83. SAY "VisPro/REXX objects successfully recreated."
  84.  
  85.  
  86. CALL SysDropFuncs
  87.  
  88. EXIT
  89.