home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: InfoMgt / InfoMgt.zip / pmn132.zip / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1998-07-13  |  3KB  |  119 lines

  1. /*  Installation script for PmNotes       */
  2. /*  Copyright (C) 1997-1998 by Jeffrey Habets  */
  3.  
  4. '@Echo Off'
  5. Call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
  6. Call SysLoadFuncs
  7.  
  8. Say 'PmNotes installation script'
  9. Say 'Copyright (C) 1997-1998 by Jeffrey Habets'
  10. Say ''
  11.  
  12. Say 'Do you want me to create or update the PmNotes folder on your Desktop? (Y/N)'
  13.  
  14. Pull answer
  15.  
  16. If answer \= 'Y' Then
  17.   Signal DONE
  18.  
  19.  
  20. Say ''
  21. Say 'Supercharging your desktop with PmNotes...'
  22. Say ''
  23.  
  24. if \SysOpenObject('<PMN_FOLDER>', 'ICON', 'TRUE') then
  25. Do
  26.   Say 'Creating PmNotes folder on your Desktop...'
  27.   Folder = '<WP_DESKTOP>'
  28.   Type = 'WPFolder'
  29.   Title = 'PmNotes'
  30.   Parms = 'OBJECTID=<PMN_FOLDER>;SORT=NAME'
  31.   If \SysCreateObject(Type, Title, Folder, Parms, 'FailIfExists') Then
  32.   Do
  33.     Say 'Error creating PmNotes folder! - installation ended!'
  34.     signal DONE
  35.   End
  36. End
  37. Else
  38. Do
  39.   Say 'Updating the existing PmNotes folder...'
  40. End
  41.  
  42. filenames.0 = 5
  43. filenames.1 = 'REGISTER.TXT'
  44. filenames.2 = 'ORDER.FRM'
  45. filenames.3 = 'WHEREBUY.TXT'
  46. filenames.4 = 'INSTALL.TXT'
  47. filenames.5 = 'HISTORY.TXT'
  48.  
  49. desc.0 = 5
  50. desc.1 = 'Licence and Registration'D2C(13)D2C(10)'information'
  51. desc.2 = 'BMT Micro'
  52. desc.3 = 'BMT Micro'D2C(13)D2C(10)'resellers'
  53. desc.4 = 'Install / Uninstall'
  54. desc.5 = 'Changes history'
  55.  
  56. ID.0 = 5
  57. ID.1 = '<PMN_REG>'
  58. ID.2 = '<PMN_BMT>'
  59. ID.3 = '<PMN_RESELLERS>'
  60. ID.4 = '<PMN_INST>'
  61. ID.5 = '<PMN_HIST>'
  62.  
  63. Say 'Creating objects for Licence and Registration information...'
  64. Folder = '<PMN_FOLDER>'
  65. Type = 'WPProgram'
  66. Do i = 1 To desc.0
  67.   Title = desc.i
  68.   Parms = 'MINWIN=SYMBOL;PROGTYPE=PM;EXENAME=E.EXE;STARTUPDIR='Directory()';PARAMETERS='filenames.i';OBJECTID='ID.i';NOPRINT=YES;'
  69.   Result = SysCreateObject(Type, Title, Folder, Parms, 'ReplaceIfExists')
  70. End
  71.  
  72.  
  73. Say 'Creating object for PmNotes documentation...'
  74. Folder = '<PMN_FOLDER>'
  75. Type = 'WPProgram'
  76. Title = 'PmNotes documentation'
  77. Parms = 'MINWIN=SYMBOL;PROGTYPE=PM;EXENAME=VIEW.EXE;STARTUPDIR='Directory()';PARAMETERS=PmnDoc.inf;OBJECTID=<PMN_DOC>;NOPRINT=YES;'
  78. Result = SysCreateObject(Type, Title, Folder, Parms, 'ReplaceIfExists')
  79.  
  80. If Result \= 1 Then
  81.   Say 'Error: Licence and Registration information object not created!'
  82.  
  83.  
  84. Say 'Creating program object for PmNotes...'
  85. Folder = '<PMN_FOLDER>'
  86. Type = 'WPProgram'
  87. Title = 'PmNotes'
  88. Parms = 'MINWIN=SYMBOL;PROGTYPE=PM;EXENAME='Directory()'\PmNotes.exe;STARTUPDIR='Directory()';OBJECTID=<PMN_PROG>;NOPRINT=YES;'
  89. Result = SysCreateObject(Type, Title, Folder, Parms, 'ReplaceIfExists')
  90.  
  91. If Result \= 1 Then
  92.   Say 'Error: Program object not created!'
  93.  
  94.  
  95. Say ''
  96. Say 'By placing a shadow of the PmNotes program object in your startup folder,'
  97. Say 'PmNotes will be started automatically each time you start your OS/2 system.'
  98. Say ''
  99. Say 'Do you want me to create a shadow of the PmNotes program'
  100. Say 'object in the startup folder for you? (Y/N) '
  101.  
  102. Pull answer
  103.  
  104. If answer = 'Y' Then
  105. Do
  106.   Result = SysCreateShadow('<PMN_PROG>', '<WP_START>')
  107.  
  108.   If Result \= 1 Then
  109.     Say 'Error: Shadow in Startup folder not created!'
  110. End
  111.  
  112. Say ''
  113. Say 'Installation complete!'
  114.  
  115. signal DONE
  116.  
  117. DONE:
  118. Exit
  119.