home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / WELCOME.ZIP / WELCOME.BAK < prev    next >
Text File  |  1992-11-09  |  13KB  |  397 lines

  1. /***************************************************************/
  2. /*      This Rexx file recreates the Welcome Folder and        */
  3. /*      all of its utilities.  If the Executable files         */
  4. /*      that are related to the Welcome Folder are             */
  5. /*      removed from the hard drive, this program will         */
  6. /*      not completely restore the Welcome Folder to           */
  7. /*      its original state.                                    */
  8. /*                                                             */
  9. /*                      Shawn McAlhany                         */
  10. /*                     November 5, 1992                        */
  11. /*                 Completed: November 6, 1992                             */
  12. /***************************************************************/
  13.  
  14. /***************************************************************/
  15. /* This procedure explains the utility to the user and calls   */
  16. /* other procedures to continue or terminate the program.      */
  17. /***************************************************************/
  18.  
  19. call rxfuncadd 'sysloadfuncs', 'rexxutil', 'sysloadfuncs'
  20. call sysloadfuncs                /* register system functions */
  21. address cmd 'echo off'          /* echo is turned off */
  22.  
  23. say
  24. say 'This Rexx file recreates the Welcome Folder and' 
  25. say 'all of its utilities.  If the Executable files' 
  26. say 'that are related to the Welcome Folder are' 
  27. say 'removed from the hard drive, this program will'
  28. say 'not completely restore the Welcome Folder to'
  29. say 'its original state.'
  30. say
  31.  
  32. call option
  33.  
  34. say
  35. say 'Program has been asked to continue at the users discretion...'
  36.  
  37. call create_folder
  38.  
  39. say
  40. say 'Creation of the Welcome Folder has been completed.'
  41. say 'The Welcome Folder that came with the preloaded system'
  42. say 'had two more folders in the Applications folder.  These folders'
  43. say 'are named Games and Productivity and are both located in'
  44. say 'the OS/2 System icon.'
  45. say
  46. say 'Any fixes or updates to this utility will be available on' 
  47. say 'the IBM Bulletin Board System.'
  48. say
  49. say 'Creator: Shawn McAlhany'
  50. say
  51.  
  52. call quit
  53.  
  54. /***************************************************************/ 
  55. /* Procedure: create_folder                                    */
  56. /*                                                             */
  57. /* This procedure creates the icons and folders that are part  */
  58. /* of the original Welcome Folder.                             */
  59. /***************************************************************/    
  60.  
  61. create_folder:
  62.  
  63. say
  64. say 'Creating Welcome Folder...'
  65.  
  66. /* create Welcome Folder */
  67.  
  68. rc = SysCreateObject('WPFolder','Welcome','<WP_DESKTOP>','OBJECTID=<WELCOME>;','R')
  69. if rc = 1 then do
  70.    say 'Welcome folder was successfully installed.'
  71. end /* do */
  72.  
  73. else do
  74.    say
  75.    say 'A problem occured during the installation of the'
  76.    say 'Welcome folder.  This folder was not'
  77.    say 'created successfully.'
  78.    call reason
  79.    say
  80. end /* do */
  81.  
  82. /* create Configuration Tools in Welcome Folder */
  83.  
  84. rc = SysCreateObject('WPFolder','Configuration Tools','<WELCOME>','OBJECTID=<CONFIGURE>;ICONFILE=\OS2\INSTALL\PRELOAD\TOOLS.ICO','R')
  85.  
  86. if rc = 1 then do
  87.    say 'Configuration Tools folder was successfully installed.'
  88. end /* do */
  89.  
  90. else do
  91.    say
  92.    say 'A problem occured during the installation of the'
  93.    say 'Configuration Tools folder .  This folder was not'
  94.    say 'created successfully.'
  95.    call reason
  96.    say
  97. end /* do */
  98.  
  99. /* create Applications Folder in Welcome Folder */
  100.  
  101. rc = SysCreateObject('WPFolder','Applications','<WELCOME>','OBJECTID=<APPS>;','R')
  102. if rc = 1 then do
  103.    say 'Applications folder was successfully installed.'
  104. end /* do */
  105.  
  106. else do
  107.    say
  108.    say 'A problem occured during the installation of the'
  109.    say 'Applications folder.  This folder was not'
  110.    say 'created successfully.'
  111.    call reason
  112.    say
  113. end /* do */
  114.  
  115. /* create Features Folder in Welcome Folder */
  116.  
  117. rc = SysCreateObject('WPFolder','Features','<WELCOME>','OBJECTID=<FEATURES>;','R')
  118. if rc = 1 then do
  119.    say 'Features 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 'Features folder.  This folder was not'
  126.    say 'created successfully.'
  127.    call reason
  128.    say
  129. end /* do */
  130.  
  131. /* create Tutorials Folder in Welcome Folder */
  132.  
  133. rc = SysCreateObject('WPFolder','Tutorials','<WELCOME>','OBJECTID=<TUTORIALS>;','R')
  134. if rc = 1 then do
  135.    say 'Tutorials folder was successfully installed.'
  136. end /* do */
  137.  
  138. else do
  139.    say
  140.    say 'A problem occured during the installation of the'
  141.    say 'Tutorials folder.  This folder was not'
  142.    say 'created successfully.'
  143.    call reason
  144.    say
  145. end /* do */
  146.  
  147. /* create Welcome & Quick Tour Book in Welcome Folder */
  148.  
  149. rc = SysCreateObject('WPProgram','Welcome & Quick Tour','<WELCOME>','EXENAME=\OS2\VIEW.EXE;PROGTYPE=PM;PARAMETERS=QTOUR.INF WELCOME;STARTUPDIR=\OS2\INSTALL\PRELOAD\;','R')
  150.  
  151. if rc = 1 then do
  152.    say 'Welcome & Quick Tour icon was successfully installed.'
  153. end /* do */
  154.  
  155. else do
  156.    say
  157.    say 'A problem occured during the installation of the'
  158.    say 'Welcome & Quick Tour icon.  This icon was not'
  159.    say 'created successfully.'
  160.    call reason
  161.    say
  162. end /* do */
  163.  
  164. /* create Create Utility Diskettes in Configuration Tools folder */
  165.  
  166. rc = SysCreateObject('WPProgram','Create Utility Diskettes','<CONFIGURE>','EXENAME=\OS2\INSTALL\PRELOAD\BOOTDISK.EXE;PROGTYPE=PM;PARAMETERS=;STARTUPDIR=\OS2\INSTALL\PRELOAD\;','R')
  167.                                                                                                                                                                             
  168. if rc = 1 then do
  169.    say 'Create Utility Diskettes icon was successfully installed.'
  170. end /* do */
  171.  
  172. else do
  173.    say
  174.    say 'A problem occured during the installation of the'
  175.    say 'Create Utility Diskettes icon.  This icon was not'
  176.    say 'created successfully.'
  177.    call reason
  178.    say
  179. end /* do */
  180.  
  181. /* create Configure in Configuration Tools folder */
  182.  
  183. rc = SysCreateObject('WPProgram','Configure','<CONFIGURE>','EXENAME=\OS2\INSTALL\PRELOAD\CONFIG.EXE;PROGTYPE=PM;PARAMETERS=;STARTUPDIR=\OS2\INSTALL\PRELOAD\;','R')
  184.  
  185. if rc = 1 then do
  186.    say 'Configure icon was successfully installed.'
  187. end /* do */
  188.  
  189. else do
  190.    say
  191.    say 'A problem occured during the installation of the'
  192.    say 'Configure icon.  This icon was not'
  193.    say 'created successfully.'
  194.    call reason
  195.    say
  196. end /* do */
  197.  
  198. /* create Selective Uninstall in Configuration Tools folder */
  199.  
  200. rc = SysCreateObject('WPProgram','Selective Uninstall','<CONFIGURE>','EXENAME=\OS2\INSTALL\PRELOAD\UNINSTAL.EXE;PROGTYPE=PM;PARAMETERS=;STARTUPDIR=\OS2\INSTALL\PRELOAD\;','R')
  201.  
  202. if rc = 1 then do
  203.    say 'Selective Uninstall icon was successfully installed.'
  204. end /* do */
  205.  
  206. else do
  207.    say
  208.    say 'A problem occured during the installation of the'
  209.    say 'Selective Unistall icon.  This icon was not'
  210.    say 'created successfully.'
  211.    call reason
  212.    say
  213. end  /* do */
  214.  
  215. /* create Application Installation Overview in Applications folder */
  216.  
  217. rc = SysCreateObject('WPProgram','Application Installation Overview','<APPS>','EXENAME=\OS2\VIEW.EXE;PROGTYPE=PM;PARAMETERS=INSTALL.INF INSTALLING YOUR APPLICATIONS;STARTUPDIR=\OS2\INSTALL\PRELOAD\;','R')
  218.  
  219. if rc = 1 then do
  220.    say 'Application Installation Overview icon was successfully installed.'
  221. end /* do */
  222.  
  223. else do
  224.    say
  225.    say 'A problem occured during the installation of the'
  226.    say 'Application Installation Overview.  This icon was not'
  227.    say 'created successfully.'
  228.    call reason
  229.    say
  230. end /* do */
  231.  
  232. /* create Services and Support in Features folder */
  233.  
  234. rc = SysCreateObject('WPProgram','Services and Support','<FEATURES>','EXENAME=\OS2\VIEW.EXE;PROGTYPE=PM;PARAMETERS=SERVICES.INF SERVICES AND SUPPORT;STARTUPDIR=\OS2\INSTALL\PRELOAD\;','R')
  235.  
  236. if rc = 1 then do
  237.    say 'Services and Support icon was successfully installed.'
  238. end /* do */
  239.  
  240. else do
  241.    say
  242.    say 'A problem occured during the installation of the'
  243.    say 'Services and Support.  This icon was not'
  244.    say 'created successfully.'
  245.    call reason
  246.    say
  247. end /* do */
  248.  
  249. /* Preloaded 85XX systems do not come with the System Information */
  250. /* Utility.  This procedure will search for the executable file for this */
  251. /* utility on the hard drive and if it does not find it there, it will not */
  252. /* install it. */
  253.  
  254. fspec = ('\os2\apps', 'sysinfo.exe')
  255. say fspec
  256.  
  257. rc = sysfilesearch ('c:\os2\apps\sysinfo.exe')
  258.  
  259. if rc = 0 then
  260.    say 'sysinfo.exe was found'
  261.  
  262. if rc <> 0 then
  263.    call jump
  264.  
  265. /* create Your System in Features folder */
  266.  
  267. rc = SysCreateObject('WPProgram','Your System','<FEATURES>','EXENAME=\OS2\APPS\SYSINFO.EXE;PROGTYPE=PM;PARAMETERS=;STARTUPDIR=\OS2\APPS\;','R')
  268.  
  269. if rc = 1 then do
  270.    say 'Your System icon was successfully installed.'
  271. end /* do */
  272.  
  273. else do
  274.    say
  275.    say 'A problem occured during the installation of the'
  276.    say 'Your System icon.  This icon was not'
  277.    say 'created successfully.'
  278.    call reason
  279.    say
  280. end /* do */
  281.  
  282. jump:
  283.  
  284. /* create For the DOS User in Tutorials folder */
  285.  
  286. rc = SysCreateObject('WPProgram','For the DOS User','<TUTORIALS>','EXENAME=\OS2\INSTALL\PRELOAD\DOSUSER.EXE;PROGTYPE=DOSFULLSCREEN;PARAMETERS=D;STARTUPDIR=\OS2\INSTALL\PRELOAD\;','R')
  287.  
  288. if rc = 1 then do
  289.    say 'For the DOS User icon was successfully installed.'
  290. end /* do */
  291.  
  292. else do
  293.    say
  294.    say 'A problem occured during the installation of the'
  295.    say 'Your System icon.  This icon was not'
  296.    say 'created successfully.'
  297.    call reason
  298.    say
  299. end /* do */    
  300.  
  301. /* create System Overview in Tutorials folder */
  302.  
  303. rc = SysCreateObject('WPProgram','System Overview','<TUTORIALS>','EXENAME=\OS2\INSTALL\PRELOAD\SYSOVER.EXE;PROGTYPE=DOSFULLSCREEN;PARAMETERS=;STARTUPDIR=\OS2\INSTALL\PRELOAD\;','R')
  304.  
  305. if rc = 1 then do
  306.    say 'System Overview icon was successfully installed.'
  307. end /* do */
  308.  
  309. else do
  310.    say
  311.    say 'A problem occured during the installation of the'
  312.    say 'System Overview icon.  This icon was not'
  313.    say 'created successfully.'
  314.    call reason
  315.    say
  316. end /* do */    
  317.  
  318. /* create Application Installation Overview in Tutorials folder */
  319.  
  320. rc = SysCreateObject('WPProgram','Application Installation Overview','<TUTORIALS>','EXENAME=\OS2\VIEW.EXE;PROGTYPE=PM;PARAMETERS=INSTALL.INF INSTALLING YOUR APPLICATIONS;STARTUPDIR=\OS2\INSTALL\PRELOAD\;','R')
  321.  
  322. if rc = 1 then do
  323.    say 'Application Installation Overview icon was successfully installed.'
  324. end /* do */
  325.  
  326. else do
  327.    say
  328.    say 'A problem occured during the installation of the'
  329.    say 'Application Installation Overview.  This icon was not'
  330.    say 'created successfully.'
  331.    call reason
  332.    say
  333. end /* do */
  334.  
  335. /* create Tutorial in the Tutorials folder */
  336.  
  337. rc = SysCreateObject('WPProgram','Tutorial','<TUTORIALS>','EXENAME=\OS2\TUTORIAL.EXE;PROGTYPE=PM;PARAMETERS=D;STARTUPDIR=\OS2\HELP\;','R')
  338.  
  339. if rc = 1 then do
  340.    say 'Tutorial 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 'System Overview icon.  This icon was not'
  347.    say 'created successfully.'
  348.    call reason
  349.    say
  350. end /* do */   
  351.  
  352. return
  353.  
  354. /***************************************************************/
  355. /* Procedure: option                                           */
  356. /*                                                             */
  357. /* Prompts the user for continuation of creation of the        */
  358. /* Welcome Folder.                                             */
  359. /***************************************************************/
  360.  
  361. option:
  362.  
  363. Say "Do you want to continue (Y/N)?"
  364. Parse Upper Pull yesno .
  365. If Substr(yesno,1,1) <> 'Y' Then Call quit
  366.  
  367. return
  368.  
  369. /***************************************************************/ 
  370. /* Procedure: reason                                           */
  371. /*                                                             */
  372. /* This procedure gives the user some knowledge as to why the  */
  373. /* icon did not successfully install.                          */
  374. /***************************************************************/ 
  375.  
  376. reason:
  377.    say 'The icon may not have installed because:'
  378.    say '   1.  This is not a feature that was preloaded on your system.'
  379.    say '   2.  The executable file was not located on you system.  It'
  380.    say '       may have been deleted.'
  381. return
  382.  
  383. /***************************************************************/  
  384. /* Procedure: quit                                             */
  385. /*                                                             */
  386. /* This procedure terminates the program at the appropriate    */
  387. /* time.  Determined by user or program completion             */
  388. /***************************************************************/  
  389.  
  390. quit:
  391.  
  392. say
  393. say 'Program terminated.'
  394.  
  395. exit
  396.  
  397.