home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / xwplascr.zip / XWPL0208.ZIP / release / install / delobjs.cmd < prev    next >
OS/2 REXX Batch file  |  2002-05-02  |  4KB  |  159 lines

  1. /*
  2.     Delete XWorkplace installation objects.
  3.     (C) 2001 Ulrich Möller.
  4.  
  5.     NOTE: This file is the exact reverse to crobjXXX.cmd
  6.     and instlXXX.cmd, with XXX being the user's country code.
  7.  
  8.     While we need an NLS script for install to get the object
  9.     titles right, the deinstall script really needs no language
  10.     support, since we can just kill the objects by their
  11.     object IDs.
  12.  */
  13.  
  14. /* DO NOT CHANGE the following */
  15. call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
  16. call SysLoadFuncs
  17.  
  18. /* HERE COMES THE UNDO OF CROBJxxx.CMD (CONFIG FOLDER) */
  19.  
  20. /* items in config folder */
  21. rc = Destroy("<XWP_PACKTREE>");
  22. rc = Destroy("<XWP_TREESIZE>");
  23. rc = Destroy("<XWP_NETSCAPE>");
  24.  
  25. rc = Destroy("<XWP_SEP1>");
  26.  
  27. /* config subfolders */
  28.     rc = Destroy("<XWP_CONFIGCFGSHADOW>");
  29.     rc = Destroy("<XWORKPLACE_SETUPCFGSHADOW>");
  30.     rc = Destroy("<XWP_WPSCFGSHADOW>");
  31.     rc = Destroy("<XWP_WPMOUSECFGSHADOW>");
  32.     rc = Destroy("<XWP_WPKEYBCFGSHADOW>");
  33.     rc = Destroy("<XWP_SCREENCFGSHADOW>");
  34.     rc = Destroy("<XWP_KERNELCFGSHADOW>");
  35.     rc = Destroy("<XWP_SEP41>");
  36.     rc = Destroy("<XWP_REFCFGSHADOW>");
  37.     rc = Destroy("<XWP_SEP42>");
  38. rc = Destroy("<XWP_CFG4>");
  39.  
  40.     rc = Destroy("<XWP_ICOSMALL>;");
  41.     rc = Destroy("<XWP_ICONORM>;");
  42.     rc = Destroy("<XWP_SHOWALL>;");
  43.         rc = Destroy("<XWP_DEFICON>;");
  44.         rc = Destroy("<XWP_DEFTREE>;");
  45.         rc = Destroy("<XWP_DEFDETLS>;");
  46.     rc = Destroy("<XWP_CFG3_1>");
  47. rc = Destroy("<XWP_CFG3>");
  48.  
  49.     rc = Destroy("<XWP_FOLDERTEMPLATE>");
  50.     rc = Destroy("<XWP_PROGRAMTEMPLATE>");
  51. rc = Destroy("<XWP_CFG2>");
  52.  
  53.     rc = Destroy("<XWP_CMDSHL>");
  54.     rc = Destroy("<XWP_BASH>");
  55.     rc = Destroy("<XWP_KSH>");
  56.     rc = Destroy("<XWP_OS2WIN>");
  57.     rc = Destroy("<XWP_OS2FULL>");
  58.     rc = Destroy("<XWP_DOSWIN>");
  59.     rc = Destroy("<XWP_DOSFULL>");
  60. rc = Destroy("<XWP_CFG1>");
  61.  
  62. /* kill config folder itself */
  63. rc = Destroy("<XWP_CONFIG>");
  64.  
  65.  
  66. /* HERE COMES THE UNDO OF INSTLxxx.CMD (INSTALL FOLDER) */
  67.  
  68.  
  69. /* the following three added with V0.9.19 */
  70. /* create "Lockup" setup string object */
  71. rc = Destroy("<XWP_LOCKUPSTR>");
  72.  
  73. /* create "Find objects" setup string object */
  74. rc = Destroy("<XWP_FINDSTR>");
  75.  
  76. /* create "Shutdown" setup string object */
  77. rc = Destroy("<XWP_SHUTDOWNSTR>");
  78.  
  79. /* XShutdown... changed with V0.9.7 */
  80. rc = Destroy("<XWP_XSHUTDOWN>");
  81.  
  82. /*  "Setup String" template (added V0.9.5) */
  83. rc = Destroy("<XWP_STRINGTPL>");
  84.  
  85. /*  "WPS Class List" (added V0.9.2) */
  86. rc = Destroy("<XWP_CLASSLISTMAINSHADOW>");
  87. rc = Destroy("<XWP_CLASSLIST>");
  88.  
  89. /* "Mouse" shadow (added V0.9.2) */
  90. rc = Destroy("<XWP_MOUSEMAINSHADOW>");
  91. /* "Keyboard" shadow (added V0.9.2) */
  92. rc = Destroy("<XWP_KEYBMAINSHADOW>");
  93. /* "Sound" shadow (added V0.9.2) */
  94. rc = Destroy("<XWP_SOUNDMAINSHADOW>");
  95.  
  96. /*  "Media" (added V0.9.5) */
  97. rc = Destroy("<XWP_MEDIAMAINSHADOW>");
  98. rc = Destroy("<XWP_MEDIA>");
  99.  
  100. /*  "Screen" (added V0.9.2) */
  101. rc = Destroy("<XWP_SCREENMAINSHADOW>");
  102. rc = Destroy("<XWP_SCREEN>");
  103.  
  104. /*  "OS/2 Kernel" */
  105. rc = Destroy("<XWP_KERNELMAINSHADOW>");
  106. rc = Destroy("<XWP_KERNEL>");
  107.  
  108. /*  "Workplace Shell" */
  109. rc = Destroy("<XWP_WPSMAINSHADOW>");
  110. rc = Destroy("<XWP_WPS>");
  111.  
  112. /* "Font folder" ... added with V0.9.7 */
  113. rc = Destroy("<XWP_FONTFOLDERSHADOW>");
  114. rc = Destroy("<XWP_FONTFOLDER>");
  115.  
  116. /*  XCenter (V0.9.7) */
  117. rc = Destroy("<XWP_XCENTER>");
  118.  
  119. /*  "XWorkplace Setup" (added V0.9.0) */
  120. rc = Destroy("<XWP_SETUPMAINSHADOW>");
  121. rc = Destroy("<XWORKPLACE_SETUP>");
  122.  
  123. /* "Readme" shadow (added V0.9.2) */
  124. rc = Destroy("<XWP_READMEMAINSHADOW>");
  125.  
  126. /* User Guide */
  127. rc = Destroy("<XWP_REF>");
  128.  
  129. /* "SmartGuide" introduction: this was removed with V0.9.7, but still kill it */
  130. rc = Destroy("<XWP_INTRO>");
  131.  
  132. /* IN ADDITION, DESTROY TRASH CAN... THIS IS NOT IN THE INSTALL SCRIPT */
  133. rc = Destroy("<XWP_TRASHCAN>");
  134.  
  135. /* finally, destroy install folder */
  136. rc = Destroy("<XWP_MAINFLDR>");
  137.  
  138.  
  139. exit;
  140.  
  141. /* Destroy(): sneaky little subproc which first sets the NODELETE=NO style
  142.    to make sure we can really delete the object and then does a SysDestroyObject
  143.    on it. */
  144.  
  145. Destroy:
  146. parse arg objid
  147.  
  148. call charout , 'Killing object ID "'objid'"...'
  149.  
  150. rc = SysSetObjectData(objid, "NODELETE=NO;");
  151. if (rc \= 0) then do
  152.     /* got that: */
  153.     rc = SysDestroyObject(objid);
  154. end
  155.  
  156. if (rc \= 0) then say " OK"; else say " failed.";
  157.  
  158. return rc;
  159.