Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1275 lines
43 KiB

  1. ;===================================================================
  2. ;
  3. ; Installation file for MCS XNS Stack
  4. ;
  5. ;===================================================================
  6. [Identification]
  7. OptionType = NetTransport
  8. ;-------------------------------------------------------------------
  9. ; OPTION LIST
  10. ; -----------
  11. ;
  12. ; This is an internal name for the options we can install.
  13. ;-------------------------------------------------------------------
  14. [Options]
  15. MCSXNS
  16. ;********************************************************************
  17. ; CONSTANTS FOR USING DIALOGS
  18. ;********************************************************************
  19. [FileConstants]
  20. ;
  21. ;----- Product Info
  22. ;
  23. Manufacturer = "Microsoft"
  24. ProductMajorVersion = "4"
  25. ProductMinorVersion = "0"
  26. ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)
  27. McsXnsEventDLL = "%SystemRoot%\System32\xnsmsg.dll"
  28. UbnbEventDLL = "%SystemRoot%\System32\ubnbmsg.dll"
  29. IoLogMsgDLL = "%SystemRoot%\System32\IoLogMsg.dll"
  30. ProductMCSXNSWshDllPath = "%SystemRoot%\System32\wshxns.dll"
  31. ;
  32. ;----- This is the entry for the service controller daemon
  33. ;
  34. ProductMCSXNSName = "McsXns"
  35. ProductMCSXNSImagePath = "%SystemRoot%\System32\mcsxnsvc.exe"
  36. ProductMCSXNSSvcType = "serviceshare"
  37. NetRuleMCSXNSType = "mcsxns mcsxnsTransport streamsStack"
  38. NetRuleMCSXNSUse = $(SoftwareType)" yes yes"
  39. NetRuleMCSXNSBindForm = """McsXns"" yes yes container"
  40. NetRuleMCSXNSClass = "mcsxnsTransport basic yes"
  41. ;
  42. ;----- This is the entry for the ipx/spx kernel driver
  43. ;
  44. ProductMCSXNSSYSName = "McsXnssys"
  45. ProductMCSXNSSYSImagePath= "\SystemRoot\System32\drivers\mcsxns.sys"
  46. ProductMCSXNSSYSSvcType = "kernel"
  47. ;
  48. ;----- This is the entry for the NetBIOS daemon
  49. ;
  50. ProductUBNBName = "Ubnb"
  51. ProductUBNBImagePath = "%SystemRoot%\System32\ubnbsvc.exe"
  52. ProductUBNBSvcType = "serviceshare"
  53. NetRuleUBNBType = "ubnb ubnbNbTransport streamsStack"
  54. NetRuleUBNBUse = $(SoftwareType)
  55. NetRuleUBNBBindForm = """Ubnb"" yes yes container"
  56. NetRuleUBNBClassList = {"ubnbNbTransport netBiosTransport yes"}
  57. ;
  58. ;----- This is the entry for the Nvl NetBIOS kernel driver
  59. ;
  60. ProductUBNBSYSName = "Ubnbsys"
  61. ProductUBNBSYSImagePath = "\SystemRoot\System32\drivers\ubnb.sys"
  62. ProductUBNBSYSSvcType = "kernel"
  63. ;--------------------------------------------------------------------
  64. ; Entries for the registry
  65. ;--------------------------------------------------------------------
  66. ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(Product$(Option)Name)"\CurrentVersion"
  67. LinkageKeyName = $(!NTN_ServiceBase)"\McsXns\Linkage"
  68. ServiceMCSXNSKeyName = $(!NTN_ServiceBase)"\McsXns"
  69. ServiceKeyName = $(!NTN_ServiceBase)
  70. DosDevices = "SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices"
  71. ;--------------------------------------------------------------------
  72. ; Some nice general constants to have around
  73. ;--------------------------------------------------------------------
  74. [GeneralConstants]
  75. UtilityInf = "UTILITY.INF"
  76. subroutineinf = "SUBROUTN.INF"
  77. SoftwareType = "transport"
  78. Exit_Code = 0
  79. BillboardVisible = 0
  80. Sockminlength = 14
  81. Sockmaxlength = 16
  82. from = ""
  83. to = ""
  84. ExitCodeOk = 0
  85. ExitCodeCancel = 1
  86. ExitCodeFatal = 2
  87. KeyNull = ""
  88. MAXIMUM_ALLOWED = 33554432
  89. RegistryErrorIndex = NO_ERROR
  90. KeyProduct = ""
  91. KeyParameters = ""
  92. TRUE = 1
  93. FALSE = 0
  94. NoTitle = 0
  95. ExitState = "Active"
  96. OldVersionExisted = $(FALSE)
  97. DriverPath = $(!STF_NTPATH)\drivers
  98. ;--------------------------------------------------------------------
  99. ; 1. date
  100. ;
  101. ; This routine sets the variable "Now" to be:
  102. ;
  103. ; 1. Sec from 1-1-1970
  104. ; 2. Year
  105. ; 3. Month
  106. ; 4. Day
  107. ; 5. Hour
  108. ; 6. Minute
  109. ; 7. Second
  110. ;--------------------------------------------------------------------
  111. [date]
  112. Now = {} ? $(!LIBHANDLE) GetSystemDate
  113. ;--------------------------------------------------------------------
  114. ; Identify
  115. ; --------
  116. ;
  117. ; This is called to verify that this INF is used to install
  118. ; the kind of program that the setup program wants.
  119. ; (net transport, driver, ....).
  120. ;
  121. ; INPUT: None
  122. ;
  123. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL
  124. ; $($R1): Option Type
  125. ; $($R2): Diskette Descriptor
  126. ;--------------------------------------------------------------------
  127. [Identify]
  128. read-syms Identification
  129. set Status = STATUS_SUCCESSFUL
  130. set Identifier = $(OptionType)
  131. set Media = #("Source Media Descriptions", 1, 1)
  132. Return $(Status) $(Identifier) $(Media)
  133. ;--------------------------------------------------------------------
  134. ; ReturnOptions
  135. ; -------------
  136. ;
  137. ; This is called to return the option list supported by this
  138. ; INF and the localized text list representing the options.
  139. ; This is called from the setup program.
  140. ;
  141. ; INPUT: $($0): Language used (ENG, FRN, ...)
  142. ;
  143. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL
  144. ; STATUS_NOLANGUAGE
  145. ; STATUS_FAILED
  146. ; $($R1): Option List
  147. ; $($R2): Option Text List
  148. ;--------------------------------------------------------------------
  149. [ReturnOptions]
  150. set Status = STATUS_FAILED
  151. set OptionList = {}
  152. set OptionTextList = {}
  153. ;
  154. ;----- Make sure the language passed is in our list
  155. ;
  156. set LanguageList = ^(LanguagesSupported, 1)
  157. Ifcontains(i) $($0) in $(LanguageList)
  158. goto returnoptions
  159. else
  160. set Status = STATUS_NOLANGUAGE
  161. goto finish_ReturnOptions
  162. endif
  163. ;
  164. ;----- Build the list of options and the text for the options
  165. ;
  166. returnoptions = +
  167. set OptionList = ^(Options, 1)
  168. set OptionTextList = ^(OptionsText$($0), 1)
  169. set Status = STATUS_SUCCESSFUL
  170. ;
  171. ;----- Return the status
  172. ;
  173. finish_ReturnOptions = +
  174. Return $(Status) $(OptionList) $(OptionTextList)
  175. ;----------InstallOption-------------------------------------------------
  176. ;
  177. ; InstallOption:
  178. ;
  179. ; This section is shelled to by main installation processing
  180. ; or by NCPASHEL.INF during reconfig, removal, update, etc.
  181. ;
  182. ;
  183. ; FUNCTION: To copy files representing Options
  184. ; To configure the installed option
  185. ; To update the registry for the installed option
  186. ;
  187. ; INPUT: $($0): Language to use
  188. ; $($1): OptionID to install
  189. ; $($2): SourceDirectory
  190. ; $($3): AddCopy (YES | NO)
  191. ; $($4): DoCopy (YES | NO)
  192. ; $($5): DoConfig (YES | NO)
  193. ;
  194. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
  195. ; STATUS_NOLANGUAGE |
  196. ; STATUS_USERCANCEL |
  197. ; STATUS_FAILED
  198. ;
  199. ;------------------------------------------------------------------------
  200. [InstallOption]
  201. ;
  202. ; extract parameters
  203. ;
  204. set Option = $($1)
  205. set SrcDir = $($2)
  206. set AddCopy = $($3)
  207. set DoCopy = $($4)
  208. set DoConfig = $($5)
  209. ;
  210. ; Check if the language requested is supported
  211. ;
  212. set LanguageList = ^(LanguagesSupported, 1)
  213. Ifcontains(i) $($0) NOT-IN $(LanguageList)
  214. Return STATUS_NOLANGUAGE
  215. endif
  216. Debug-Output "OEMNXPXN.INF: STF_CWDIR is: "$(!STF_CWDIR)
  217. Debug-Output "OEMNXPXN.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  218. ;
  219. ;----- Define all constants we need
  220. ;
  221. set-subst LF = "\n"
  222. read-syms GeneralConstants
  223. read-syms FileConstants
  224. read-syms DialogConstants$(!STF_LANGUAGE)
  225. read-syms FileConstants$(!STF_LANGUAGE)
  226. detect date
  227. set-title $(FunctionTitle)
  228. set to = Begin
  229. set from = Begin
  230. set CommonStatus = STATUS_SUCCESSFUL
  231. ;
  232. ;----- Take down the hourglass
  233. ;
  234. EndWait
  235. ;
  236. ;----- Set the label to jump to according to what the user
  237. ; wants done.
  238. ;
  239. Begin = +
  240. Ifstr(i) $(!NTN_InstallMode) == deinstall
  241. set StartLabel = removeadapter
  242. set OEM_ABANDON_OPTIONS = {+
  243. $(ProductMCSXNSSYSName),+
  244. $(ProductUBNBSYSName)}
  245. set OEM_ABANDON_SOFTWARE = {+
  246. $(ProductMCSXNSName),+
  247. $(ProductUBNBName), "Streams"}
  248. else-Ifstr(i) $(!NTN_InstallMode) == Update
  249. set StartLabel = UpgradeSoftware
  250. else-Ifstr(i) $(!NTN_InstallMode) == configure
  251. set StartLabel = configureadapter
  252. else-Ifstr(i) $(!NTN_InstallMode) == bind
  253. set StartLabel = bindingadapter
  254. else
  255. set StartLabel = installadapter
  256. set OEM_ABANDON_SOFTWARE = {}
  257. set OEM_ABANDON_OPTIONS = {}
  258. endif
  259. ;
  260. ;----- Jump to the label to execute the function needed
  261. ;
  262. set from = $(fatal)
  263. set to = $(fatal)
  264. goto $(StartLabel)
  265. ;---------------------------------------------------------------------
  266. ; This section handles the installation and setup of the driver
  267. ;---------------------------------------------------------------------
  268. installadapter = +
  269. Debug-Output "OEMNXPXN.INF: At installadapter"
  270. ;
  271. ;----- Open the key for the product
  272. ;
  273. Debug-Output "OEMNXPXN.INF: Opening key for the product"
  274. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  275. Debug-Output "OEMNXPXN.INF: Back from opening key for the product"
  276. ;
  277. ;----- If the key is already there, then tell the user that the
  278. ; product is already installed.
  279. ;
  280. Ifstr $(KeyProduct) != $(KeyNull)
  281. CloseRegKey $(KeyProduct)
  282. Shell $(UtilityInf), VerExistedDlg, $(Product$(Option)Title),+
  283. $(ProductVersion)
  284. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  285. Debug-Output "OEMNXPXN.INF: ShellCode error: cannot get an error string."
  286. goto ShellCodeError
  287. endif
  288. goto end
  289. endif
  290. ;
  291. ;----- If we are to copy - then set it here
  292. ;
  293. Ifstr(i) $(!NTN_InstallMode) == "install"
  294. Ifstr(i) $(DoCopy) == "YES"
  295. Debug-Output "OEMNXPXN.INF: Calling DoAskSource 1"
  296. Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir)
  297. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  298. Goto ShellCodeError
  299. Else-Ifstr(i) $($R0) == STATUS_FAILED
  300. Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  301. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  302. goto ShellCodeError
  303. endif
  304. set Error = $($R0)
  305. Goto fatal
  306. Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  307. Goto successful
  308. Endif
  309. Set SrcDir = $($R1)
  310. Endif
  311. install "Install-Option"
  312. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  313. Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  314. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  315. goto ShellCodeError
  316. endif
  317. set Error = $($R0)
  318. goto fatal
  319. endif
  320. endif
  321. ;
  322. ;----- Get the string to use and put up a box that we are installing
  323. ;
  324. Debug-Output "OEMNXPXN.INF: Put up box that we are installing"
  325. set OEM_ABANDON_ON = TRUE
  326. read-syms Billboard1$(!STF_LANGUAGE)
  327. Shell "subroutn.inf" PushBillboard NETSTATUSDLG $(Status)
  328. Set BillboardVisible = 1
  329. ;
  330. ;----- Set the options that we are going to install
  331. ;
  332. Set DoMcsXns = FALSE
  333. Set DoMcsXnsSys = FALSE
  334. Set DoUbnb = FALSE
  335. Set DoUbnbSys = FALSE
  336. Set DoStreams = FALSE
  337. Ifstr(i) $(Option) == MCSXNS
  338. Set DoMcsXns = TRUE
  339. Set DoMcsXnsSys = TRUE
  340. Set DoUbnb = TRUE
  341. Set DoUbnbSys = TRUE
  342. Set DoStreams = TRUE
  343. Else-ifstr(i) $(Option) == UBNB
  344. Set DoUbnb = TRUE
  345. Set DoUbnbSys = TRUE
  346. Else
  347. Debug-Output "OEMNXPXN.INF: Unrecognized option"
  348. Endif
  349. ;
  350. ;----- Put up the hourglass
  351. ;
  352. Debug-Output "OEMNXPXN.INF: Start the install"
  353. StartWait
  354. ;
  355. ;----- Option to install McsXns Service Controller Daemon
  356. ;
  357. ifstr(i) $(DoMcsXns) == TRUE
  358. Set ThisOption = MCSXNS
  359. Set OEM_ABANDON_SOFTWARE = >($(OEM_ABANDON_SOFTWARE), $(Product$(ThisOption)Name))
  360. Debug-Output "OEMNXPXN.INF: installing McsXns."
  361. Shell $(UtilityInf), AddSoftwareComponent,+
  362. $(Manufacturer),+
  363. $(Product$(ThisOption)Name),+
  364. $(Product$(ThisOption)Name),+
  365. $(Product$(ThisOption)DisplayName),+
  366. $(STF_CONTEXTINFNAME),+
  367. $(Product$(ThisOption)ImagePath),+
  368. $(Product$(ThisOption)SvcType),+
  369. "",+
  370. {"McsXnssys"},+
  371. ""
  372. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  373. Debug-Output "OEMNXPXN.INF: ShellCode error, add software component"
  374. goto ShellCodeError
  375. endif
  376. set RegistryErrorIndex = $($R0)
  377. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  378. EndWait
  379. Debug-Output "OEMNXPXN.INF: Registry error: add software components"
  380. CloseRegKey $($R1)
  381. CloseRegKey $($R2)
  382. CloseRegKey $($R3)
  383. CloseRegKey $($R4)
  384. CloseRegKey $($R5)
  385. goto fatalregistry
  386. endif
  387. ;
  388. ;----- Set the return values to local vars
  389. ;
  390. Set McsXnsVersKeyHandle = $($R1)
  391. Set McsXnsRulesKeyHandle = $($R2)
  392. Set McsXnsSvcKeyHandle = $($R3)
  393. Set McsXnsParmKeyHandle = $($R4)
  394. Set McsXnsLinkageHandle = $($R5)
  395. ;
  396. ;----- Set the Version entry
  397. ;
  398. set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  399. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  400. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  401. {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  402. {Description,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Description)},+
  403. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Name)},+
  404. {Review,$(NoTitle),$(!REG_VT_DWORD),1},+
  405. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  406. Shell $(UtilityInf), AddValueList, $(McsXnsVersKeyHandle), $(NewValueList)
  407. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  408. Debug-Output "OEMNXPXN.INF: ShellCode error, add value list"
  409. goto ShellCodeError
  410. endif
  411. set RegistryErrorIndex = $($R0)
  412. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  413. EndWait
  414. Debug-Output "OEMNXPXN.INF: Registry error: add value list."
  415. CloseRegKey $(McsXnsVersKeyHandle)
  416. CloseRegKey $(McsXnsRulesKeyHandle)
  417. CloseRegKey $(McsXnsSvcKeyHandle)
  418. CloseRegKey $(McsXnsParmKeyHandle)
  419. CloseRegkey $(McsXnsLinkageHandle)
  420. goto fatalregistry
  421. Endif
  422. ;
  423. ;----- Set the NetRules entry
  424. ;
  425. set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  426. {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)},+
  427. {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)BindForm)},+
  428. {class,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Class)},+
  429. {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)} }
  430. Shell $(UtilityInf), AddValueList, $(McsXnsRulesKeyHandle), $(NewValueList)
  431. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  432. Debug-Output "OEMNXPXN.INF: ShellCode error."
  433. goto ShellCodeError
  434. endif
  435. ;
  436. ;----- Close up some of the handles
  437. ;
  438. set RegistryErrorIndex = $($R0)
  439. CloseRegKey $(McsXnsVersKeyHandle)
  440. CloseRegKey $(McsXnsRulesKeyHandle)
  441. CloseRegKey $(McsXnsParmKeyHandle)
  442. ;
  443. ;----- If we got an error - get out
  444. ;
  445. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  446. CloseRegKey $(McsXnsLinkageHandle)
  447. CloseRegKey $(McsXnsSvcKeyHandle)
  448. EndWait
  449. Debug-Output "OEMNXPXN.INF: Registry error: add value list."
  450. goto fatalregistry
  451. endif
  452. ;
  453. ;----- Set the OtherDependencies List
  454. ;
  455. Set NewValueList = {{OtherDependencies,$(NoTitle),$(!REG_VT_MULTI_SZ),{"McsXnssys"}}}
  456. Shell $(UtilityInf), AddValueList, $(McsXnsLinkageHandle), $(NewValueList)
  457. CloseRegKey $(McsXnsLinkageHandle)
  458. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  459. CloseRegKey $(McsXnsSvcKeyHandle)
  460. Debug-Output "OEMNXPXN.INF: ShellCode error."
  461. goto ShellCodeError
  462. endif
  463. ;
  464. ;----- Go create all the subkey stuff
  465. ;
  466. Shell "" CreateMcsXnsConfiguration $(McsXnsSvcKeyHandle)
  467. ;
  468. ;----- Close up and check for error
  469. ;
  470. CloseRegKey $(McsXnsSvcKeyHandle)
  471. Set RegistryErrorIndex = $($R0)
  472. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  473. EndWait
  474. Debug-Output "OEMNXPXN.INF: Registry error: Create MCSXNS configuration."
  475. goto fatalregistry
  476. endif
  477. ;
  478. ;----- Add info to the Winsock entry
  479. ; This is now done in the service controller daemon
  480. Debug-Output "OEMNXPXN.INF: Adding winsock data"
  481. Shell $(UtilityInf), AddWinsockInfo, +
  482. $(Product$(ThisOption)Name), +
  483. $(Product$(ThisOption)WshDllPath), +
  484. $(Sockmaxlength),$(Sockminlength)
  485. set RegistryErrorIndex = $($R0)
  486. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  487. Debug-Output "OEMNXPXN.INF: Registry error: Add Winsock Info."
  488. Endif
  489. Endif
  490. ;
  491. ;----- Option to install McsXns Kernel Driver
  492. ;
  493. Ifstr(i) $(DoMcsXnsSys) == TRUE
  494. Set ThisOption = MCSXNSSYS
  495. Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(Product$(ThisOption)Name))
  496. Debug-Output "OEMNXPXN.INF: installing MCSXNSSYS..."
  497. ;
  498. ;----- Create the service
  499. ;
  500. Shell $(UtilityInf), CreateService,+
  501. $(Product$(ThisOption)Name),+
  502. $(Product$(ThisOption)DisplayName),+
  503. $(Product$(ThisOption)ImagePath),+
  504. $(Product$(ThisOption)SvcType) "",+
  505. {"Streams"}, "", $(McsXnsEventDLL)
  506. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  507. Debug-Output "OEMNXPXN.INF: ShellCode error"
  508. goto ShellCodeError
  509. endif
  510. set RegistryErrorIndex = $($R0)
  511. CloseRegKey $($R2)
  512. CloseRegKey $($R3)
  513. Set McsXnsSysSvcKeyHandle = $($R1)
  514. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  515. EndWait
  516. CloseRegKey $(McsXnsSysSvcKeyHandle)
  517. CloseRegKey $($R2)
  518. CloseRegKey $($R3)
  519. Debug-Output "OEMNXPXN.INF: Registry error: add software components"
  520. goto fatalregistry
  521. endif
  522. ;; CreateRegKey $(McsXnsSysSvcKeyHandle) {"Performance",$(NoTitle),GenericClass} "" +
  523. ;; $(MAXIMUM_ALLOWED) "" KeyPerformance
  524. ;; set NewValueList = {{Library,$(NoTitle),$(!REG_VT_SZ),"Perfctrs.dll"},+
  525. ;; {Open,$(NoTitle),$(!REG_VT_SZ),"OpenTcpIpPerformanceData"},+
  526. ;; {Collect,$(NoTitle),$(!REG_VT_SZ),"CollectTcpIpPerformanceData"},+
  527. ;; {Close,$(NoTitle),$(!REG_VT_SZ),"CloseTcpIpPerformanceData"}}
  528. ;; Shell $(UtilityInf), AddValueList, $(KeyPerformance), $(NewValueList)
  529. ;; set RegistryErrorIndex = $($R0)
  530. ;; CloseRegKey $(KeyPerformance)
  531. CloseRegKey $(McsXnsSysSvcKeyHandle)
  532. Ifstr $(RegistryErrorIndex) != NO_ERROR
  533. goto fatalRegistry
  534. Endif
  535. Endif
  536. ;
  537. ;----- Option to install Ungermann-Bass NetBIOS
  538. ;
  539. Ifstr(i) $(DoUbnb) == TRUE
  540. Set ThisOption = UBNB
  541. Set OEM_ABANDON_SOFTWARE = >($(OEM_ABANDON_SOFTWARE), $(Product$(ThisOption)Name))
  542. Debug-Output "OEMNXPXN.INF: installing UBNB..."
  543. Shell $(UtilityInf), AddSoftwareComponent,+
  544. $(Manufacturer),+
  545. $(Product$(ThisOption)Name),+
  546. $(Product$(ThisOption)Name),+
  547. $(Product$(ThisOption)DisplayName),+
  548. $(STF_CONTEXTINFNAME),+
  549. $(Product$(ThisOption)ImagePath),+
  550. $(Product$(ThisOption)SvcType),+
  551. "TDI",+
  552. {},+
  553. ""
  554. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  555. Debug-Output "OEMNXPXN.INF: ShellCode error"
  556. goto ShellCodeError
  557. endif
  558. set RegistryErrorIndex = $($R0)
  559. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  560. EndWait
  561. Debug-Output "OEMNXPXN.INF: Registry error: add software components"
  562. CloseRegKey $($R1)
  563. CloseRegKey $($R2)
  564. CloseRegKey $($R3)
  565. CloseRegKey $($R4)
  566. CloseRegKey $($R5)
  567. goto fatalregistry
  568. endif
  569. Set UBNBProductKey = $($R1)
  570. Set UBNBNetRuleKey = $($R2)
  571. Set UBNBServiceKey = $($R3)
  572. Set UBNBParameterKey = $($R4)
  573. Set UBNBLinkageKey = $($R5)
  574. ;
  575. ;----- Set the version info
  576. ;
  577. set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  578. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  579. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  580. {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  581. {Description,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Description)},+
  582. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Name)},+
  583. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  584. Shell $(UtilityInf), AddValueList, $(UBNBProductKey), $(NewValueList)
  585. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  586. Debug-Output "OEMNXPXN.INF: ShellCode error."
  587. goto ShellCodeError
  588. endif
  589. set RegistryErrorIndex = $($R0)
  590. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  591. EndWait
  592. Debug-Output "OEMNXPXN.INF: Registry error: add value list."
  593. CloseRegKey $(UBNBProductKey)
  594. CloseRegKey $(UBNBNetRuleKey)
  595. CloseRegKey $(UBNBServiceKey)
  596. CloseRegKey $(UBNBParameterKey)
  597. CloseRegKey $(UBNBLinkageKey)
  598. goto fatalregistry
  599. endif
  600. ;
  601. ;----- Set the other dependencies
  602. ;
  603. set NewValueList = {{OtherDependencies,$(NoTitle),$(!REG_VT_MULTI_SZ),{"McsXns","Ubnbsys"}}}
  604. Shell $(UtilityInf), AddValueList, $(UBNBLinkageKey), $(NewValueList)
  605. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  606. Debug-Output "OEMNXPXN.INF: ShellCode error."
  607. goto ShellCodeError
  608. endif
  609. set RegistryErrorIndex = $($R0)
  610. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  611. EndWait
  612. Debug-Output "OEMNXPXN.INF: Registry error: add value list."
  613. CloseRegKey $(UBNBProductKey)
  614. CloseRegKey $(UBNBNetRuleKey)
  615. CloseRegKey $(UBNBServiceKey)
  616. CloseRegKey $(UBNBParameterKey)
  617. CloseRegKey $(UBNBLinkageKey)
  618. goto fatalregistry
  619. endif
  620. ;
  621. ;----- Set the NetRules entry
  622. ;
  623. set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  624. {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)},+
  625. {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)BindForm)},+
  626. {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRule$(ThisOption)ClassList)},+
  627. {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}}
  628. Shell $(UtilityInf), AddValueList, $(UBNBNetRuleKey), $(NewValueList)
  629. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  630. Debug-Output "OEMNXPXN.INF: ShellCode error."
  631. goto ShellCodeError
  632. endif
  633. set RegistryErrorIndex = $($R0)
  634. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  635. EndWait
  636. Debug-Output "OEMNXPXN.INF: Registry error: add value list."
  637. CloseRegKey $(UBNBProductKey)
  638. CloseRegKey $(UBNBNetRuleKey)
  639. CloseRegKey $(UBNBServiceKey)
  640. CloseRegKey $(UBNBParameterKey)
  641. CloseRegKey $(UBNBLinkageKey)
  642. goto fatalregistry
  643. endif
  644. Set NewValueList = {{NbProvider,$(NoTitle),$(!REG_VT_SZ),"_xns"},+
  645. {EndPoint,$(NoTitle),$(!REG_VT_DWORD),1}}
  646. Shell $(UtilityInf), AddValueList, $(UBNBParameterKey), $(NewValueList)
  647. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  648. Debug-Output "OEMNXPXN.INF: ShellCode error."
  649. goto ShellCodeError
  650. Endif
  651. set RegistryErrorIndex = $($R0)
  652. CloseRegKey $(UBNBProductKey)
  653. CloseRegKey $(UBNBNetRuleKey)
  654. CloseRegKey $(UBNBServiceKey)
  655. CloseRegKey $(UBNBParameterKey)
  656. CloseRegKey $(UBNBLinkageKey)
  657. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  658. EndWait
  659. Debug-Output "OEMNXPXN.INF: Registry error: add value list."
  660. goto fatalregistry
  661. endif
  662. ;Shell $(UtilityInf) AddMixRpcProtocol "Netbios" "mcsxns" "ncacn_nb_xns" "rpclt1.dll" "rpclt1.dll"
  663. ;Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  664. ; Debug-Output "OEMNXPXN.INF: ShellCode error adding RPC procotol"
  665. ; goto ShellCodeError
  666. ;endif
  667. ;Set RegistryErrorIndex = $($R0)
  668. ;Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  669. ; Debug-Output "OEMNXPXN.INF: ERROR adding RPC protocol data"
  670. ; EndWait
  671. ; goto fatalregistry
  672. ;Endif
  673. Endif
  674. ;
  675. ;----- Option to install Ungermann-Bass NetBIOS kernel driver
  676. ;
  677. Ifstr(i) $(DoUbnbSys) == TRUE
  678. Set ThisOption = UBNBSYS
  679. Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(Product$(ThisOption)Name))
  680. Debug-Output "OEMNXPXN.INF: installing UBNBSYS..."
  681. Shell $(UtilityInf), CreateService,+
  682. $(Product$(ThisOption)Name),+
  683. $(Product$(ThisOption)DisplayName),+
  684. $(Product$(ThisOption)ImagePath),+
  685. $(Product$(ThisOption)SvcType), "", {"Streams"}, "",+
  686. $(UbnbEventDLL)
  687. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  688. Debug-Output "OEMNXPXN.INF: ShellCode error"
  689. goto ShellCodeError
  690. endif
  691. set RegistryErrorIndex = $($R0)
  692. CloseRegKey $($R1)
  693. CloseRegKey $($R2)
  694. CloseRegKey $($R3)
  695. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  696. EndWait
  697. Debug-Output "OEMNXPXN.INF: Registry error: add software components"
  698. goto fatalregistry
  699. endif
  700. Endif
  701. ;
  702. ;----- Take down the hourglass
  703. ;
  704. EndWait
  705. ;
  706. ;----- If the billboard is up - take it down
  707. ;
  708. Ifint $(BillboardVisible) != 0
  709. Shell "subroutn.inf" PopBillboard
  710. Set BillboardVisible = 0
  711. Endif
  712. ;
  713. ; Install Streams
  714. ;
  715. Ifstr(i) $(DoStreams) == TRUE
  716. Set ThisOption = STREAMS
  717. Set OEM_ABANDON_SOFTWARE = >($(OEM_ABANDON_SOFTWARE), "Streams")
  718. Debug-Output "OEMNXPXN.INF: installing STREAMS..."
  719. Set !STF_SRCDIR_OVERRIDE = $(SrcDir)
  720. Shell $(UtilityInf) AddStreams
  721. Set !STF_SRCDIR_OVERRIDE = ""
  722. set RegistryErrorIndex = $($R0)
  723. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  724. EndWait
  725. goto fatalregistry
  726. endif
  727. Endif
  728. ;
  729. ;----- Exit OK
  730. ;
  731. goto successful
  732. ;---------------------------------------------------------------------
  733. ; This section handles the configuration of the driver
  734. ;---------------------------------------------------------------------
  735. configureadapter = +
  736. Debug-Output "OEMNXPXN.INF: At ConfigureAdapter"
  737. ifstr(i) $(Option) == "MCSXNS"
  738. ;
  739. ; Read the active and disabled bindings into a single list
  740. ;
  741. Set BindList = {}
  742. Set DisabledList = {}
  743. OpenRegKey $(!REG_H_LOCAL) "" $(LinkageKeyName) $(MAXIMUM_ALLOWED) LinkageKey
  744. ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  745. GetRegValue $(LinkageKey) "Bind" BindList
  746. ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  747. set BindList = *($(BindList),4)
  748. else
  749. Set BindList = {}
  750. endif
  751. OpenRegKey $(LinkageKey) "" Disabled $(MAXIMUM_ALLOWED) DisabledKey
  752. ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  753. GetRegValue $(DisabledKey) "Bind" DisabledList
  754. ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  755. Set DisabledList = *($(DisabledList),4)
  756. else
  757. Set DisabledList = {}
  758. endif
  759. CloseRegKey $(DisabledKey)
  760. endif
  761. CloseRegKey $(LinkageKey)
  762. endif
  763. ; Merge the two lists
  764. ForListDo $(DisabledList)
  765. Set BindList = >($(BindList),$($))
  766. EndForListDo
  767. ; Check that we're bound to something
  768. ifstr(i) $(BindList) == {}
  769. debug-output "OEMNXPXN.INF: no binding info; warning user"
  770. read-syms InfoDlgCantConfigure
  771. goto infomsg
  772. endif
  773. ; Extract and validate the card names from the binding strings.
  774. Debug-Output "OEMNXPXN.INF: configureadapter, BindList = "$(BindList)
  775. set OldVersionExisted = $(TRUE)
  776. set CardList = ""
  777. ForListDo $(BindList)
  778. ; Adapter name is the last element in binding string;
  779. ; extract it.
  780. Split-String $($), "\", BindInfo
  781. QueryListSize BindElem $(BindInfo)
  782. Set BindName = *($(BindInfo),$(BindElem))
  783. ; Validate it; append to string if OK
  784. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(BindName) $(MAXIMUM_ALLOWED) CardServiceKey
  785. ifstr(i) $(CardServiceKey) != ""
  786. CloseRegKey $(CardServiceKey)
  787. Set CardList = $(CardList)"@"$(BindName)
  788. endif
  789. EndForListDo
  790. ifstr(i) $(CardList) != ""
  791. Debug-Output "OEMNXPXN.INF: configureadapter, CardList = "$(CardList)
  792. set FLibraryErrCtl = 1
  793. LoadLibrary "x", $(!STF_WINDOWSSYSPATH)\xnscfg.dll MCSXNSLIB_HANDLE
  794. LibraryProcedure ResultList, $(MCSXNSLIB_HANDLE), nlink_setup_dialog, $(!STF_HWND), +
  795. $(CardList), $(!STF_COMPUTERNAME), $(!STF_WINDOWSSYSPATH)\xnscfg.dll
  796. FreeLibrary $(MCSXNSLIB_HANDLE)
  797. set FLibraryErrCtl = 0
  798. ; Result list is of the form {<0|1>,"name of active adapter"}
  799. Debug-Output "OEMNXPXN.INF: configureadapter, ResultList = "$(ResultList)
  800. Set Result = *($(ResultList),1)
  801. Set AdapterChosen = *($(ResultList),2)
  802. Ifint $(Result) == 0
  803. set CommonStatus = STATUS_NO_EFFECT
  804. Else
  805. set CommonStatus = STATUS_REBOOT
  806. Ifstr(i) $(AdapterChosen) != ""
  807. Set BindingChosen = ""
  808. ForListDo $(BindList)
  809. Split-String $($), "\", BindInfo
  810. QueryListSize BindElem $(BindInfo)
  811. Set AdapterName = *($(BindInfo),$(BindElem))
  812. Ifstr(i) $(AdapterName) == $(AdapterChosen)
  813. Set BindingChosen = $($)
  814. Endif
  815. EndForListDo
  816. ; Change the bindings on both the primary transport
  817. ; and the NetBIOS daemon.
  818. Ifstr(i) $(BindingChosen) != ""
  819. Debug-Output "OEMNXPXN.INF: configureadapter, BindingChosen = "$(BindingChosen)
  820. set FLibraryErrCtl = 1
  821. LibraryProcedure ResultList $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), +
  822. ACTIVBIND, $(ProductMCSXNSName) {$(BindingChosen)}
  823. set FLibraryErrCtl = 0
  824. Set Result = *($(ResultList),1)
  825. Debug-Output "OEMNXPXN.INF: configureadapter, ACTIVBIND returned error: "$(Result)
  826. Else
  827. Debug-Output "OEMNXPXN.INF: configureadapter, ERROR: AdapterChosen not found in bindings list!"
  828. Endif
  829. Endif
  830. Endif
  831. else
  832. set CommonStatus = STATUS_USERCANCEL
  833. endif
  834. else
  835. Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  836. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  837. Debug-Output "OEMNXPIP.INF: ShellCode error: cannot get an error string."
  838. goto ShellCodeError
  839. endif
  840. set Error = $($R0)
  841. set from = end
  842. set to = end
  843. set CommonStatus = STATUS_NO_EFFECT
  844. goto nonfatalinfo
  845. endif
  846. goto end
  847. ;---------------------------------------------------------------------
  848. ; This section handles the configuration of the driver
  849. ;---------------------------------------------------------------------
  850. bindingadapter =+
  851. set FLibraryErrCtl = 1
  852. LibraryProcedure ResultList, $(!NCPA_HANDLE), CPlSetup, $(!STF_HWND), MCSCFGCHK "MCSXNS"
  853. set FLibraryErrCtl = 0
  854. Set Result = *($(ResultList),1)
  855. ifint $(Result) == 0
  856. Debug-Output "OEMNXPXN.INF: reconfiguration not required"
  857. set CommonStatus = STATUS_USERCANCEL
  858. goto successful
  859. else
  860. Debug-Output "OEMNXPXN.INF: reconfiguration required"
  861. endif
  862. goto configureadapter
  863. ;---------------------------------------------------------------------
  864. ; This section handles the removal of the driver
  865. ;---------------------------------------------------------------------
  866. removeadapter = +
  867. Debug-Output "OEMNXPXN.INF: At removeadapter"
  868. ;
  869. ; Remove XNS RPC info
  870. ;
  871. Shell $(UtilityInf) RemoveRpcProtocol "ncacn_nb_xns"
  872. ;Ifstr(i) $($0) != NO_ERROR
  873. ; Debug-Output "OEMNXPXN.INF: ERROR deleting RPC protocol data"
  874. ;Endif
  875. ForListDo $(OEM_ABANDON_SOFTWARE)
  876. debug-output "Remove component: "$($)
  877. ifstr(i) $($) == "Streams"
  878. Shell $(UtilityInf), RemoveStreams
  879. else
  880. Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), $($)
  881. endif
  882. EndForListDo
  883. ForListDo $(OEM_ABANDON_OPTIONS)
  884. DEBUG-OUTPUT "Remove component: "$($)
  885. Ifstr(i) $($) == $(ProductLOOPName)
  886. Set UseSvcctrl = "NO"
  887. Else
  888. Set UseSvcctrl = "YES"
  889. Endif
  890. Shell $(UtilityInf), RemoveService, $($), $(UseSvcctrl)
  891. EndForListDo
  892. ;
  893. ;----- Remove info from the Winsock entry
  894. ;
  895. Shell $(UtilityInf), RemoveWinsockInfo,+
  896. $(Product$(Option)Name)
  897. ;
  898. ;-----
  899. ;
  900. goto end
  901. ;---------------------------------------------------------------------
  902. ; This section handles the removal of the driver
  903. ;---------------------------------------------------------------------
  904. UpgradeSoftware = +
  905. ; Upgrade software component
  906. ;
  907. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  908. Ifstr $(KeyProduct) != $(KeyNull)
  909. install "Install-Update"
  910. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  911. goto fatal
  912. endif
  913. ; Upgrade the version number
  914. ;
  915. SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  916. SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  917. Shell $(UtilityInf), UpdateWinsockMappings, $(Product$(ThisOption)Name), $(Product$(ThisOption)WshDllPath)
  918. ifstr(i) $($R0) != NO_ERROR
  919. goto fatal
  920. endif
  921. ;
  922. ; do nothing for update
  923. ;
  924. CloseRegKey $(KeyProduct)
  925. else
  926. ;
  927. ; Cannot Open software key, goto ERROR
  928. ;
  929. goto fatalregistry
  930. endif
  931. goto end
  932. ;
  933. ;----- Everything was OK
  934. ;
  935. successful = +
  936. goto end
  937. ;
  938. ;-----
  939. ;
  940. infomsg =+
  941. read-syms InfoDlg
  942. ui start "Warning"
  943. set CommonStatus = STATUS_USERCANCEL
  944. goto end
  945. ;
  946. ;-----
  947. ;
  948. warning = +
  949. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  950. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  951. goto ShellCodeError
  952. endif
  953. ifstr(i) $($R1) == "OK"
  954. goto $(to)
  955. else-ifstr(i) $($R1) == "CANCEL"
  956. goto $(from)
  957. else
  958. goto "end"
  959. endif
  960. ;
  961. ;-----
  962. ;
  963. nonfatalinfo = +
  964. Set CommonStatus = STATUS_USERCANCEL
  965. Set Severity = STATUS
  966. goto nonfatalmsg
  967. nonfatal = +
  968. Set Severity = NONFATAL
  969. goto nonfatalmsg
  970. nonfatalmsg = +
  971. ifstr(i) $(Error) == ""
  972. Set Severity = NONFATAL
  973. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  974. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  975. goto ShellCodeError
  976. endif
  977. set Error = $($R0)
  978. endif
  979. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  980. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  981. goto ShellCodeError
  982. endif
  983. ifstr(i) $($R1) == "OK"
  984. goto $(from)
  985. else
  986. goto "end"
  987. endif
  988. ;
  989. ;-----
  990. ;
  991. fatalregistry = +
  992. Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  993. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  994. goto ShellCodeError
  995. endif
  996. set Error = $($R0)
  997. goto fatal
  998. ;
  999. ;-----
  1000. ;
  1001. fatal = +
  1002. ifstr(i) $(Error) == ""
  1003. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1004. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1005. goto ShellCodeError
  1006. endif
  1007. set Error = $($R0)
  1008. endif
  1009. Ifint $(BillboardVisible) != 0
  1010. Shell "subroutn.inf" PopBillboard
  1011. Set BillboardVisible = 0
  1012. Endif
  1013. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1014. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1015. goto ShellCodeError
  1016. endif
  1017. goto setfailed
  1018. ;
  1019. ;-----
  1020. ;
  1021. ShellCodeError = +
  1022. set DlgType = "MessageBox"
  1023. set STF_MB_TITLE = $(ShellCodeErrorTitle)
  1024. set STF_MB_TEXT = $(ShellCodeErrorText)
  1025. set STF_MB_TYPE = 1
  1026. set STF_MB_ICON = 3
  1027. set STF_MB_DEF = 1
  1028. ui start "Error Message"
  1029. goto setfailed
  1030. ;
  1031. ;-----
  1032. ;
  1033. setfailed = +
  1034. set CommonStatus = STATUS_FAILED
  1035. ifstr(i) $(OEM_ABANDON_ON) == TRUE
  1036. set OEM_ABANDON_ON = FALSE
  1037. goto removeadapter
  1038. endif
  1039. goto end
  1040. ;
  1041. ;-----
  1042. ;
  1043. end = +
  1044. goto term
  1045. ;
  1046. ;-----
  1047. ;
  1048. term = +
  1049. Return $(CommonStatus)
  1050. ;**********************************************************************
  1051. ; Create the configuration
  1052. ;**********************************************************************
  1053. [CreateMcsXnsConfiguration]
  1054. read-syms GeneralConstants
  1055. Set McsXnsSvcKeyHandle = $($0)
  1056. Debug-Output "OEMNXPXN.INF: installing McsXns configuration:"
  1057. ;
  1058. ;----- Create the NetConfig Entry
  1059. ;
  1060. CreateRegKey $(McsXnsSvcKeyHandle) {"NetConfig",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyNetConfig
  1061. ;
  1062. ;----- Create the driver entries (1)
  1063. ;
  1064. CreateRegKey $(KeyNetConfig) {"Driver01",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyDriver
  1065. Shell $(UtilityInf) AddValueList, $(KeyDriver),+
  1066. {{"AdapterName", $(NoTitle), $(!REG_VT_SZ), ""} +
  1067. {"NetworkNumber", $(NoTitle), $(!REG_VT_DWORD), 1} +
  1068. {"WindowSize", $(NoTitle), $(!REG_VT_DWORD), 0} +
  1069. {"MaxPktSize", $(NoTitle), $(!REG_VT_DWORD), 0}}
  1070. CloseRegKey $(KeyDriver)
  1071. ;
  1072. ;----- Create the driver entries (2)
  1073. ;
  1074. CreateRegKey $(KeyNetConfig) {"Driver02",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyDriver
  1075. Shell $(UtilityInf) AddValueList, $(KeyDriver),+
  1076. {{"AdapterName", $(NoTitle), $(!REG_VT_SZ), ""} +
  1077. {"NetworkNumber", $(NoTitle), $(!REG_VT_DWORD), 0} +
  1078. {"WindowSize", $(NoTitle), $(!REG_VT_DWORD), 0} +
  1079. {"MaxPktSize", $(NoTitle), $(!REG_VT_DWORD), 0}}
  1080. CloseRegKey $(KeyDriver)
  1081. ;
  1082. ;----- Create the driver entries (3)
  1083. ;
  1084. CreateRegKey $(KeyNetConfig) {"Driver03",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyDriver
  1085. Shell $(UtilityInf) AddValueList, $(KeyDriver),+
  1086. {{"AdapterName", $(NoTitle), $(!REG_VT_SZ), ""} +
  1087. {"NetworkNumber", $(NoTitle), $(!REG_VT_DWORD), 0} +
  1088. {"WindowSize", $(NoTitle), $(!REG_VT_DWORD), 0} +
  1089. {"MaxPktSize", $(NoTitle), $(!REG_VT_DWORD), 0}}
  1090. CloseRegKey $(KeyDriver)
  1091. ;
  1092. ;----- Create the driver entries (4)
  1093. ;
  1094. CreateRegKey $(KeyNetConfig) {"Driver04",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyDriver
  1095. Shell $(UtilityInf) AddValueList, $(KeyDriver),+
  1096. {{"AdapterName", $(NoTitle), $(!REG_VT_SZ), ""} +
  1097. {"NetworkNumber", $(NoTitle), $(!REG_VT_DWORD), 0} +
  1098. {"WindowSize", $(NoTitle), $(!REG_VT_DWORD), 0} +
  1099. {"MaxPktSize", $(NoTitle), $(!REG_VT_DWORD), 0}}
  1100. CloseRegKey $(KeyDriver)
  1101. ;
  1102. ;----- Create the driver entries (5)
  1103. ;
  1104. CreateRegKey $(KeyNetConfig) {"Driver05",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyDriver
  1105. Shell $(UtilityInf) AddValueList, $(KeyDriver),+
  1106. {{"AdapterName", $(NoTitle), $(!REG_VT_SZ), ""} +
  1107. {"NetworkNumber", $(NoTitle), $(!REG_VT_DWORD), 0} +
  1108. {"WindowSize", $(NoTitle), $(!REG_VT_DWORD), 0} +
  1109. {"MaxPktSize", $(NoTitle), $(!REG_VT_DWORD), 0}}
  1110. CloseRegKey $(KeyDriver)
  1111. ;
  1112. ;----- Close the NetConfig key
  1113. ;
  1114. CloseRegKey $(KeyNetConfig)
  1115. ;
  1116. ;----- All Done
  1117. ;
  1118. CreateMcsXnsConfigDone = +
  1119. Debug-Output "OEMNXPXN.INF: installing McsXns.....done."
  1120. Return NO_ERROR
  1121. ;********************************************************************
  1122. ;********************************************************************
  1123. [Install-Option]
  1124. set STF_VITAL = ""
  1125. ;
  1126. ;----- Add files to the copy list
  1127. ;
  1128. ifstr(i) $(AddCopy) == "YES"
  1129. Debug-Output "OEMNXPXN.INF: Adding files to copy list"
  1130. AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1131. AddSectionFilesToCopyList Files-MCSXNSEXE $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1132. endif
  1133. ;
  1134. ;----- Copy the files over
  1135. ;
  1136. ifstr(i) $(DoCopy) == "YES"
  1137. Debug-Output "OEMNXPXN.INF: Copying Files"
  1138. set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1139. CopyFilesInCopyList
  1140. endif
  1141. ifstr(i) $(DoConfig) == "YES"
  1142. endif
  1143. Exit
  1144. ;********************************************************************
  1145. ;********************************************************************
  1146. [Install-Update]
  1147. set STF_VITAL = ""
  1148. set STF_OVERWRITE = "VERIFYSOURCEOLDER"
  1149. ;
  1150. ;-----
  1151. ;
  1152. AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1153. AddSectionFilesToCopyList Files-MCSXNSEXE $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1154. ;
  1155. ;-----
  1156. ;
  1157. Exit
  1158. ;********************************************************************
  1159. ;********************************************************************
  1160. [Source Media Descriptions]
  1161. 1 = "MCS XNS/UB Installation Disk" , TAGFILE = mcsxnsvc.exe
  1162. ;********************************************************************
  1163. ;********************************************************************
  1164. [Files-Inf]
  1165. 1, oemsetup.inf, SIZE=1000, RENAME=$(!UG_Filename)
  1166. [Files-MCSXNS]
  1167. 1, mcsxns.sys, SIZE=42496
  1168. 1, ubnb.sys, SIZE=33792
  1169. [Files-MCSXNSEXE]
  1170. 1, mcsxnsvc.exe, SIZE=19456
  1171. 1, ubnbsvc.exe, SIZE=14848
  1172. 1, xnscfg.dll, SIZE=14848
  1173. 1, wshxns.dll, SIZE=14848
  1174. 1, xnsmsg.dll, SIZE=10000
  1175. 1, ubnbmsg.dll, SIZE=10000