home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1995 November / PCWK1195.iso / inne / podstawy / dos / nakladki / dn2_35a.exe / INSTALL / OS2.ZIP / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1995-02-01  |  7KB  |  222 lines

  1. /*
  2. @Goto NoRexx
  3. */
  4.  
  5. /*
  6.  
  7.    REXX-Script to create Dos Navigator Folder
  8.  
  9.    Run this command file at OS/2 command prompt
  10.  
  11. */
  12.  
  13.  
  14.  
  15. Cls
  16. Say "Creating PM-folder for Dos Navigator. Please wait..."
  17.  
  18. Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  19. Call SysLoadFuncs
  20.  
  21. DnDir=Directory()
  22. DnDir=SubStr(DnDir,1,LastPos('\',DnDir))
  23. Say "Dos Navigator should be installed in "DnDir"."
  24. Say "If it isn't, then put new folder in trash ;)"
  25. ObjMode="Replace"
  26. rc=0
  27.  
  28.  
  29. say 'Creating DN folder...'
  30.  
  31. /* The Folder */
  32. Class = "WPFolder"
  33. Location = "<WP_DESKTOP>"
  34. Title = "Dos Navigator II"
  35. SetupString = "OBJECTID=<DN>;ICONFILE="DnDir"OS2\DN_PMF.ICO;BACKGROUND="DnDir"OS2\DN2.BMP;"
  36. rc = rc + (SysCreateObject(Class,Title,Location,SetupString,ObjMode)<>1)
  37.  
  38. /* ▒▒▒▒ DN EXECUTABLE ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ */
  39.  
  40. say 'Creating DN object...'
  41.  
  42. /* The Programs in the folder */
  43. ObjMode="UpDate"
  44. Class = "WPProgram"
  45. Location = "<DN>"
  46.  
  47. Title = "Dos Navigator"
  48. SetupString ="OBJECTID=<DNCOM>;ICONFILE="DnDir"OS2\DN_PM.ICO;PROGTYPE=VDM;EXENAME="DnDir"DN.COM;STARTUPDIR="DnDir";"
  49. rc = rc + (SysCreateObject(Class,Title,Location,SetupString,ObjMode)<>1)
  50.  
  51.  
  52. /* ▒▒▒▒ WHATS NEW ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ */
  53.  
  54.  
  55. say "Creating 'What's new?' folder..."
  56.  
  57. /* The Folder */
  58. Class = "WPFolder"
  59. ObjMode="Replace"
  60. Location = "<DN>"
  61. Title = "What's new?"
  62. SetupString = "OBJECTID=<DNWNEW>;ICONFILE="DnDir"OS2\DN_NEW.ICO;BACKGROUND="DnDir"OS2\DN2.BMP;"
  63. rc = rc + (SysCreateObject(Class,Title,Location,SetupString,ObjMode)<>1)
  64.  
  65. /* Doc's in folder */
  66. Location = "<DNWNEW>"
  67. ObjMode="UpDate"
  68. Class = "WPProgram"
  69.  
  70. Title = "Russian"
  71. SetupString = "OBJECTID=<WHNEWRUS>;ICONFILE="DnDir"OS2\DN_TXT.ICO;EXENAME=E.EXE;PARAMETERS="DnDir"DOC\whatsnew.rus;"
  72. rc = rc + (SysCreateObject(Class,Title,Location,SetupString,ObjMode)<>1)
  73. Title = "English"
  74. SetupString = "OBJECTID=<WHNEWENG>;ICONFILE="DnDir"OS2\DN_TXT.ICO;EXENAME=E.EXE;PARAMETERS="DnDir"DOC\whatsnew.eng;"
  75. rc = rc + (SysCreateObject(Class,Title,Location,SetupString,ObjMode)<>1)
  76.  
  77.  
  78.  
  79. /* ▒▒▒▒ OVERVIEW ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ */
  80.  
  81.  
  82. say "Creating 'Overview' folder..."
  83.  
  84. /* The Folder */
  85. Class = "WPFolder"
  86. ObjMode="Replace"
  87. Location = "<DN>"
  88. Title = "DN Overview"
  89. SetupString = "OBJECTID=<DNOVERWIEW>;ICONFILE="DnDir"OS2\DN_OVW.ICO;BACKGROUND="DnDir"OS2\DN2.BMP;"
  90. rc = rc + (SysCreateObject(Class,Title,Location,SetupString,ObjMode)<>1)
  91.  
  92. /* Doc's in folder */
  93. Location = "<DNOVERWIEW>"
  94. ObjMode="UpDate"
  95. Class = "WPProgram"
  96.  
  97. Title = "Russian"
  98. SetupString = "OBJECTID=<OVVRUS>;ICONFILE="DnDir"OS2\DN_TXT.ICO;EXENAME=E.EXE;PARAMETERS="DnDir"DOC\OVERVIEW.RUS;"
  99. rc = rc + (SysCreateObject(Class,Title,Location,SetupString,ObjMode)<>1)
  100. Title = "English"
  101. SetupString = "OBJECTID=<OVVENG>;ICONFILE="DnDir"OS2\DN_TXT.ICO;EXENAME=E.EXE;PARAMETERS="DnDir"DOC\OVERVIEW.ENG;"
  102. rc = rc + (SysCreateObject(Class,Title,Location,SetupString,ObjMode)<>1)
  103.  
  104.  
  105. /* ▒▒▒▒ MANUAL ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ */
  106.  
  107.  
  108. say "Creating 'Manual' folder..."
  109.  
  110. /* The Folder */
  111. Class = "WPFolder"
  112. ObjMode="Replace"
  113. Location = "<DN>"
  114. Title = "DN Manual"
  115. SetupString = "OBJECTID=<DNDOC>;ICONFILE="DnDir"OS2\DN_DOC.ICO;BACKGROUND="DnDir"OS2\DN2.BMP;"
  116. rc = rc + (SysCreateObject(Class,Title,Location,SetupString,ObjMode)<>1)
  117.  
  118. /* Doc's in folder */
  119. Location = "<DNDOC>"
  120. ObjMode="UpDate"
  121. Class = "WPProgram"
  122.  
  123. Title = "Manual (Russian)"
  124. SetupString = "OBJECTID=<DOCRUS>;ICONFILE="DnDir"OS2\DN_DOC.ICO;EXENAME=E.EXE;PARAMETERS="DnDir"DOC\DN.DOC;"
  125. rc = rc + (SysCreateObject(Class,Title,Location,SetupString,ObjMode)<>1)
  126. Title = "Environment"
  127. SetupString = "OBJECTID=<ENVENG>;ICONFILE="DnDir"OS2\DN_TXT.ICO;EXENAME=E.EXE;PARAMETERS="DnDir"DOC\ENVIRON.DN;"
  128. rc = rc + (SysCreateObject(Class,Title,Location,SetupString,ObjMode)<>1)
  129.  
  130.  
  131.  
  132.  
  133. /* ▒▒▒▒ OPEN NAVIGATOR FOLDER ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ */
  134.  
  135.  
  136. /* Open folder */
  137. Class = "WPFolder"
  138. Location = "<WP_DESKTOP>"
  139. Title = "Dos Navigator"
  140. SetupString = "OBJECTID=<DN>;OPEN=Default;"
  141. rc = rc + (SysCreateObject(Class,Title,Location,SetupString,ObjMode)<>1)
  142.  
  143.  
  144. /* ▒▒▒▒ REG FORMS ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ */
  145.  
  146.  
  147. say "Creating 'Reg forms' folder..."
  148.  
  149. /* The Folder */
  150. Class = "WPFolder"
  151. Location = "<DN>"
  152. Title = "Register"
  153. ObjMode="Replace"
  154. SetupString = "OBJECTID=<DNREG>;ICONFILE="DnDir"OS2\DN_REG.ICO;BACKGROUND="DnDir"OS2\DN2.BMP;"
  155. rc = rc + (SysCreateObject(Class,Title,Location,SetupString,ObjMode)<>1)
  156.  
  157. /* Doc's in folder */
  158. Location = "<DNREG>"
  159. ObjMode="Replace"
  160. Class = "WPProgram"
  161.  
  162. Title = "Russian"
  163. SetupString = "OBJECTID=<DNRRUS>;ICONFILE="DnDir"OS2\DN_TXT.ICO;EXENAME=E.EXE;PARAMETERS="DnDir"DOC\REGISTER.RUS;"
  164. rc = rc + (SysCreateObject(Class,Title,Location,SetupString,ObjMode)<>1)
  165. Title = "English"
  166. SetupString = "OBJECTID=<DNRENG>;ICONFILE="DnDir"OS2\DN_TXT.ICO;EXENAME=E.EXE;PARAMETERS="DnDir"DOC\REGISTER.FRM;"
  167. rc = rc + (SysCreateObject(Class,Title,Location,SetupString,ObjMode)<>1)
  168. Title = "Dutch"
  169. SetupString = "OBJECTID=<DNRGER>;ICONFILE="DnDir"OS2\DN_TXT.ICO;EXENAME=E.EXE;PARAMETERS="DnDir"DOC\REGISTER.NL;"
  170. rc = rc + (SysCreateObject(Class,Title,Location,SetupString,ObjMode)<>1)
  171.  
  172.  
  173. /* ▒▒▒▒ REG ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ */
  174.  
  175.  
  176. say "Creating 'Why Register?' folder..."
  177.  
  178. /* The Folder */
  179. Class = "WPFolder"
  180. Location = "<DN>"
  181. Title = "Why register?"
  182. ObjMode="Replace"
  183. SetupString = "OBJECTID=<DNWHYREG>;ICONFILE="DnDir"OS2\DN_WHY.ICO;BACKGROUND="DnDir"OS2\DN2.BMP;"
  184. rc = rc + (SysCreateObject(Class,Title,Location,SetupString,ObjMode)<>1)
  185.  
  186. /* Doc's in folder */
  187. Location = "<DNWHYREG>"
  188. ObjMode="UpDate"
  189. Class = "WPProgram"
  190.  
  191. Title = "Russian"
  192. SetupString = "OBJECTID=<WHRRUS>;ICONFILE="DnDir"OS2\DN_TXT.ICO;EXENAME=E.EXE;PARAMETERS="DnDir"DOC\README.RUS;"
  193. rc = rc + (SysCreateObject(Class,Title,Location,SetupString,ObjMode)<>1)
  194. Title = "English"
  195. SetupString = "OBJECTID=<WHRENG>;ICONFILE="DnDir"OS2\DN_TXT.ICO;EXENAME=E.EXE;PARAMETERS="DnDir"DOC\README.ENG;"
  196. rc = rc + (SysCreateObject(Class,Title,Location,SetupString,ObjMode)<>1)
  197. Title = "Dutch"
  198. SetupString = "OBJECTID=<WHRGER>;ICONFILE="DnDir"OS2\DN_TXT.ICO;EXENAME=E.EXE;PARAMETERS="DnDir"DOC\leesmij.txt;"
  199. rc = rc + (SysCreateObject(Class,Title,Location,SetupString,ObjMode)<>1)
  200.  
  201.  
  202. /* ▒▒▒▒ END ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ */
  203.  
  204.   Say
  205.   If (rc='0') Then
  206.    Do
  207.      say 'Install successful'
  208.      say 'Dos Navigator folder created. '
  209.    End
  210.   Else
  211.      say 'Install failed'
  212. Exit;
  213.  
  214. /* No REXX found */
  215.  
  216. :NoRexx
  217. @Echo Off
  218. Echo No REXX support found in your system.
  219. Echo Run "Selective Install" in System folder
  220. Echo to install REXX in your system.
  221.  
  222.