home *** CD-ROM | disk | FTP | other *** search
/ HP Vectra VL400 Image Library & Diagnostics System / ILD_VL400.iso / packages / w95 / utility / directx / directx7 / setup.exe / script.script < prev    next >
Encoding:
Text File  |  2000-09-26  |  5.5 KB  |  224 lines

  1. ;            IMAGE LIBRARY
  2. ;
  3. ; Target platform = AIRWALK
  4. ; Package type    = Utility
  5. ; Package Name    = DirectX7
  6. ;==========================================
  7. ; Modifications
  8. ; 06/07/00 GSI The verification of the Csd letter is now unuseful
  9. ; 24/07/00 GSI Increase delay after setup and no version verification
  10.  
  11. DEBUG
  12. #Package,DirectX
  13. #Version,DirectX7
  14. #Target_OS,Win95 Win98
  15. #Target_OS_Major,5
  16. #Target_OS_Minor,0
  17. #Target_OS_CSD,Service Pack 3 Service Pack 4 Service Pack 5 Service Pack 6
  18.  
  19. #ALL_LOCS,TRUE
  20. #ALL_OS,TRUE
  21. #TARGET_DIR,C:\Masters\#Package
  22.  
  23. INCLUDE,MSG.Script
  24. LOG,#F_FAIL
  25. GRADIENT,#COLOR_TOP,#COLOR_BOTTOM
  26. MSG_START,#FONT_SIZE,#COLOR_BACK,#COLOR_TEXT,#ENV,#MSG_POS
  27. INI_SEC_DEL,#F_RESULT,#Package
  28. INI_KEY_WRITE,#F_RESULT,#Package,Install_Start,#NOW
  29.  
  30. ;==========================================
  31. ; Verify the current loc and set LOC variable
  32. ; If don't exists then exit script
  33. ;==========================================
  34.  
  35. INCLUDE,LOC.Script
  36.  
  37.  
  38. ; WARNING : This verification is now unuseful !
  39.  
  40. ; Verify the Current CSD number
  41. ; If Win95 SR2.5 (CSD = C or c) then Ok else exit script
  42.  
  43. FINDSTRING,#OS_NAME,Win98
  44. ONGOOD,CORRECT_OS
  45.  
  46. FINDSTRING,#OS_NAME,Win95
  47. ONERROR,ERROR_OS
  48.  
  49. ;#CSD,#OS_CSD
  50. ;FINDSTRING,#CSD,C,c
  51. ;ONGOOD,CORRECT_OS
  52. ;GOTO,EXIT_ON_ERROR
  53.  
  54.  
  55. ;==========================================
  56. ; Verify the current OS and set OS variable
  57. ; If don't exists then exit script
  58. ;==========================================
  59. :CORRECT_OS
  60. #OS,#OS_Name
  61.  
  62. :OS_TEST
  63. FINDSTRING,#Target_OS,#OS_Name
  64. ONERROR,ERROR_OS
  65. GOTO,END_OS
  66.  
  67. :ERROR_OS
  68. #ERROR_MSG,#ERR_OS
  69. ; Write error somewhere...
  70. INI_KEY_WRITE,#F_RESULT,#Package,STATUS,FAIL
  71. INI_KEY_WRITE,#F_RESULT,#Package,CHECK,FAIL
  72. ; And finally exit the script
  73. GOTO,EXIT_ON_ERROR
  74.  
  75. :END_OS
  76.  
  77. ;Check if already installed
  78. REG_SET_ROOT,HKLM
  79. REG_KEY_EXIST,\SOFTWARE\Microsoft\DirectX
  80. ONERROR,FIRST_INSTALL
  81. REG_KEY_OPEN,\SOFTWARE\Microsoft\DirectX
  82. REG_VAL_EXIST,Version
  83. ONERROR,FIRST_INSTALL
  84. REG_VAL_READ,STRING,Version
  85. EQUAL,#REGVALUE,4.07.00.0716
  86. ONERROR,FIRST_INSTALL
  87. #ERROR_MSG,#DONE
  88. ; Write error somewhere...
  89. INI_KEY_WRITE,#F_RESULT,#Package,STATUS,PASS
  90. INI_KEY_WRITE,#F_RESULT,#Package,CHECK,FAIL
  91. ; And finally exit the script
  92. MSG_START,#FONT_SIZE,#COLOR_BACK,#COLOR_TEXT,#ERROR_MSG,#MSG_POS
  93. Delay,10
  94. LOG,#F_DONE
  95. GOTO,FIN
  96.  
  97. ;==========================================
  98. ; Write Package information to Log file
  99. ;==========================================
  100.  
  101. :FIRST_INSTALL
  102. MSG_START,#FONT_SIZE,#COLOR_BACK,#COLOR_TEXT,#ENV_OK,#MSG_POS
  103.  
  104. INI_KEY_WRITE,#F_RESULT,#Package,PACKAGE_REV,#Version
  105. INI_KEY_WRITE,#F_RESULT,#Package,TARGET_OS,#Target_OS
  106. INI_KEY_WRITE,#F_RESULT,#Package,OS,#OS_NAME #OS_MAJORVERSION.#OS_MINORVERSION
  107. INI_KEY_WRITE,#F_RESULT,#Package,SP,#OS_CSD
  108. INI_KEY_WRITE,#F_RESULT,#Package,LOC,#LOC
  109. INI_KEY_WRITE,#F_RESULT,#Package,Install_Start,#NOW
  110. Delay,10
  111.  
  112. :COPY_TO_MASTERS
  113. MSG_START,#FONT_SIZE,#COLOR_BACK,#COLOR_TEXT,#COPY,#MSG_POS
  114. #LOC,#LOC,\
  115. EQUAL,#ALL_LOCS,TRUE
  116. ONERROR,LOC_OS
  117. #LOC,#NULL
  118.  
  119. :LOC_OS
  120. #OS,#OS,\
  121. EQUAL,#ALL_OS,TRUE
  122. ONERROR,LOC_PATH
  123. #OS,#NULL
  124.  
  125. :LOC_PATH
  126.  
  127. FILE_COPY,#OSPackage\#LOC*.*,#TARGET_DIR,SILENT,NOCONFIRMATION
  128.  
  129. ;==========================================
  130. ; Verify copy
  131. ;==========================================
  132. :VERIFY_COPY
  133. FILE_EXISTS,#TARGET_DIR\Dx70a.exe
  134. ONGOOD,START_INSTALL
  135.  
  136. #ERROR_MSG,#ERR_COPY
  137. ; Write error somewhere...
  138. INI_KEY_WRITE,#F_RESULT,#Package,STATUS,FAIL
  139. INI_KEY_WRITE,#F_RESULT,#Package,CHECK,FAIL
  140. ; And finally exit the script
  141. GOTO,EXIT_ON_ERROR
  142.  
  143. :START_INSTALL
  144.  
  145. MSG_START,#FONT_SIZE,#COLOR_BACK,#COLOR_TEXT,#COPY_OK,#MSG_POS
  146. Delay,10
  147. MSG_START,#FONT_SIZE,#COLOR_BACK,#COLOR_TEXT,#SETUP,#MSG_POS
  148. Delay,10
  149. MSG_START,#FONT_SIZE,#COLOR_BACK,#COLOR_TEXT,#WAIT,#MSG_POS
  150.  
  151.  
  152. START,#TARGET_DIR\Dx70a.exe, /Q /R:N
  153.  
  154. ;------------------ Wait the end of setup
  155.  
  156. ; Delay 200 -> 300
  157. Delay,300
  158.  
  159. ;==========================================
  160. ; Apply any patch to registry or ini files
  161. ;==========================================
  162. :APPLY_PATCH
  163.  
  164. ;==========================================
  165. ; Verify Install
  166. ;==========================================
  167.  
  168.  
  169. :VERIFY_INSTALL
  170. REG_SET_ROOT,HKLM
  171. REG_KEY_EXIST,\SOFTWARE\Microsoft\DirectX
  172. ;ONERROR,BAD_DX
  173. ONGOOD,INSTALL_OK
  174. ;REG_KEY_OPEN,\SOFTWARE\Microsoft\DirectX
  175. ;REG_VAL_EXIST,Version
  176. ;ONERROR,BAD_DX
  177. ;REG_VAL_READ,STRING,Version
  178. ;EQUAL,#REGVALUE,4.07.00.0716
  179. ;ONGOOD,INSTALL_OK
  180.  
  181. :BAD_DX
  182. #ERROR_MSG,#ERR_VERIF
  183. ; Write error somewhere...
  184. INI_KEY_WRITE,#F_RESULT,#Package,STATUS,PASS
  185. INI_KEY_WRITE,#F_RESULT,#Package,CHECK,FAIL
  186. ; And finally exit the script
  187. GOTO,EXIT_ON_ERROR
  188.  
  189. :INSTALL_OK
  190. INI_KEY_WRITE,#F_RESULT,#Package,STATUS,PASS
  191. INI_KEY_WRITE,#F_RESULT,#Package,CHECK,PASS
  192. INI_KEY_WRITE,#F_RESULT,#Package,Install_Stop,#NOW
  193. INI_KEY_WRITE,#F_RESULT,#Package,ERROR,None
  194. MSG_START,#FONT_SIZE,#COLOR_BACK,#COLOR_TEXT,#OK,#MSG_POS
  195. Delay,10
  196.  
  197. :END_OF_SCRIPT
  198. LOG,#F_PASS
  199. GOTO,FIN
  200.  
  201. :EXIT_ON_ERROR
  202. ; Tell user that package don't support the current LOC
  203. MSG_START,#FONT_SIZE,#COLOR_BACK,#COLOR_TEXT,#ERROR_MSG,#MSG_POS
  204. INI_KEY_WRITE,#F_RESULT,#Package,ERROR,#ERROR_MSG
  205. INI_KEY_WRITE,#F_RESULT,#Package,PACKAGE_REV,#Version
  206. INI_KEY_WRITE,#F_RESULT,#Package,TARGET_OS,#Target_OS
  207. INI_KEY_WRITE,#F_RESULT,#Package,OS,#OS_NAME #OS_MAJORVERSION.#OS_MINORVERSION
  208. INI_KEY_WRITE,#F_RESULT,#Package,SP,#OS_CSD
  209. INI_KEY_WRITE,#F_RESULT,#Package,LOC,#CURRENT_LOC
  210. INI_KEY_WRITE,#F_RESULT,#Package,Install_Stop,#NOW
  211. DELAY,20
  212. GRADIENT,clBlack,clBlack
  213. MSG_START,#FONT_SIZE,#CL_RED,#CL_BLACK,#FAIL,#MSG_POS
  214. DELAY,20
  215.  
  216. :FIN
  217.  
  218.  
  219.  
  220.