home *** CD-ROM | disk | FTP | other *** search
/ HP Vectra VL400 Image Library & Diagnostics System / ILD_VL400.iso / packages / nt4 / driver / lan / intel / iaa3201 / setup.exe / script.script < prev    next >
Encoding:
Text File  |  2001-02-01  |  12.0 KB  |  446 lines

  1. ;==========================================
  2. ;            IMAGE LIBRARY
  3.  
  4. ; Target platform = AIRWALK
  5. ; Package type    = Driver
  6. ; Package Name    = LanIntel STANDARD
  7. ;
  8. ; 18/05/2000 JMD include loclan.txt au lieu de loclan.script
  9. ;==========================================
  10.  
  11.  
  12. DEBUG
  13. #Package,LanIntel Standard
  14. #Version,IAA3201
  15. #Target_OS,NT4
  16. #Target_OS_Major,4
  17. #Target_OS_Minor,0
  18. #Target_OS_CSD,Service Pack 3 Service Pack 4 Service Pack 5 Service Pack 6
  19. #ALL_LOCS,TRUE
  20. #ALL_OS,TRUE
  21. #TARGET_DIR,C:\Masters\#Package
  22. #COMPUTER_NAME
  23. RANDOM_STRING,8,#COMPUTER_NAME
  24.  
  25.  
  26. INCLUDE,MSG.Script
  27. LOG,#F_FAIL
  28. GRADIENT,#COLOR_TOP,#COLOR_BOTTOM
  29. MSG_START,#FONT_SIZE,#COLOR_BACK,#COLOR_TEXT,#ENV,#MSG_POS
  30. INI_SEC_DEL,#F_RESULT,#Package
  31. INI_KEY_WRITE,#F_RESULT,#Package,Install_Start,#NOW
  32.  
  33. ;==========================================
  34. ; Verify the current loc and set LOC variable
  35. ; If don't exists then exit sript
  36. ;==========================================
  37.  
  38. INCLUDE,LOCLAN.txt
  39.  
  40. ;==========================================
  41. ;  Verify hardware presence
  42. ; If don't exists then exit sript
  43. ;==========================================
  44. BOARD_EXISTS,VEN_8086,DEV_1229
  45. ONGOOD,OS_TEST
  46. #ERROR_MSG,#NO_HARDWARE
  47. ; Write error somewhere...
  48. INI_KEY_WRITE,#F_RESULT,#Package,STATUS,FAIL
  49. INI_KEY_WRITE,#F_RESULT,#Package,CHECK,FAIL
  50. ; And finally exit the script
  51. GOTO,EXIT_ON_ERROR
  52.  
  53. ;==========================================
  54. ; Verify the current OS and set OS variable
  55. ; If don't exists then exit sript
  56. ;==========================================
  57.  
  58.  
  59. :OS_TEST
  60. #OS,#OS_Name
  61. FINDSTRING,#Target_OS,#OS_Name
  62. ONERROR,ERROR_OS
  63. GOTO,END_OS
  64. :ERROR_OS
  65.  
  66. #ERROR_MSG,#ERR_OS
  67. ; Write error somewhere...
  68. INI_KEY_WRITE,#F_RESULT,#Package,STATUS,FAIL
  69. INI_KEY_WRITE,#F_RESULT,#Package,CHECK,FAIL
  70. ; And finally exit the script
  71. GOTO,EXIT_ON_ERROR
  72. :END_OS
  73.  
  74.  
  75.  
  76. ;Check if already installed
  77. REG_SET_ROOT,HKLM
  78. REG_KEY_EXIST,\SOFTWARE\Intel\E100B\CurrentVersion
  79. ONERROR,FIRST_INSTALL
  80. REG_KEY_OPEN,\SOFTWARE\Intel\E100B\CurrentVersion
  81. REG_VAL_READ,STRING,Title
  82. FINDSTRING,#REGVALUE,Intel(R) PRO NDIS Driver
  83.  
  84. :TEST
  85. ONERROR,FIRST_INSTALL
  86. #ERROR_MSG,#DONE
  87. ; Write error somewhere...
  88. INI_KEY_WRITE,#F_RESULT,#Package,STATUS,PASS
  89. INI_KEY_WRITE,#F_RESULT,#Package,CHECK,FAIL
  90. ; And finally exit the script
  91. MSG_START,#FONT_SIZE,#COLOR_BACK,#COLOR_TEXT,#ERROR_MSG,#MSG_POS
  92. Delay,10
  93. LOG,#F_DONE
  94. GOTO,FIN
  95.  
  96. ;==========================================
  97. ; Write Package information to Log file
  98. ;==========================================
  99.  
  100. :FIRST_INSTALL
  101. MSG_START,#FONT_SIZE,#COLOR_BACK,#COLOR_TEXT,#ENV_OK,#MSG_POS
  102.  
  103. INI_KEY_WRITE,#F_RESULT,#Package,PACKAGE_REV,#Version
  104. INI_KEY_WRITE,#F_RESULT,#Package,TARGET_OS,#Target_OS
  105. INI_KEY_WRITE,#F_RESULT,#Package,OS,#OS_NAME #OS_MAJORVERSION.#OS_MINORVERSION
  106. INI_KEY_WRITE,#F_RESULT,#Package,SP,#OS_CSD
  107. INI_KEY_WRITE,#F_RESULT,#Package,LOC,#LOC
  108. INI_KEY_WRITE,#F_RESULT,#Package,Install_Start,#NOW
  109. Delay,10
  110.  
  111. ;======================================================
  112. ; Start installation by copying files to c:\masters\...
  113. ;======================================================
  114. :COPY_TO_MASTERS
  115. MSG_START,#FONT_SIZE,#COLOR_BACK,#COLOR_TEXT,#COPY,#MSG_POS
  116. #LOC,#LOC,\
  117. EQUAL,#ALL_LOCS,TRUE
  118. ONERROR,LOC_OS
  119. #LOC,#NULL
  120. :LOC_OS
  121. #OS,#OS,\
  122. EQUAL,#ALL_OS,TRUE
  123. ONERROR,LOC_PATH
  124. #OS,#NULL
  125. :LOC_PATH
  126.  
  127. FILE_COPY,#OSPackage\#LOC*.*,#TARGET_DIR,SILENT,NOCONFIRMATION,NOCONFIRMKDIR
  128.  
  129. ;==========================================
  130. ; Verify copy
  131. ;==========================================
  132.  
  133. :VERIFY_COPY
  134. FILE_EXISTS,#TARGET_DIR\Msdisk\e100bnt.sys
  135. ONGOOD,START_INSTALL
  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. ;===========================================
  144. ;START INSTALLATION FOR NT WITH WIZARD
  145. ;===========================================
  146.  
  147. :START_INSTALL
  148. MSG_START,#FONT_SIZE,#COLOR_BACK,#COLOR_TEXT,#COPY_OK,#MSG_POS
  149. Delay,10
  150. MSG_START,#FONT_SIZE,#COLOR_BACK,#COLOR_TEXT,#SETUP,#MSG_POS
  151. Delay,10
  152. MSG_START,#FONT_SIZE,#COLOR_BACK,#COLOR_TEXT,#WAIT,#MSG_POS
  153.  
  154.  
  155. ; 2000/02/28 Modif RQU - Safe method to open the control panel (NT only, another .cpl for win9x)
  156. Start,Control,ncpa.cpl
  157.  
  158. ; No networking is currently installed
  159. ; Do you want to install it now ?
  160. Wait,#Network Configuration,160
  161. OnError,ERROR1
  162. ; Press 'Yes'
  163. Send,#Network Configuration,{RETURN}
  164.  
  165. Wait,#Network Setup Wizard,160
  166. OnError,ERROR2
  167.  
  168. ; Wait for the system to gather some information
  169. Delay,70
  170.  
  171. Send,#Network Setup Wizard,{RETURN}
  172. Delay,10
  173.  
  174. ; Press 'Select in the list'
  175. Send,#Network Setup Wizard,{TAB}
  176. Delay,10
  177. Send,#Network Setup Wizard,{TAB}
  178. Delay,10
  179. Send,#Network Setup Wizard,{TAB}
  180. Delay,10
  181. Send,#Network Setup Wizard,{TAB}
  182. Delay,10
  183. Send,#Network Setup Wizard,{RETURN}
  184. Delay,20
  185.  
  186. Wait,#Select Network Adapter,160
  187. OnError,ERROR3
  188. Delay,30
  189.  
  190. ; Press 'Have disk'
  191. Send,#Select Network Adapter,{TAB}
  192. Delay,10
  193. Send,#Select Network Adapter,{RETURN}
  194.  
  195. Wait,#Insert Disk,160
  196. OnError,ERROR4
  197.  
  198. ; Enter the location of the INF and press 'Ok'
  199. Send,#Insert Disk,#TARGET_DIR\Msdisk
  200. Delay,10
  201. Send,#Insert Disk,{RETURN}
  202.  
  203. Wait,#Select OEM Option,160
  204. OnError,ERROR5
  205.  
  206. ; Default selection is the good driver, just press 'Ok'
  207. Send,#Select OEM Option,{RETURN}
  208.  
  209. Wait,#Network Setup Wizard,160
  210. OnError,ERROR6
  211. Delay,10
  212.  
  213. ; Press 'Next'
  214. Send,#Network Setup Wizard,{RETURN}
  215. Delay,10
  216.  
  217. ; Unselect TCP/IP protocol
  218. Send,#Network Setup Wizard,{SPACE}
  219. Delay,10
  220.  
  221. ; Move down twice and select NetBEUI
  222. Send,#Network Setup Wizard,{DOWN}
  223. Delay,10
  224. Send,#Network Setup Wizard,{DOWN}
  225. Delay,10
  226. Send,#Network Setup Wizard,{SPACE}
  227. Delay,10
  228.  
  229. ; Press 'Next'
  230. Send,#Network Setup Wizard,{RETURN}
  231. Delay,10
  232.  
  233. ; No change in the network services, press 'Next'
  234. Send,#Network Setup Wizard,{RETURN}
  235. Delay,10
  236.  
  237. Send,#Network Setup Wizard,{RETURN}
  238.  
  239. Wait,#Windows NT Setup,160
  240. OnError,ERROR7
  241. ; Delay de 3 secondes au lieu de 0 itialement
  242. Delay,30
  243. Send,#Windows NT Setup2,c:\i386
  244. Delay,10
  245. Send,#Windows NT Setup2,{RETURN}
  246.  
  247. ; Wait for the installation of networking
  248. Delay,140
  249.  
  250. Wait,#Network Setup Wizard,160
  251. OnError,ERROR17
  252. delay,40
  253. Send,#Network Setup Wizard,{RETURN}
  254. Delay,10
  255. Send,#Network Setup Wizard,{RETURN}
  256.  
  257. ; Wait for the system to complete some settings
  258. Delay,200
  259.  
  260. Send,#Network Setup Wizard,{RETURN}
  261. Delay,10
  262.  
  263. Send,#Network Setup Wizard,{RETURN}
  264.  
  265. Wait,#Network Settings Change,160
  266. OnError,ERROR18
  267. Send,#Network Settings Change,{TAB}
  268. Delay,10
  269. Send,#Network Settings Change,{RETURN}
  270.  
  271. ;===========================================================
  272. ;END OF WIZARD INSTALLATION FOR NT
  273. ;===========================================================
  274.  
  275. Goto,VERIFY_INSTALL
  276.  
  277. ;______________________________________________
  278. ;            ON ERROR DISPLAY
  279. ;              WINDOW NAME
  280. ;______________________________________________
  281. :ERROR18
  282. ;MsgBox,#Control Panel  not found !  Anormal termination\,LanIntel installation aborted !
  283. Goto,CLOSEALL
  284. :ERROR17
  285. ;MsgBox,#Network Settings Change  not found !  Anormal termination\,LanIntel installation aborted !
  286. Goto,CLOSEALL
  287. :ERROR16
  288. ;MsgBox,#Network Setup Wizard  not found !  Anormal termination\,LanIntel installation aborted !
  289. Goto,CLOSEALL
  290. :ERROR15
  291. ;MsgBox,#Windows NT Networking Installation  not found !  Anormal termination\,LanIntel installation aborted !
  292. Goto,CLOSEALL
  293. :ERROR14
  294. ;MsgBox,#RPC Configuration  not found !  Anormal termination\,LanIntel installation aborted !
  295. Goto,CLOSEALL
  296. :ERROR13
  297. ;MsgBox,#NetBIOS Interface Setup  not found !  Anormal termination\,LanIntel installation aborted !
  298. Goto,CLOSEALL
  299. :ERROR12
  300. ;MsgBox,#Workstation Services Setup  not found !  Anormal termination\,LanIntel installation aborted !
  301. Goto,CLOSEALL
  302. :ERROR11
  303. ;MsgBox,#Server  not found !  Anormal termination\,LanIntel installation aborted !
  304. Goto,CLOSEALL
  305. :ERROR10
  306. ;MsgBox,#NetBEUI Protocol  not found !  Anormal termination\,LanIntel installation aborted !
  307. Goto,CLOSEALL
  308. :ERROR9
  309. ;MsgBox,#Windows NT Setup  not found !  Anormal termination\,LanIntel installation aborted !
  310. Goto,CLOSEALL
  311. :ERROR8
  312. ;MsgBox,#Network Setup Wizard  not found !  Anormal termination\,LanIntel installation aborted !
  313. Goto,CLOSEALL
  314. :ERROR7
  315. ;MsgBox,#Select OEM Option  not found !  Anormal termination\,LanIntel installation aborted !
  316. Goto,CLOSEALL
  317. :ERROR6
  318. ;MsgBox,#Windows NT Setup  not found !  Anormal termination\,LanIntel installation aborted !
  319. Goto,CLOSEALL
  320. :ERROR5
  321. ;MsgBox,#Insert Disk  not found !  Anormal termination\,LanIntel installation aborted !
  322. Goto,CLOSEALL
  323. :ERROR4
  324. ;MsgBox,#@Caption  not found !  Anormal termination\,LanIntel installation aborted !
  325. Goto,CLOSEALL
  326. :ERROR3
  327. ;MsgBox,#Select Network Adapter  not found !  Anormal termination\,LanIntel installation aborted !
  328. Goto,CLOSEALL
  329. :ERROR2
  330. ;MsgBox,#Network Setup Wizard  not found !  Anormal termination\,LanIntel installation aborted !
  331. Goto,CLOSEALL
  332.  
  333.  
  334.  
  335. ;______________________________________________
  336. ;            ON ERROR RESTORE DESKTOP
  337. ;         BY CLOSING ALL OPENED WINDOWS
  338. ;______________________________________________
  339. :CLOSEALL
  340. Close,#Network Settings Change
  341. Close,#Network Setup Wizard
  342. Close,#Windows NT Networking Installation
  343. Close,#RPC Configuration
  344. Close,#NetBIOS Interface Setup
  345. Close,#Workstation Services Setup
  346. Close,#Server
  347. Close,#NetBEUI Protocol
  348. Close,#Windows NT Setup
  349. Close,#Network Setup Wizard
  350. Close,#Select OEM Option
  351. Close,#Windows NT Setup
  352. Close,#Insert Disk
  353. Close,#@Caption
  354. Close,#Select Network Adapter
  355. Close,#Network Setup Wizard
  356. Close,#Network Configuration
  357.  
  358. Goto,FAIL
  359.  
  360. ;______________________________________________
  361. ;                      END
  362. ;______________________________________________
  363.  
  364.  
  365. :FAIL
  366. #ERROR_MSG,#ERR_SETUP
  367. ; Write error somewhere...
  368. INI_KEY_WRITE,#F_RESULT,#Package,STATUS,FAIL
  369. INI_KEY_WRITE,#F_RESULT,#Package,CHECK,FAIL
  370. ; And finally exit the script
  371. GOTO,EXIT_ON_ERROR
  372.  
  373. ;==========================================
  374. ; Apply any patch to registry or ini files
  375. ;==========================================
  376. :APPLY_PATCH
  377.  
  378. ;==========================================
  379. ; Verify Install
  380. ;==========================================
  381. :VERIFY_INSTALL
  382.  
  383. Delay,30
  384. ;================================================;
  385. ; First Change the computer name to a random one ;
  386. ;================================================;
  387. REG_SET_ROOT,HKCU
  388. REG_KEY_OPEN,\Volatile Environment
  389. REG_VAL_WRITE,STRING,LOGONSERVER,\\#COMPUTER_NAME
  390.  
  391. REG_SET_ROOT,HKLM
  392. REG_KEY_OPEN,\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
  393. REG_VAL_WRITE,STRING,DefaultDomainName,#COMPUTER_NAME
  394.  
  395. REG_KEY_OPEN,\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName
  396. REG_VAL_WRITE,STRING,ComputerName,#COMPUTER_NAME
  397.  
  398. REG_KEY_OPEN,\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName
  399. REG_VAL_WRITE,STRING,ComputerName,#COMPUTER_NAME
  400.  
  401. REG_SET_ROOT,HKLM
  402. REG_KEY_OPEN,\SOFTWARE\Intel\E100B\CurrentVersion
  403. REG_VAL_READ,STRING,Title
  404. FINDSTRING,#REGVALUE,Intel(R) PRO NDIS Driver
  405.  
  406.  
  407. ONGOOD,INSTALL_OK
  408. #ERROR_MSG,#ERR_VERIF
  409. ; Write error somewhere...
  410. INI_KEY_WRITE,#F_RESULT,#Package,STATUS,PASS
  411. INI_KEY_WRITE,#F_RESULT,#Package,CHECK,FAIL
  412. ; And finally exit the script
  413. GOTO,EXIT_ON_ERROR
  414.  
  415.  
  416. :INSTALL_OK
  417. INI_KEY_WRITE,#F_RESULT,#Package,STATUS,PASS
  418. INI_KEY_WRITE,#F_RESULT,#Package,CHECK,PASS
  419. INI_KEY_WRITE,#F_RESULT,#Package,Install_Stop,#NOW
  420. INI_KEY_WRITE,#F_RESULT,#Package,ERROR,None
  421. MSG_START,#FONT_SIZE,#COLOR_BACK,#COLOR_TEXT,#OK,#MSG_POS
  422. Delay,10
  423. :END_OF_SCRIPT
  424. LOG,#F_PASS
  425. GOTO,FIN
  426. :EXIT_ON_ERROR
  427. ; Tell user that package don't support the current LOC
  428. MSG_START,#FONT_SIZE,#COLOR_BACK,#COLOR_TEXT,#ERROR_MSG,#MSG_POS
  429. INI_KEY_WRITE,#F_RESULT,#Package,ERROR,#ERROR_MSG
  430. INI_KEY_WRITE,#F_RESULT,#Package,PACKAGE_REV,#Version
  431. INI_KEY_WRITE,#F_RESULT,#Package,TARGET_OS,#Target_OS
  432. INI_KEY_WRITE,#F_RESULT,#Package,OS,#OS_NAME #OS_MAJORVERSION.#OS_MINORVERSION
  433. INI_KEY_WRITE,#F_RESULT,#Package,SP,#OS_CSD
  434. INI_KEY_WRITE,#F_RESULT,#Package,LOC,#CURRENT_LOC
  435. INI_KEY_WRITE,#F_RESULT,#Package,Install_Stop,#NOW
  436. DELAY,20
  437. GRADIENT,clBlack,clBlack
  438. MSG_START,#FONT_SIZE,#CL_RED,#CL_BLACK,#FAIL,#MSG_POS
  439. DELAY,20
  440. :FIN
  441.  
  442.  
  443.  
  444.