home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / welc21.zip / WELC21.CMD
OS/2 REXX Batch file  |  1993-07-30  |  16KB  |  448 lines

  1. /***************************************************************/
  2. /*                  WELC21.CMD                                 */
  3. /*                                                             */
  4. /*      This Rexx file recreates the Preinstalled Essentials   */
  5. /*      Folder and all of its utilities on OS/2 V2.1           */
  6. /*      Preloaded Systems. If the Executable files that are    */
  7. /*      associated with the Preinstalled Essentials Folder are */
  8. /*      removed from the hard drive, this program will not     */
  9. /*      completely restore the Preinstalled Essentials Folder  */
  10. /*      to its original state.                                */
  11. /*                                                             */
  12. /*      This is an updated utility to work specifically with   */
  13. /*      OS/2 V2.1 Preloaded Systems.  The previous utility     */
  14. /*      that Welc21.Cmd is replacing is named Welcome.Cmd.     */
  15. /*      Welcome.Cmd should still be used for OS/2 V2.0         */
  16. /*      Preloaded Systems to recreate the Welcome Folder.      */
  17. /*                                                             */
  18. /*                      Shawn McAlhany                         */
  19. /*                     29-30 July 1993                            */
  20. /***************************************************************/
  21.  
  22. /***************************************************************/
  23. /* This procedure explains the utility to the user and calls   */
  24. /* other procedures to continue or terminate the program.      */
  25. /***************************************************************/
  26.  
  27. call rxfuncadd 'sysloadfuncs', 'rexxutil', 'sysloadfuncs'
  28. call sysloadfuncs                /* register system functions */
  29. address cmd 'echo off'          /* echo is turned off */
  30.  
  31. 'cls'
  32. say
  33. say
  34. say '     *   *   *  *******  *        *******  *******  *     *  *******'
  35. say '      * * * *   *        *        *        *     *  **   **  *'
  36. say '      * * * *   *******  *        *        *     *  * * * *  *******'
  37. say '      * * * *   *        *        *        *     *  *  *  *  *'
  38. say '       *   *    *******  *******  *******  *******  *  *  *  *******'
  39. say
  40. say
  41. say'                                WELC21.CMD'
  42. say                                                             
  43. say'      This Rexx file recreates the Preinstalled Essentials Folder and all'
  44. say'      of its utilities on OS/2 V2.1 Preloaded Systems. If the Executable'
  45. say'      files that are associated with the Preinstalled Essentials Folder' 
  46. say'      are removed from the hard drive, this program will not completely'
  47. say'      restore the Preinstalled Essentials Folder to its original state.'
  48. say                                     
  49. say'      This is an updated utility to work specifically with OS/2 V2.1'
  50. say'      Preloaded Systems.  The previous utility that Welc21.Cmd is'
  51. say'      replacing is named Welcome.Cmd. Welcome.Cmd should still be used'
  52. say'      for OS/2 V2.0 Preloaded Systems to recreate the Welcome Folder.'
  53. say
  54. say'                               Page (1 of 2)'
  55. say
  56. say
  57. 'pause'
  58. 'cls'
  59. say
  60. say
  61. say
  62. say'      Note:  The book files run quicker when created using this utility.'
  63. say'      If you really care to read those boring Logo Screens while the'
  64. say'      books are loading just highlight the book icon, click the right'
  65. say'      mouse button and then click on the arrow to the right of open, and'
  66. say'      then settings. Go under the Session Tab and then into the DOS'
  67. say'      Settings. Locate Video_Retrace_Emulation towards the bottom and'
  68. say'      set this to OFF.'
  69. say
  70. say'                               Shawn McAlhany'
  71. say'                               29-30 July 1993'
  72. say
  73. say
  74. say
  75. say'                               Page (2 of 2)'
  76. say
  77. say
  78. call option
  79.  
  80. say
  81. say 'Program has been asked to continue at the users discretion...'
  82.  
  83. 'cls'
  84. call create_folder
  85.  
  86. end:
  87.  
  88. say
  89. say 'Creation of the Welcome Folder has been completed.'
  90. say 'The Welcome Folder that came with the preloaded system'
  91. say 'had two more folders in the Applications folder.  These folders'
  92. say 'are named Games and Productivity and are both located in'
  93. say 'the OS/2 System icon.'
  94. say
  95. say 'Any fixes or updates to this utility will be available on' 
  96. say 'the IBM Bulletin Board System.'
  97. say
  98. say 'Creator: Shawn McAlhany'
  99. say
  100.  
  101. call quit
  102.  
  103. /***************************************************************/ 
  104. /* Procedure: create_folder                                    */
  105. /*                                                             */
  106. /* This procedure creates the icons and folders that are part  */
  107. /* of the original Welcome Folder.                             */
  108. /***************************************************************/    
  109.  
  110. create_folder:
  111.  
  112. say
  113. say 'Creating Welcome Folder...'
  114.  
  115. /* create Welcome Folder */
  116.  
  117. rc = SysCreateObject('WPFolder','Preinstalled Essentials','<WP_DESKTOP>','OBJECTID=<WELCOME>;','R')
  118. if rc = 1 then do
  119.    say 'Preinstalled Essentials folder was successfully installed.'
  120. end /* do */
  121.  
  122. else do
  123.    say
  124.    say 'A problem occured during the installation of the'
  125.    say 'Welcome folder.  This folder was not'
  126.    say 'created successfully.'
  127.    call reason
  128.    say
  129. end /* do */
  130.  
  131. /* create Configuration Tools in Welcome Folder */
  132.  
  133. rc = SysCreateObject('WPFolder','Configuration Tools','<WELCOME>','OBJECTID=<CONFIGURE>;ICONFILE=\OS2\INSTALL\PRELOAD\TOOLS.ICO','R')
  134.  
  135. if rc = 1 then do
  136.    say 'Configuration Tools folder was successfully installed.'
  137. end /* do */
  138.  
  139. else do
  140.    say
  141.    say 'A problem occured during the installation of the'
  142.    say 'Configuration Tools folder .  This folder was not'
  143.    say 'created successfully.'
  144.    call reason
  145.    say
  146. end /* do */
  147.  
  148. /* create Applications Folder in Welcome Folder */
  149.  
  150. rc = SysCreateObject('WPFolder','Applications','<WELCOME>','OBJECTID=<APPS>','R')
  151. if rc = 1 then do
  152.    say 'Applications folder was successfully installed.'
  153. end /* do */
  154.  
  155. else do
  156.    say
  157.    say 'A problem occured during the installation of the'
  158.    say 'Applications folder.  This folder was not'
  159.    say 'created successfully.'
  160.    call reason
  161.    say
  162. end /* do */
  163.  
  164. /* create Features Folder in Welcome Folder */
  165.  
  166. rc = SysCreateObject('WPFolder','Features','<WELCOME>','OBJECTID=<FEATURES>','R')
  167. if rc = 1 then do
  168.    say 'Features folder was successfully installed.'
  169. end /* do */
  170.  
  171. else do
  172.    say
  173.    say 'A problem occured during the installation of the'
  174.    say 'Features folder.  This folder was not'
  175.    say 'created successfully.'
  176.    call reason
  177.    say
  178. end /* do */
  179.  
  180. /* create Tutorials Folder in Welcome Folder */
  181.  
  182. rc = SysCreateObject('WPFolder','Tutorials','<WELCOME>','OBJECTID=<TUTORIALS>;ICONFILE=C:\OS2\INSTALL\PRELOAD\TUTFOLD.ICO','R')
  183. if rc = 1 then do
  184.    say 'Tutorials folder was successfully installed.'
  185. end /* do */
  186.  
  187. else do
  188.    say
  189.    say 'A problem occured during the installation of the'
  190.    say 'Tutorials folder.  This folder was not'
  191.    say 'created successfully.'
  192.    call reason
  193.    say
  194. end /* do */
  195.  
  196. /* create Welcome & Quick Tour Book in Welcome Folder */
  197.  
  198. rc = SysCreateObject('WPProgram','Essentials Quick Tour','<WELCOME>','EXENAME=\OS2\VIEW.EXE;PROGTYPE=PM;PARAMETERS=QTOUR.INF INTRODUCTION;STARTUPDIR=\OS2\INSTALL\PRELOAD\;','R')
  199.  
  200. if rc = 1 then do
  201.    say 'Essentials Quick Tour icon was successfully installed.'
  202. end /* do */
  203.  
  204. else do
  205.    say
  206.    say 'A problem occured during the installation of the'
  207.    say 'Welcome & Quick Tour icon.  This icon was not'
  208.    say 'created successfully.'
  209.    call reason
  210.    say
  211. end /* do */
  212.  
  213. /* create Create Utility Diskettes in Configuration Tools folder */
  214.  
  215. rc = SysCreateObject('WPProgram','Create Utility Diskettes','<CONFIGURE>','EXENAME=\OS2\INSTALL\PRELOAD\BOOTDISK.EXE;PROGTYPE=PM;PARAMETERS=;STARTUPDIR=\OS2\INSTALL\PRELOAD\;','R')
  216.                                                                                                                                                                             
  217. if rc = 1 then do
  218.    say 'Create Utility Diskettes icon was successfully installed.'
  219. end /* do */
  220.  
  221. else do
  222.    say
  223.    say 'A problem occured during the installation of the'
  224.    say 'Create Utility Diskettes icon.  This icon was not'
  225.    say 'created successfully.'
  226.    call reason
  227.    say
  228. end /* do */
  229.  
  230. /* create Configure in Configuration Tools folder */
  231.  
  232. rc = SysCreateObject('WPProgram','Configure','<CONFIGURE>','EXENAME=\OS2\INSTALL\PRELOAD\CONFIG.EXE;PROGTYPE=PM;PARAMETERS=;STARTUPDIR=\OS2\INSTALL\PRELOAD\;','R')
  233.  
  234. if rc = 1 then do
  235.    say 'Configure icon was successfully installed.'
  236. end /* do */
  237.  
  238. else do
  239.    say
  240.    say 'A problem occured during the installation of the'
  241.    say 'Configure icon.  This icon was not'
  242.    say 'created successfully.'
  243.    call reason
  244.    say
  245. end /* do */
  246.  
  247. /* create Selective Uninstall in Configuration Tools folder */
  248.  
  249. rc = SysCreateObject('WPProgram','Selective Uninstall','<CONFIGURE>','EXENAME=\OS2\INSTALL\PRELOAD\UNINSTAL.EXE;PROGTYPE=PM;PARAMETERS=;STARTUPDIR=\OS2\INSTALL\PRELOAD\;','R')
  250.  
  251. if rc = 1 then do
  252.    say 'Selective Uninstall icon was successfully installed.'
  253. end /* do */
  254.  
  255. else do
  256.    say
  257.    say 'A problem occured during the installation of the'
  258.    say 'Selective Unistall icon.  This icon was not'
  259.    say 'created successfully.'
  260.    call reason
  261.    say
  262. end  /* do */
  263.  
  264. /* create Application Installation Overview in Applications folder */
  265.  
  266. rc = SysCreateObject('WPProgram','Application Installation Overview','<APPS>','EXENAME=\OS2\VIEW.EXE;PROGTYPE=PM;PARAMETERS=INSTALL.INF INSTALLING YOUR APPLICATIONS;STARTUPDIR=\OS2\INSTALL\PRELOAD\;','R')
  267.  
  268. if rc = 1 then do
  269.    say 'Application Installation Overview icon was successfully installed.'
  270. end /* do */
  271.  
  272. else do
  273.    say
  274.    say 'A problem occured during the installation of the'
  275.    say 'Application Installation Overview.  This icon was not'
  276.    say 'created successfully.'
  277.    call reason
  278.    say
  279. end /* do */
  280.  
  281. /* create Services and Support in Features folder */
  282.  
  283. rc = SysCreateObject('WPProgram','Services and Support','<FEATURES>','EXENAME=\OS2\VIEW.EXE;PROGTYPE=PM;PARAMETERS=SERVICES.INF SERVICES AND SUPPORT;STARTUPDIR=\OS2\INSTALL\PRELOAD\;ICONFILE=C:\OS2\INSTALL\PRELOAD\HLPWARER.ICO','R')
  284.  
  285. if rc = 1 then do
  286.    say 'Services and Support icon was successfully installed.'
  287. end /* do */
  288.  
  289. else do
  290.    say
  291.    say 'A problem occured during the installation of the'
  292.    say 'Services and Support.  This icon was not'
  293.    say 'created successfully.'
  294.    call reason
  295.    say
  296. end /* do */
  297.  
  298. /* Preloaded 85XX systems do not come with the System Information */
  299. /* Utility.  This procedure prompts the user for a system of this type. */
  300. /* If the system is an 85XX Type, it will not install the System       */
  301. /* Information Utility, otherwise, it will be installed.                   */
  302.  
  303. say
  304. say 'Look on or below the faceplate of the computer, where the power button'
  305. say 'is located, for a label that mentions the Type.  Use the first four digits'
  306. say 'of the Type to answer the following question:'
  307. say 'Is this computer an 8556 or 8557 Type (Y/N)?'
  308. Pull Answer
  309. 'cls'
  310. if Answer = 'Y' then
  311.    call jump
  312. else
  313.    nop
  314.  
  315. say
  316. /* create Your System in Features folder */
  317.  
  318. rc = SysCreateObject('WPProgram','Your System','<FEATURES>','EXENAME=\OS2\APPS\SYSINFO.EXE;PROGTYPE=PM;PARAMETERS=;STARTUPDIR=\OS2\APPS\;','R')
  319.  
  320. if rc = 1 then do
  321.    say 'Your System icon was successfully installed.'
  322. end /* do */
  323.  
  324. else do
  325.    say
  326.    say 'A problem occured during the installation of the'
  327.    say 'Your System icon.  This icon was not'
  328.    say 'created successfully.'
  329.    call reason
  330.    say
  331. end /* do */
  332.  
  333. jump:
  334.  
  335. /* create For the DOS User in Tutorials folder */
  336.  
  337. rc = SysCreateObject('WPProgram','For the DOS User','<TUTORIALS>','EXENAME=\OS2\INSTALL\PRELOAD\DOSUSER.EXE;PROGTYPE=VDM;PARAMETERS=D;STARTUPDIR=\OS2\INSTALL\PRELOAD\;','R')
  338.  
  339. if rc = 1 then do
  340.    say 'For the DOS User icon was successfully installed.'
  341. end /* do */
  342.  
  343. else do
  344.    say
  345.    say 'A problem occured during the installation of the'
  346.    say 'Your System icon.  This icon was not'
  347.    say 'created successfully.'
  348.    call reason
  349.    say
  350. end /* do */    
  351.  
  352. /* create System Overview in Tutorials folder */
  353.  
  354. rc = SysCreateObject('WPProgram','System Overview','<TUTORIALS>','EXENAME=\OS2\INSTALL\PRELOAD\SYSOVER.EXE;PROGTYPE=VDM;PARAMETERS=;STARTUPDIR=\OS2\INSTALL\PRELOAD\;ICONFILE=C:\OS2\INSTALL\PRELOAD\OSTUTOR.ICO','R')
  355.  
  356. if rc = 1 then do
  357.    say 'System Overview icon was successfully installed.'
  358. end /* do */
  359.  
  360. else do
  361.    say
  362.    say 'A problem occured during the installation of the'
  363.    say 'System Overview icon.  This icon was not'
  364.    say 'created successfully.'
  365.    call reason
  366.    say
  367. end /* do */    
  368.  
  369. /* create Application Installation Overview in Tutorials folder */
  370.  
  371. rc = SysCreateObject('WPProgram','Application Installation Overview','<TUTORIALS>','EXENAME=\OS2\VIEW.EXE;PROGTYPE=PM;PARAMETERS=INSTALL.INF INSTALLING YOUR APPLICATIONS;STARTUPDIR=\OS2\INSTALL\PRELOAD\;','R')
  372.  
  373. if rc = 1 then do
  374.    say 'Application Installation Overview icon was successfully installed.'
  375. end /* do */
  376.  
  377. else do
  378.    say
  379.    say 'A problem occured during the installation of the'
  380.    say 'Application Installation Overview.  This icon was not'
  381.    say 'created successfully.'
  382.    call reason
  383.    say
  384. end /* do */
  385.  
  386. /* create Tutorial in the Tutorials folder */
  387.  
  388. rc = SysCreateObject('WPProgram','Tutorial','<TUTORIALS>','EXENAME=\OS2\TUTORIAL.EXE;PROGTYPE=PM;STARTUPDIR=\OS2\HELP\;','R')
  389.  
  390. if rc = 1 then do
  391.    say 'Tutorial icon was successfully installed.'
  392. end /* do */
  393.  
  394. else do
  395.    say
  396.    say 'A problem occured during the installation of the'
  397.    say 'System Overview icon.  This icon was not'
  398.    say 'created successfully.'
  399.    call reason
  400.    say
  401. end /* do */   
  402.  
  403. call end
  404.  
  405. /***************************************************************/
  406. /* Procedure: option                                           */
  407. /*                                                             */
  408. /* Prompts the user for continuation of creation of the        */
  409. /* Welcome Folder.                                             */
  410. /***************************************************************/
  411.  
  412. option:
  413.  
  414. Say "Do you want to continue (Y/N)?"
  415. Parse Upper Pull yesno .
  416. If Substr(yesno,1,1) <> 'Y' Then Call quit
  417.  
  418. return
  419.  
  420. /***************************************************************/ 
  421. /* Procedure: reason                                           */
  422. /*                                                             */
  423. /* This procedure gives the user some knowledge as to why the  */
  424. /* icon did not successfully install.                          */
  425. /***************************************************************/ 
  426.  
  427. reason:
  428.    say 'The icon may not have installed because:'
  429.    say '   1.  This is not a feature that was preloaded on your system.'
  430.    say '   2.  The executable file was not located on you system.  It'
  431.    say '       may have been deleted.'
  432. return
  433.  
  434. /***************************************************************/  
  435. /* Procedure: quit                                             */
  436. /*                                                             */
  437. /* This procedure terminates the program at the appropriate    */
  438. /* time.  Determined by user or program completion             */
  439. /***************************************************************/  
  440.  
  441. quit:
  442.  
  443. say
  444. say 'Program terminated.'
  445.  
  446. exit
  447.  
  448.