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.

1684 lines
60 KiB

  1. ;===================================================================
  2. ;
  3. ; Installation file for NLINK/NWNBLINK
  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. NWLNKIPX
  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. NWLNKIPXEventDLL = "%SystemRoot%\System32\netevent.dll"
  28. ;----- This is the entry for the service controller daemon
  29. ;
  30. ProductNWLNKIPXName = "NwlnkIpx"
  31. ProductNWLNKIPXImagePath = "\SystemRoot\System32\drivers\nwlnkipx.sys"
  32. ProductNWLNKIPXSvcType = "kernel"
  33. ProviderImagePath = "%SystemRoot%\System32\nwprovau.dll"
  34. ProviderNameSpaces = 1 ; NS_SAP
  35. ProviderGUID = "{e02daaf0-7e9f-11cf-ae5a-00aa00a7112b}"
  36. ProductNWLNKIPXWshDllPath = "%SystemRoot%\System32\wshisn.dll"
  37. NetRuleNWLNKIPXType = "nwlnkIpx ipxTransport"
  38. NetRuleNWLNKIPXUse = $(SoftwareType)" none none"
  39. NetRuleNWLNKIPXBindForm = """NwlnkIpx"" yes yes simple"
  40. NetRuleNWLNKIPXBindable = {"ipxnbTransport ipxTransport non non 100",+
  41. "ipxTransport ndisDriver non non 100",+
  42. "lmNetService ipxnbTransport non non 100",+
  43. "nwcWorkstation ipxTransport non non 100",+
  44. "lanmanServer ipxTransport non non 100"}
  45. NetRuleNWLNKIPXClass = {"ipxnbTransport basic yes", "ipxTransport basic yes"}
  46. ProductNWLNKIPXOpSupport = 134 ; 0x0086 ; Display,Removable,Properties,Not Updatable
  47. ;
  48. ;----- This is the entry for the NetBIOS daemon
  49. ;
  50. ProductNWLNKNBName = "NwlnkNb"
  51. ProductNWLNKNBImagePath = "\SystemRoot\System32\drivers\nwlnknb.sys"
  52. ProductNWLNKNBSvcType = "kernel"
  53. NetRuleNWLNKNBType = "nwlnkNb ipxnbTransport"
  54. NetRuleNWLNKNBUse = "transport none no"
  55. NetRuleNWLNKNBBindForm = """NwlnkNb"" yes yes container"
  56. ProductNWLNKNBOpSupport = 128 ; 0x0080 ; Display,Not Removable,No Properties,Not Updatable
  57. ;
  58. ;----- This is the entry for the SPX
  59. ;
  60. ProductNWLNKSPXName = "NwlnkSpx"
  61. ProductNWLNKSPXImagePath = "\SystemRoot\System32\drivers\nwlnkspx.sys"
  62. ProductNWLNKSPXSvcType = "kernel"
  63. NetRuleNWLNKSPXType = "nwlnkSpx spxTransport"
  64. NetRuleNWLNKSPXBindable = {"spxTransport ipxTransport non non 100"}
  65. NetRuleNWLNKSPXClass = {"spxTransport basic yes"}
  66. NetRuleNWLNKSPXUse = "transport none no"
  67. NetRuleNWLNKSPXBindForm = """NwlnkSpx"" yes yes container"
  68. ;
  69. ;----- Name of Novell's stack: they cannot both be present
  70. ;
  71. CompetitorServiceName = "IPXSPXII"
  72. CompetitorKeyName = $(!NTN_ServiceBase)"\"$(CompetitorServiceName)
  73. ;--------------------------------------------------------------------
  74. ; Entries for the registry
  75. ;--------------------------------------------------------------------
  76. ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(Product$(Option)Name)"\CurrentVersion"
  77. NWLNKIPXNetRuleKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\NwlnkIpx\CurrentVersion\NetRules"
  78. NWLNKNBNetRuleKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\NwlnkNb\CurrentVersion\NetRules"
  79. NWLNKIPXKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\NwlnkIpx\CurrentVersion"
  80. NWLNKNBKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\NwlnkNb\CurrentVersion"
  81. OldProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"Nwlinkipx"\CurrentVersion"
  82. LinkageKeyName = $(!NTN_ServiceBase)"\NwlnkIpx\Linkage"
  83. RipKeyName = $(!NTN_ServiceBase)"\Nwlnkrip"
  84. ServiceNWLNKKeyName = $(!NTN_ServiceBase)"\NwlnkIpx"
  85. ServiceNWLNKNBKeyName = $(!NTN_ServiceBase)"\NwlnkNB"
  86. ServiceKeyName = $(!NTN_ServiceBase)
  87. ;--------------------------------------------------------------------
  88. ; Some nice general constants to have around
  89. ;--------------------------------------------------------------------
  90. [GeneralConstants]
  91. UtilityInf = "UTILITY.INF"
  92. subroutineinf = "SUBROUTN.INF"
  93. SoftwareType = "transport"
  94. Exit_Code = 0
  95. BillboardVisible = 0
  96. from = ""
  97. to = ""
  98. ExitCodeOk = 0
  99. ExitCodeCancel = 1
  100. ExitCodeFatal = 2
  101. KeyNull = ""
  102. MAXIMUM_ALLOWED = 33554432
  103. RegistryErrorIndex = NO_ERROR
  104. KeyProduct = ""
  105. KeyParameters = ""
  106. TRUE = 1
  107. FALSE = 0
  108. NoTitle = 0
  109. ExitState = "Active"
  110. OldVersionExisted = $(FALSE)
  111. DriverPath = $(!STF_NTPATH)\drivers
  112. ;--------------------------------------------------------------------
  113. ; 1. date
  114. ;
  115. ; This routine sets the variable "Now" to be:
  116. ;
  117. ; 1. Sec from 1-1-1970
  118. ; 2. Year
  119. ; 3. Month
  120. ; 4. Day
  121. ; 5. Hour
  122. ; 6. Minute
  123. ; 7. Second
  124. ;--------------------------------------------------------------------
  125. [date]
  126. Now = {} ? $(!LIBHANDLE) GetSystemDate
  127. ;--------------------------------------------------------------------
  128. ; Identify
  129. ; --------
  130. ;
  131. ; This is called to verify that this INF is used to install
  132. ; the kind of program that the setup program wants.
  133. ; (net transport, driver, ....).
  134. ;
  135. ; INPUT: None
  136. ;
  137. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL
  138. ; $($R1): Option Type
  139. ; $($R2): Diskette Descriptor
  140. ;--------------------------------------------------------------------
  141. [Identify]
  142. read-syms Identification
  143. set Status = STATUS_SUCCESSFUL
  144. set Identifier = $(OptionType)
  145. set Media = #("Source Media Descriptions", 1, 1)
  146. Return $(Status) $(Identifier) $(Media)
  147. ;--------------------------------------------------------------------
  148. ; ReturnOptions
  149. ; -------------
  150. ;
  151. ; This is called to return the option list supported by this
  152. ; INF and the localized text list representing the options.
  153. ; This is called from the setup program.
  154. ;
  155. ; INPUT: $($0): Language used (ENG, FRN, ...)
  156. ;
  157. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL
  158. ; STATUS_NOLANGUAGE
  159. ; STATUS_FAILED
  160. ; $($R1): Option List
  161. ; $($R2): Option Text List
  162. ;--------------------------------------------------------------------
  163. [ReturnOptions]
  164. set Status = STATUS_FAILED
  165. set OptionList = {}
  166. set OptionTextList = {}
  167. ;
  168. ;----- Make sure the language passed is in our list
  169. ;
  170. set LanguageList = ^(LanguagesSupported, 1)
  171. Ifcontains(i) $($0) in $(LanguageList)
  172. goto returnoptions
  173. else
  174. set Status = STATUS_NOLANGUAGE
  175. goto finish_ReturnOptions
  176. endif
  177. ;
  178. ;----- Build the list of options and the text for the options
  179. ;
  180. returnoptions = +
  181. set OptionList = ^(Options, 1)
  182. set OptionTextList = ^(OptionsText$($0), 1)
  183. set Status = STATUS_SUCCESSFUL
  184. ;
  185. ;----- Return the status
  186. ;
  187. finish_ReturnOptions = +
  188. Return $(Status) $(OptionList) $(OptionTextList)
  189. ;--------------------------------------------------------------------
  190. ; InstallOption
  191. ; -------------
  192. ;
  193. ; This is called to install the product.
  194. ;
  195. ; INPUT: $($0): Language used (ENG, FRN, ...)
  196. ; $($1): Option ID to install
  197. ; $($2): Source Directory
  198. ; $($3): AddCopy (YES | NO)
  199. ; $($4): DoCopy (YES | NO)
  200. ; $($5): DoConfig (YES | NO)
  201. ;
  202. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL
  203. ; STATUS_NOLANGUAGE
  204. ; STATUS_USERCANCEL
  205. ; STATUS_FAILED
  206. ; $($R1): Option List
  207. ;--------------------------------------------------------------------
  208. [InstallOption]
  209. set Option = $($1)
  210. set SrcDir = $($2)
  211. set AddCopy = $($3)
  212. set DoCopy = $($4)
  213. set DoConfig = $($5)
  214. set InstallFromRas = $($6)
  215. ;
  216. ;----- Make sure the language is supported
  217. ;
  218. Debug-Output "OEMNXPIP.INF: At InstallOption "$(Option)
  219. set LanguageList = ^(LanguagesSupported, 1)
  220. Ifcontains(i) $($0) NOT-IN $(LanguageList)
  221. return STATUS_NOLANGUAGE
  222. endif
  223. ;
  224. ;-----
  225. ;
  226. Debug-Output "OEMNXPIP.INF: STF_CWDIR is: "$(!STF_CWDIR)
  227. Debug-Output "OEMNXPIP.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  228. ;
  229. ;----- Define all constants we need
  230. ;
  231. set-subst LF = "\n"
  232. read-syms GeneralConstants
  233. read-syms FileConstants
  234. read-syms DialogConstants$(!STF_LANGUAGE)
  235. read-syms FileConstants$(!STF_LANGUAGE)
  236. detect date
  237. set-title $(FunctionTitle)
  238. set to = Begin
  239. set from = Begin
  240. set CommonStatus = STATUS_SUCCESSFUL
  241. ;
  242. ;----- Take down the hourglass
  243. ;
  244. EndWait
  245. ;
  246. ;----- Set the label to jump to according to what the user
  247. ; wants done.
  248. ;
  249. Begin = +
  250. Ifstr(i) $(!NTN_InstallMode) == deinstall
  251. set StartLabel = removeadapter
  252. set OEM_ABANDON_OPTIONS = {}
  253. set OEM_ABANDON_SOFTWARE = {+
  254. $(ProductNWLNKSPXName),+
  255. $(ProductNWLNKNBName),+
  256. $(ProductNWLNKIPXName)}
  257. else-Ifstr(i) $(!NTN_InstallMode) == Update
  258. set StartLabel = UpgradeSoftware
  259. else-Ifstr(i) $(!NTN_InstallMode) == configure
  260. set StartLabel = configureadapter
  261. else-Ifstr(i) $(!NTN_InstallMode) == bind
  262. set StartLabel = bindingadapter
  263. else
  264. set StartLabel = installadapter
  265. set OEM_ABANDON_SOFTWARE = {}
  266. set OEM_ABANDON_OPTIONS = {}
  267. endif
  268. ;
  269. ;----- Jump to the label to execute the function needed
  270. ;
  271. set from = $(fatal)
  272. set to = $(fatal)
  273. goto $(StartLabel)
  274. ;---------------------------------------------------------------------
  275. ; This section handles the installation and setup of the driver
  276. ;---------------------------------------------------------------------
  277. installadapter = +
  278. Debug-Output "OEMNXPIP.INF: At installadapter"
  279. ;
  280. ;----- Open the key for the product
  281. ;
  282. Debug-Output "OEMNXPIP.INF: Opening key for the product"
  283. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  284. Debug-Output "OEMNXPIP.INF: Back from opening key for the product"
  285. ;
  286. ;----- If the key is already there, then tell the user that the
  287. ; product is already installed.
  288. ;
  289. Ifstr $(KeyProduct) != $(KeyNull)
  290. CloseRegKey $(KeyProduct)
  291. Shell $(UtilityInf), VerExistedDlg, $(Product$(Option)Title),+
  292. $(ProductVersion)
  293. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  294. Debug-Output "OEMNXPIP.INF: ShellCode error: cannot get an error string."
  295. goto ShellCodeError
  296. endif
  297. goto end
  298. endif
  299. ;
  300. ;----- Verify that Novell's stack is not installed.
  301. ;
  302. OpenRegKey $(!REG_H_LOCAL) "" $(CompetitorKeyName) $(!REG_KEY_READ) BadKey
  303. Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  304. Debug-Output "OEMNXPIP.INF: Service "$(CompetitorServiceName)" exists. CANNOT INSTALL!"
  305. GetRegValue $(BadKey) "DisplayName" DisplayList
  306. Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  307. Set CompetitorDisplayName = *($(DisplayList),4)
  308. Endif
  309. CloseRegKey $(BadKey)
  310. read-syms FatalError1$(!STF_LANGUAGE)
  311. Goto fatal
  312. Endif
  313. ;
  314. ;----- If we are to copy - then set it here
  315. ;
  316. Ifstr(i) $(!NTN_InstallMode) == "install"
  317. Ifstr(i) $(DoCopy) == "YES"
  318. Debug-Output "OEMNXPIP.INF: Calling DoAskSource 1"
  319. Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  320. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  321. Goto ShellCodeError
  322. Else-Ifstr(i) $($R0) == STATUS_FAILED
  323. Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  324. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  325. goto ShellCodeError
  326. endif
  327. set Error = $($R0)
  328. Goto fatal
  329. Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  330. Goto successful
  331. Endif
  332. Set SrcDir = $($R1)
  333. Endif
  334. install "Install-Option"
  335. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  336. Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  337. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  338. goto ShellCodeError
  339. endif
  340. set Error = $($R0)
  341. goto fatal
  342. endif
  343. endif
  344. ;
  345. ;----- Get the string to use and put up a box that we are installing
  346. ;
  347. Debug-Output "OEMNXPIP.INF: Put up box that we are installing"
  348. set OEM_ABANDON_ON = TRUE
  349. read-syms Billboard1$(!STF_LANGUAGE)
  350. Shell "subroutn.inf" PushBillboard NETSTATUSDLG $(Status)
  351. Set BillboardVisible = 1
  352. ;
  353. ;----- Set the options that we are going to install
  354. ;
  355. Set DoNWLNKIPX = FALSE
  356. Set DoNWLNKNB = FALSE
  357. Set DoNWLNKSPX = FALSE
  358. Ifstr(i) $(Option) == NWLNKIPX
  359. Set DoNWLNKIPX = TRUE
  360. Set DoNWLNKNB = TRUE
  361. Set DoNWLNKSPX = TRUE
  362. Else
  363. Debug-Output "OEMNXPIP.INF: Unrecognized option"
  364. Endif
  365. ;
  366. ;----- Put up the hourglass
  367. ;
  368. Debug-Output "OEMNXPIP.INF: Start the install"
  369. StartWait
  370. ;
  371. ;----- Option to install NWLNK Service Controller Daemon
  372. ;
  373. ifstr(i) $(DoNWLNKIPX) == TRUE
  374. Set ThisOption = NWLNKIPX
  375. Set OEM_ABANDON_SOFTWARE = >($(OEM_ABANDON_SOFTWARE), $(Product$(ThisOption)Name))
  376. Debug-Output "OEMNXPIP.INF: installing NWLNKIPX."
  377. Shell $(UtilityInf), AddSoftwareComponent,+
  378. $(Manufacturer),+
  379. $(Product$(ThisOption)Name),+
  380. $(Product$(ThisOption)Name),+
  381. $(Product$(ThisOption)DisplayName),+
  382. $(STF_CONTEXTINFNAME),+
  383. $(Product$(ThisOption)ImagePath),+
  384. $(Product$(ThisOption)SvcType),+
  385. "PNP_TDI",+
  386. {},"",+
  387. $(NWLNKIPXEventDLL)
  388. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  389. Debug-Output "OEMNXPIP.INF: ShellCode error, add software component"
  390. goto ShellCodeError
  391. endif
  392. set RegistryErrorIndex = $($R0)
  393. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  394. EndWait
  395. Debug-Output "OEMNXPIP.INF: Registry error: add software components"
  396. CloseRegKey $($R1)
  397. CloseRegKey $($R2)
  398. CloseRegKey $($R3)
  399. CloseRegKey $($R4)
  400. CloseRegKey $($R5)
  401. goto fatalregistry
  402. endif
  403. ;
  404. ;----- Set the return values to local vars
  405. ;
  406. Set NWLNKVersKeyHandle = $($R1)
  407. Set NWLNKRulesKeyHandle = $($R2)
  408. Set NWLNKSvcKeyHandle = $($R3)
  409. Set NWLNKParmKeyHandle = $($R4)
  410. Set NWLNKLinkageHandle = $($R5)
  411. ;
  412. ;----- Set the Version entry
  413. ;
  414. ; Save unattended flag
  415. set UnattendInstallMode = 0
  416. Ifstr(i) $(!STF_UNATTENDED) == "YES"
  417. set UnattendInstallMode = 1
  418. Debug-Output "IPX: UnattendInstallMode(1) = "$(UnattendInstallMode)
  419. endif
  420. Ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  421. set UnattendInstallMode = 1
  422. Debug-Output "IPX: UnattendInstallMode(2) = "$(UnattendInstallMode)
  423. endif
  424. set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  425. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  426. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  427. {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  428. {Description,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Description)},+
  429. {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(Product$(ThisOption)OpSupport)},+
  430. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Name)},+
  431. {Review,$(NoTitle),$(!REG_VT_DWORD),1},+
  432. {STF_GUI_UNATTENDED,$(NoTitle),$(!REG_VT_SZ),$(!STF_GUI_UNATTENDED)},+
  433. {Unattend,$(NoTitle),$(!REG_VT_SZ),$(UnattendInstallMode)},+
  434. {AUTONETIPXFRAMETYPE,$(NoTitle),$(!REG_VT_DWORD),$(!AUTONETIPXFRAMETYPE)},+
  435. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  436. Shell $(UtilityInf), AddValueList, $(NWLNKVersKeyHandle), $(NewValueList)
  437. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  438. Debug-Output "OEMNXPIP.INF: ShellCode error, add value list"
  439. goto ShellCodeError
  440. endif
  441. set RegistryErrorIndex = $($R0)
  442. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  443. EndWait
  444. Debug-Output "OEMNXPIP.INF: Registry error: add value list."
  445. CloseRegKey $(NWLNKVersKeyHandle)
  446. CloseRegKey $(NWLNKRulesKeyHandle)
  447. CloseRegKey $(NWLNKSvcKeyHandle)
  448. CloseRegKey $(NWLNKParmKeyHandle)
  449. CloseRegkey $(NWLNKLinkageHandle)
  450. goto fatalregistry
  451. Endif
  452. ;
  453. ;----- Set the NetRules entry
  454. ;
  455. set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  456. {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)},+
  457. {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)BindForm)},+
  458. {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRule$(ThisOption)Bindable)},+
  459. {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRule$(ThisOption)Class)},+
  460. {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)} }
  461. Shell $(UtilityInf), AddValueList, $(NWLNKRulesKeyHandle), $(NewValueList)
  462. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  463. Debug-Output "OEMNXPIP.INF: ShellCode error."
  464. goto ShellCodeError
  465. endif
  466. ;
  467. ;----- Close up some handles
  468. ;
  469. set RegistryErrorIndex = $($R0)
  470. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  471. CloseRegKey $(NWLNKVersKeyHandle)
  472. CloseRegKey $(NWLNKRulesKeyHandle)
  473. CloseRegKey $(NWLNKParmKeyHandle)
  474. CloseRegKey $(NWLNKLinkageHandle)
  475. CloseRegKey $(NWLNKSvcKeyHandle)
  476. EndWait
  477. Debug-Output "OEMNXPIP.INF: Registry error: add value list."
  478. goto fatalregistry
  479. endif
  480. ;
  481. ;----- Add the values to the Parameters key
  482. ;
  483. ifstr(i) $(!STF_PRODUCT) != "WINNT"
  484. set RipRoute = 1
  485. else
  486. set RipRoute = 0
  487. endif
  488. Shell $(UtilityInf) AddValueList, $(NWLNKParmKeyHandle),+
  489. {{"DedicatedRouter", $(NoTitle), $(!REG_VT_DWORD), 0} +
  490. {"InitDatagrams", $(NoTitle), $(!REG_VT_DWORD), 10} +
  491. {"MaxDatagrams", $(NoTitle), $(!REG_VT_DWORD), 50} +
  492. {"RipUsageTime", $(NoTitle), $(!REG_VT_DWORD), 15} +
  493. {"SourceRouteUsageTime", $(NoTitle), $(!REG_VT_DWORD), 15} +
  494. {"SocketUniqueness", $(NoTitle), $(!REG_VT_DWORD), 8} +
  495. {"SocketStart", $(NoTitle), $(!REG_VT_DWORD), 16384} +
  496. {"SocketEnd", $(NoTitle), $(!REG_VT_DWORD), 24575} +
  497. {"VirtualNetworkNumber",$(NoTitle), $(!REG_VT_DWORD), 0} +
  498. {"RipRoute", $(NoTitle), $(!REG_VT_DWORD), $(RipRoute)} +
  499. {"RipTimeout", $(NoTitle), $(!REG_VT_DWORD), 1} +
  500. {"EnableWANRouter", $(NoTitle), $(!REG_VT_DWORD), 0} +
  501. {"ReplaceConfigDialog", $(NoTitle), $(!REG_VT_DWORD), 0} +
  502. {"RipCount", $(NoTitle), $(!REG_VT_DWORD), 5}}
  503. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  504. Debug-Output "OEMNXPIP.INF: ShellCode error."
  505. goto ShellCodeError
  506. endif
  507. set RegistryErrorIndex = $($R0)
  508. ;
  509. ;----- Close up some of the handles
  510. ;
  511. CloseRegKey $(NWLNKVersKeyHandle)
  512. CloseRegKey $(NWLNKRulesKeyHandle)
  513. CloseRegKey $(NWLNKParmKeyHandle)
  514. ;
  515. ;----- If we got an error - get out
  516. ;
  517. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  518. CloseRegKey $(NWLNKLinkageHandle)
  519. CloseRegKey $(NWLNKSvcKeyHandle)
  520. EndWait
  521. Debug-Output "OEMNXPIP.INF: Registry error: add value list."
  522. goto fatalregistry
  523. endif
  524. ;
  525. ;--- Performance stuff
  526. ;
  527. CreateRegKey $(NWLNKSvcKeyHandle) {"Performance",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyPerformance
  528. ifstr(i) $(KeyPerformance) != ""
  529. Set NewValueList = {+
  530. {Close,$(NoTitle),$(!REG_VT_SZ),"CloseIPXPerformanceData"},+
  531. {Collect,$(NoTitle),$(!REG_VT_SZ),"CollectIPXPerformanceData"},+
  532. {Library,$(NoTitle),$(!REG_VT_SZ),"perfctrs.dll"},+
  533. {Open,$(NoTitle),$(!REG_VT_SZ),"OpenIPXPerformanceData"},+
  534. }
  535. Shell $(UtilityInf), AddValueList, $(KeyPerformance), $(NewValueList)
  536. CloseRegKey $(KeyPerformance)
  537. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  538. Debug-Output "OEMNXPIP.INF: ShellCode error."
  539. goto ShellCodeError
  540. endif
  541. endif
  542. ;
  543. ;----- Go create all the subkey stuff
  544. ;
  545. Shell "" CreateNWLNKConfiguration $(NWLNKSvcKeyHandle)
  546. ;
  547. ;----- Close up and check for error
  548. ;
  549. CloseRegKey $(NWLNKSvcKeyHandle)
  550. Set RegistryErrorIndex = $($R0)
  551. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  552. EndWait
  553. Debug-Output "OEMNXPIP.INF: Registry error: Create NWLNK configuration."
  554. goto fatalregistry
  555. endif
  556. ;
  557. ; Set Winsock info
  558. ;
  559. Shell $(UtilityInf), AddWinsockInfo, +
  560. $(Product$(ThisOption)Name), +
  561. $(Product$(ThisOption)WshDllPath), +
  562. 16,14
  563. Shell $(UtilityInf) AddMixRpcProtocol "Netbios" "nwlnkipx" "ncacn_nb_ipx" "rpclt1.dll" "rpclt1.dll"
  564. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\Browser\Parameters" $(MAXIMUM_ALLOWED) BrowserParamKey
  565. ifstr(i) $(BrowserParamKey) != ""
  566. SetRegValue $(BrowserParamKey) {DirectHostBinding,$(NoTitle),$(!REG_VT_MULTI_SZ),{"\Device\NwlnkIpx","\Device\NwlnkNb"}}
  567. CloseRegKey $(BrowserParamKey)
  568. Endif
  569. Endif
  570. Ifstr(i) $(DoNWLNKNB) == TRUE
  571. Set ThisOption = NWLNKNB
  572. Set OEM_ABANDON_SOFTWARE = >($(OEM_ABANDON_SOFTWARE), $(Product$(ThisOption)Name))
  573. Debug-Output "OEMNXPIP.INF: installing NWLNKNB..."
  574. Shell $(UtilityInf), AddSoftwareComponent,+
  575. $(Manufacturer),+
  576. $(Product$(ThisOption)Name),+
  577. $(Product$(ThisOption)Name),+
  578. $(Product$(ThisOption)DisplayName),+
  579. $(STF_CONTEXTINFNAME),+
  580. $(Product$(ThisOption)ImagePath),+
  581. $(Product$(ThisOption)SvcType),+
  582. "PNP_TDI",+
  583. {},+
  584. "",+
  585. $(NWLNKIPXEventDLL)
  586. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  587. Debug-Output "OEMNXPIP.INF: ShellCode error"
  588. goto ShellCodeError
  589. endif
  590. set RegistryErrorIndex = $($R0)
  591. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  592. EndWait
  593. Debug-Output "OEMNXPIP.INF: Registry error: add software components"
  594. CloseRegKey $($R1)
  595. CloseRegKey $($R2)
  596. CloseRegKey $($R3)
  597. CloseRegKey $($R4)
  598. CloseRegKey $($R5)
  599. goto fatalregistry
  600. endif
  601. Set NWLNKNBProductKey = $($R1)
  602. Set NWLNKNBNetRuleKey = $($R2)
  603. Set NWLNKNBServiceKey = $($R3)
  604. Set NWLNKNBParameterKey = $($R4)
  605. Set NWLNKNBLinkageKey = $($R5)
  606. ;
  607. ;----- Set the version info
  608. ;
  609. set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  610. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  611. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  612. {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  613. {Description,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Description)},+
  614. {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(Product$(ThisOption)OpSupport)},+
  615. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Name)},+
  616. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  617. Shell $(UtilityInf), AddValueList, $(NWLNKNBProductKey), $(NewValueList)
  618. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  619. Debug-Output "OEMNXPIP.INF: ShellCode error."
  620. goto ShellCodeError
  621. endif
  622. set RegistryErrorIndex = $($R0)
  623. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  624. EndWait
  625. Debug-Output "OEMNXPIP.INF: Registry error: add value list."
  626. CloseRegKey $(NWLNKNBProductKey)
  627. CloseRegKey $(NWLNKNBNetRuleKey)
  628. CloseRegKey $(NWLNKNBServiceKey)
  629. CloseRegKey $(NWLNKNBParameterKey)
  630. CloseRegKey $(NWLNKNBLinkageKey)
  631. goto fatalregistry
  632. endif
  633. ;
  634. ;----- Set the NetRules entry
  635. ;
  636. set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  637. {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)},+
  638. {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)BindForm)},+
  639. {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)} }
  640. Shell $(UtilityInf), AddValueList, $(NWLNKNBNetRuleKey), $(NewValueList)
  641. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  642. Debug-Output "OEMNXPIP.INF: ShellCode error."
  643. goto ShellCodeError
  644. endif
  645. set RegistryErrorIndex = $($R0)
  646. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  647. EndWait
  648. Debug-Output "OEMNXPIP.INF: Registry error: add value list."
  649. CloseRegKey $(NWLNKNBProductKey)
  650. CloseRegKey $(NWLNKNBNetRuleKey)
  651. CloseRegKey $(NWLNKNBServiceKey)
  652. CloseRegKey $(NWLNKNBParameterKey)
  653. CloseRegKey $(NWLNKNBLinkageKey)
  654. goto fatalregistry
  655. endif
  656. ;
  657. ;----- Set the NbProvider Stuff
  658. ;
  659. Set NewValueList = {{NbProvider,$(NoTitle),$(!REG_VT_SZ),"_ipx"},+
  660. {EndPoint,$(NoTitle),$(!REG_VT_DWORD),1}}
  661. Shell $(UtilityInf), AddValueList, $(NWLNKNBParameterKey), $(NewValueList)
  662. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  663. Debug-Output "OEMNXPIP.INF: ShellCode error."
  664. goto ShellCodeError
  665. Endif
  666. set RegistryErrorIndex = $($R0)
  667. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  668. EndWait
  669. CloseRegKey $(NWLNKNBProductKey)
  670. CloseRegKey $(NWLNKNBNetRuleKey)
  671. CloseRegKey $(NWLNKNBServiceKey)
  672. CloseRegKey $(NWLNKNBParameterKey)
  673. CloseRegKey $(NWLNKNBLinkageKey)
  674. Debug-Output "OEMNXPIP.INF: Registry error: add value list."
  675. goto fatalregistry
  676. endif
  677. ;
  678. ;----- Add the values to the Parameters key
  679. ;
  680. Shell $(UtilityInf) AddValueList, $(NWLNKNBParameterKey),+
  681. {{"KeepaliveTimeout", $(NoTitle), $(!REG_VT_DWORD), 60} +
  682. {"KeepaliveCount", $(NoTitle), $(!REG_VT_DWORD), 8} +
  683. {"ConnectionTimeout",$(NoTitle), $(!REG_VT_DWORD), 2} +
  684. {"ConnectionCount", $(NoTitle), $(!REG_VT_DWORD), 5} +
  685. {"BroadcastTimeout", $(NoTitle), $(!REG_VT_DWORD), 1} +
  686. {"BroadcastCount", $(NoTitle), $(!REG_VT_DWORD), 3} +
  687. {"Internet", $(NoTitle), $(!REG_VT_DWORD), 1}}
  688. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  689. Debug-Output "OEMNXPIP.INF: ShellCode error."
  690. goto ShellCodeError
  691. endif
  692. set RegistryErrorIndex = $($R0)
  693. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  694. EndWait
  695. CloseRegKey $(NWLNKNBProductKey)
  696. CloseRegKey $(NWLNKNBNetRuleKey)
  697. CloseRegKey $(NWLNKNBServiceKey)
  698. CloseRegKey $(NWLNKNBParameterKey)
  699. CloseRegKey $(NWLNKNBLinkageKey)
  700. Debug-Output "OEMNXPIP.INF: Registry error: add value list."
  701. goto fatalregistry
  702. endif
  703. ;
  704. ;--- Performance stuff
  705. ;
  706. CreateRegKey $(NWLNKNBServiceKey) {"Performance",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyPerformance
  707. ifstr(i) $(KeyPerformance) != ""
  708. Set NewValueList = {+
  709. {Close,$(NoTitle),$(!REG_VT_SZ),"CloseNWNBPerformanceData"},+
  710. {Collect,$(NoTitle),$(!REG_VT_SZ),"CollectNWNBPerformanceData"},+
  711. {Library,$(NoTitle),$(!REG_VT_SZ),"perfctrs.dll"},+
  712. {Open,$(NoTitle),$(!REG_VT_SZ),"OpenNWNBPerformanceData"},+
  713. }
  714. Shell $(UtilityInf), AddValueList, $(KeyPerformance), $(NewValueList)
  715. CloseRegKey $(KeyPerformance)
  716. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  717. Debug-Output "OEMNXPIP.INF: ShellCode error."
  718. goto ShellCodeError
  719. endif
  720. set RegistryErrorIndex = $($R0)
  721. endif
  722. ;
  723. ;----- Close rest of handles
  724. ;
  725. CloseRegKey $(NWLNKNBProductKey)
  726. CloseRegKey $(NWLNKNBNetRuleKey)
  727. CloseRegKey $(NWLNKNBServiceKey)
  728. CloseRegKey $(NWLNKNBParameterKey)
  729. CloseRegKey $(NWLNKNBLinkageKey)
  730. ;
  731. ;-----
  732. ;
  733. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  734. EndWait
  735. Debug-Output "OEMNXPIP.INF: Registry error: add value list."
  736. goto fatalregistry
  737. endif
  738. Endif
  739. Ifstr(i) $(DoNWLNKSPX) == TRUE
  740. Set ThisOption = NWLNKSPX
  741. Set OEM_ABANDON_SOFTWARE = >($(OEM_ABANDON_SOFTWARE), $(Product$(ThisOption)Name))
  742. Debug-Output "OEMNXPIP.INF: installing NWLNKSPX..."
  743. Shell $(UtilityInf), AddSoftwareComponent,+
  744. $(Manufacturer),+
  745. $(Product$(ThisOption)Name),+
  746. $(Product$(ThisOption)Name),+
  747. $(Product$(ThisOption)DisplayName),+
  748. $(STF_CONTEXTINFNAME),+
  749. $(Product$(ThisOption)ImagePath),+
  750. $(Product$(ThisOption)SvcType),+
  751. "",+
  752. {},"",+
  753. $(NWLNKIPXEventDLL)
  754. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  755. Debug-Output "OEMNXPIP.INF: ShellCode error"
  756. goto ShellCodeError
  757. endif
  758. set RegistryErrorIndex = $($R0)
  759. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  760. EndWait
  761. Debug-Output "OEMNXPIP.INF: Registry error: add software components"
  762. CloseRegKey $($R1)
  763. CloseRegKey $($R2)
  764. CloseRegKey $($R3)
  765. CloseRegKey $($R4)
  766. CloseRegKey $($R5)
  767. goto fatalregistry
  768. endif
  769. Set NWLNKSPXProductKey = $($R1)
  770. Set NWLNKSPXNetRuleKey = $($R2)
  771. Set NWLNKSPXServiceKey = $($R3)
  772. Set NWLNKSPXParameterKey = $($R4)
  773. Set NWLNKSPXLinkageKey = $($R5)
  774. ;
  775. ;----- Set the version info
  776. ;
  777. set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  778. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  779. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  780. {Hidden,$(NoTitle),$(!REG_VT_DWORD),1},+
  781. {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  782. {Description,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Description)},+
  783. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Name)},+
  784. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  785. Shell $(UtilityInf), AddValueList, $(NWLNKSPXProductKey), $(NewValueList)
  786. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  787. Debug-Output "OEMNXPIP.INF: ShellCode error."
  788. goto ShellCodeError
  789. endif
  790. set RegistryErrorIndex = $($R0)
  791. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  792. EndWait
  793. Debug-Output "OEMNXPIP.INF: Registry error: add value list."
  794. CloseRegKey $(NWLNKSPXProductKey)
  795. CloseRegKey $(NWLNKSPXNetRuleKey)
  796. CloseRegKey $(NWLNKSPXServiceKey)
  797. CloseRegKey $(NWLNKSPXParameterKey)
  798. CloseRegKey $(NWLNKSPXLinkageKey)
  799. goto fatalregistry
  800. endif
  801. ;
  802. ;----- Set the NetRules entry
  803. ;
  804. set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  805. {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)},+
  806. {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)BindForm)},+
  807. {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRule$(ThisOption)Bindable)},+
  808. {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRule$(ThisOption)Class)},+
  809. {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)} }
  810. Shell $(UtilityInf), AddValueList, $(NWLNKSPXNetRuleKey), $(NewValueList)
  811. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  812. Debug-Output "OEMNXPIP.INF: ShellCode error."
  813. goto ShellCodeError
  814. endif
  815. set RegistryErrorIndex = $($R0)
  816. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  817. EndWait
  818. Debug-Output "OEMNXPIP.INF: Registry error: add value list."
  819. CloseRegKey $(NWLNKSPXProductKey)
  820. CloseRegKey $(NWLNKSPXNetRuleKey)
  821. CloseRegKey $(NWLNKSPXServiceKey)
  822. CloseRegKey $(NWLNKSPXParameterKey)
  823. CloseRegKey $(NWLNKSPXLinkageKey)
  824. goto fatalregistry
  825. endif
  826. ;
  827. ;----- Add the values to the Parameters key
  828. ;
  829. Shell $(UtilityInf) AddValueList, $(NWLNKSPXParameterKey),+
  830. {{"ConnectionCount", $(NoTitle), $(!REG_VT_DWORD), 5} +
  831. {"ConnectionTimeout", $(NoTitle), $(!REG_VT_DWORD), 2} +
  832. {"InitPackets",$(NoTitle), $(!REG_VT_DWORD), 5} +
  833. {"MaxPackets", $(NoTitle), $(!REG_VT_DWORD), 48} +
  834. {"InitialRetransmissionTime", $(NoTitle), $(!REG_VT_DWORD), 500} +
  835. {"KeepAliveCount", $(NoTitle), $(!REG_VT_DWORD), 8} +
  836. {"WindowSize", $(NoTitle), $(!REG_VT_DWORD), 4} +
  837. {"SpxSocketRangeStart", $(NoTitle), $(!REG_VT_DWORD), 24576} +
  838. {"SpxSocketRangeEnd", $(NoTitle), $(!REG_VT_DWORD), 32767} +
  839. {"SpxSocketUniqueness", $(NoTitle), $(!REG_VT_DWORD), 1} +
  840. {"MaxPacketSize", $(NoTitle), $(!REG_VT_DWORD), 4096} +
  841. {"RetransmissionCount", $(NoTitle), $(!REG_VT_DWORD), 8} +
  842. {"KeepAliveTimeout", $(NoTitle), $(!REG_VT_DWORD), 12}}
  843. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  844. Debug-Output "OEMNXPIP.INF: ShellCode error."
  845. goto ShellCodeError
  846. endif
  847. set RegistryErrorIndex = $($R0)
  848. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  849. EndWait
  850. CloseRegKey $(NWLNKSPXProductKey)
  851. CloseRegKey $(NWLNKSPXNetRuleKey)
  852. CloseRegKey $(NWLNKSPXServiceKey)
  853. CloseRegKey $(NWLNKSPXParameterKey)
  854. CloseRegKey $(NWLNKSPXLinkageKey)
  855. Debug-Output "OEMNXPIP.INF: Registry error: add value list."
  856. goto fatalregistry
  857. endif
  858. ;
  859. ;--- Performance stuff
  860. ;
  861. CreateRegKey $(NWLNKSPXServiceKey) {"Performance",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyPerformance
  862. ifstr(i) $(KeyPerformance) != ""
  863. Set NewValueList = {+
  864. {Close,$(NoTitle),$(!REG_VT_SZ),"CloseSPXPerformanceData"},+
  865. {Collect,$(NoTitle),$(!REG_VT_SZ),"CollectSPXPerformanceData"},+
  866. {Library,$(NoTitle),$(!REG_VT_SZ),"perfctrs.dll"},+
  867. {Open,$(NoTitle),$(!REG_VT_SZ),"OpenSPXPerformanceData"},+
  868. }
  869. Shell $(UtilityInf), AddValueList, $(KeyPerformance), $(NewValueList)
  870. CloseRegKey $(KeyPerformance)
  871. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  872. Debug-Output "OEMNXPIP.INF: ShellCode error."
  873. goto ShellCodeError
  874. endif
  875. set RegistryErrorIndex = $($R0)
  876. endif
  877. ;
  878. ;----- Close rest of handles
  879. ;
  880. CloseRegKey $(NWLNKSPXProductKey)
  881. CloseRegKey $(NWLNKSPXNetRuleKey)
  882. CloseRegKey $(NWLNKSPXServiceKey)
  883. CloseRegKey $(NWLNKSPXParameterKey)
  884. CloseRegKey $(NWLNKSPXLinkageKey)
  885. ;
  886. ;-----
  887. ;
  888. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  889. EndWait
  890. Debug-Output "OEMNXPIP.INF: Registry error: add value list."
  891. goto fatalregistry
  892. endif
  893. ;
  894. ; Set Winsock info
  895. ;
  896. Shell $(UtilityInf), AddWinsockInfo, +
  897. $(Product$(ThisOption)Name), +
  898. $(ProductNWLNKIPXWshDllPath), +
  899. 16,14
  900. ;
  901. ; Add Name Space Provider
  902. ;
  903. Shell $(UtilityInf), AddNameSpaceProvider, +
  904. $(ProductNWLNKIPXDisplayName), +
  905. $(ProviderImagePath), +
  906. $(ProviderNameSpaces), +
  907. TRUE, +
  908. $(ProviderGUID)
  909. ;
  910. ; Add Service Provider
  911. ;
  912. Shell $(UtilityInf), AddServiceProvider, $(ProductNWLNKIPXName), +
  913. $(ProviderImagePath), $(ProductNWLNKIPXDisplayName), 8
  914. ;
  915. ; Add Rpc Protocol
  916. ;
  917. Shell $(UtilityInf) AddClientRpcProtocol "ncadg_ipx" "rpclt1.dll"
  918. Shell $(UtilityInf) AddClientRpcProtocol "ncacn_spx" "rpclt1.dll"
  919. Shell $(UtilityInf) AddServerRpcProtocol "ncadg_ipx" "rpclt1.dll"
  920. Shell $(UtilityInf) AddServerRpcProtocol "ncacn_spx" "rpclt1.dll"
  921. Endif
  922. ;
  923. ;----- Take down the hourglass
  924. ;
  925. ;
  926. ; Display rebind ras message
  927. ;
  928. ifstr(i) $(!STF_GUI_UNATTENDED) != YES
  929. ifstr(i) $(InstallFromRas) != "YES"
  930. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\RASMan" $(MAXIMUM_ALLOWED) RASKey
  931. ifstr(i) $(RASKey) != ""
  932. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(RASRebindError)
  933. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  934. goto ShellCodeError
  935. endif
  936. CloseRegKey $(RASKey)
  937. ifstr(i) $($R1) == "OK"
  938. set SaveNTN_InstallMode = $(!NTN_InstallMode)
  939. set !NTN_InstallMode = configure
  940. ; now invoke RAS setup to do the right thing
  941. Shell "oemnsvra.inf" InstallOption $(!STF_LANGUAGE) "RAS" $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig)
  942. set !NTN_InstallMode = $(SaveNTN_InstallMode)
  943. endif
  944. endif
  945. endif
  946. endif
  947. ;
  948. ; Set proper security on the nwlnkspx service so that normal users can
  949. ; start the service. Ignore any error; it's not fatal.
  950. ;
  951. LibraryProcedure DontCare $(!NCPA_HANDLE), CPlSetup $(!STF_HWND),+
  952. SECURESVC, $(ProductNWLNKSPXName), 3
  953. EndWait
  954. ;
  955. ;----- If the billboard is up - take it down
  956. ;
  957. Ifint $(BillboardVisible) != 0
  958. Shell "subroutn.inf" PopBillboard
  959. Set BillboardVisible = 0
  960. Endif
  961. ;
  962. ;----- Exit OK
  963. ;
  964. goto successful
  965. ;---------------------------------------------------------------------
  966. ; This section handles the configuration of the driver
  967. ;---------------------------------------------------------------------
  968. configureadapter = +
  969. Debug-Output "OEMNXPIP.INF: At ConfigureAdapter"
  970. ifstr(i) $(Option) == "NWLNKIPX"
  971. ;
  972. ; Read the active bindings into a single list
  973. ;
  974. Set BindList = {}
  975. OpenRegKey $(!REG_H_LOCAL) "" $(LinkageKeyName) $(MAXIMUM_ALLOWED) LinkageKey
  976. ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  977. GetRegValue $(LinkageKey) "Bind" BindList
  978. ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  979. set BindList = *($(BindList),4)
  980. else
  981. Set BindList = {}
  982. endif
  983. CloseRegKey $(LinkageKey)
  984. endif
  985. ; Check that we're bound to something
  986. ifstr(i) $(BindList) == {}
  987. debug-output "NWLNK.INF: no binding info; warning user"
  988. read-syms InfoDlgCantConfigure
  989. goto infomsg
  990. endif
  991. ; Extract and validate the card names from the binding strings.
  992. Debug-Output "OEMNXPIP.INF: configureadapter, BindList = "$(BindList)
  993. set OldVersionExisted = $(TRUE)
  994. set CardList = ""
  995. ForListDo $(BindList)
  996. ; Adapter name is the last element in binding string;
  997. ; extract it.
  998. Split-String $($), "\", BindInfo
  999. QueryListSize BindElem $(BindInfo)
  1000. Set BindName = *($(BindInfo),$(BindElem))
  1001. ; Validate it; append to string if OK
  1002. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(BindName) $(MAXIMUM_ALLOWED) CardServiceKey
  1003. ifstr(i) $(CardServiceKey) != ""
  1004. CloseRegKey $(CardServiceKey)
  1005. Set CardList = $(CardList)"@"$(BindName)
  1006. endif
  1007. EndForListDo
  1008. ifstr(i) $(CardList) != ""
  1009. Debug-Output "OEMNXPIP.INF: configureadapter, CardList = "$(CardList)
  1010. LoadLibrary "x", $(!STF_WINDOWSSYSPATH)\ipxcfg.dll NWLNKLIB_HANDLE
  1011. set FLibraryErrCtl = 1
  1012. ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  1013. LibraryProcedure ResultList, $(NWLNKLIB_HANDLE), RunIpxDlg, $(!STF_HWND) $(!STF_PRODUCT) "YES" $(!AUTONETIPXFRAMETYPE)
  1014. else
  1015. LibraryProcedure ResultList, $(NWLNKLIB_HANDLE), RunIpxDlg, $(!STF_HWND) $(!STF_PRODUCT)
  1016. endif
  1017. FreeLibrary $(NWLNKLIB_HANDLE)
  1018. set FLibraryErrCtl = 0
  1019. ; Result list is of the form {<0|1>,"name of active adapter"}
  1020. Debug-Output "OEMNXPIP.INF: configureadapter, ResultList = "$(ResultList)
  1021. Set Result = *($(ResultList),1)
  1022. Ifint $(Result) == 0
  1023. set CommonStatus = STATUS_USERCANCEL
  1024. Else
  1025. set CommonStatus = STATUS_REBOOT
  1026. Endif
  1027. else
  1028. set CommonStatus = STATUS_USERCANCEL
  1029. endif
  1030. else
  1031. Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  1032. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1033. Debug-Output "OEMNXPIP.INF: ShellCode error: cannot get an error string."
  1034. goto ShellCodeError
  1035. endif
  1036. set Error = $($R0)
  1037. set from = end
  1038. set to = end
  1039. set CommonStatus = STATUS_USERCANCEL
  1040. goto nonfatal
  1041. endif
  1042. goto end
  1043. ;---------------------------------------------------------------------
  1044. ; This section handles the configuration of the driver
  1045. ;---------------------------------------------------------------------
  1046. bindingadapter =+
  1047. ;
  1048. ; Reset or reload the unattend info
  1049. ;
  1050. set l_unattended = 0
  1051. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  1052. ifstr(i) $(KeyProduct) != ""
  1053. GetRegValue $(KeyProduct) "STF_GUI_UNATTENDED" UnattendedList
  1054. Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  1055. set !STF_GUI_UNATTENDED = *($(UnattendedList),4)
  1056. DeleteRegValue $(KeyProduct) "STF_GUI_UNATTENDED"
  1057. endif
  1058. GetRegValue $(KeyProduct) "AUTONETIPXFRAMETYPE" FrameTypeList
  1059. Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  1060. set !AUTONETIPXFRAMETYPE = *($(FrameTypeList),4)
  1061. DeleteRegValue $(KeyProduct) "AUTONETIPXFRAMETYPE"
  1062. endif
  1063. ; Get unattend state
  1064. GetRegValue $(KeyProduct) "Unattend" KeyUnattend
  1065. Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  1066. set l_unattended = *($(KeyUnattend),4)
  1067. DeleteRegValue $(KeyProduct) "Unattend"
  1068. endif
  1069. CloseRegKey $(KeyProduct)
  1070. endif
  1071. ;
  1072. ; remove extra export string
  1073. ;
  1074. OpenRegKey $(!REG_H_LOCAL) "" $(LinkageKeyName) $(MAXIMUM_ALLOWED) KeyLinkage
  1075. ifstr(i) $(KeyLinkage) != ""
  1076. SetRegValue $(KeyLinkage) {Export,$(NoTitle),$(!REG_VT_MULTI_SZ),{"\Device\NwlnkIpx"}}
  1077. CloseRegKey $(KeyLinkage)
  1078. endif
  1079. Shell "nbinfo.inf" CheckMixRpcProtocol "NwlnkNb" 7 "nwlnkipx" "ncacn_nb_ipx" "rpclt1.dll" "rpclt1.dll"
  1080. LoadLibrary "x", $(!STF_WINDOWSSYSPATH)\ipxcfg.dll NWLNKLIB_HANDLE
  1081. set FLibraryErrCtl = 1
  1082. LibraryProcedure ResultList, $(NWLNKLIB_HANDLE), IPXCfgChk $(l_unattended)
  1083. FreeLibrary $(NWLNKLIB_HANDLE)
  1084. set FLibraryErrCtl = 0
  1085. Set Result = *($(ResultList),1)
  1086. ifint $(Result) == 0
  1087. Debug-Output "OEMNXPIP.INF: reconfiguration not required"
  1088. set CommonStatus = STATUS_USERCANCEL
  1089. goto successful
  1090. else
  1091. Debug-Output "OEMNXPIP.INF: reconfiguration required"
  1092. endif
  1093. goto configureadapter
  1094. ;---------------------------------------------------------------------
  1095. ; This section handles the removal of the driver
  1096. ;---------------------------------------------------------------------
  1097. removeadapter = +
  1098. Shell $(UtilityInf), IsRefCountEqualZero $(ProductKeyName)
  1099. ifint $($R1) == 0
  1100. read-syms InUse$(!STF_LANGUAGE)
  1101. goto infomsg
  1102. endif
  1103. Debug-Output "OEMNXPIP.INF: At removeadapter"
  1104. ;
  1105. ; Remove Winsock information
  1106. ;
  1107. Shell $(UtilityInf), RemoveWinsockInfo, $(ProductNWLNKIPXName)
  1108. Shell $(UtilityInf), RemoveWinsockInfo, $(ProductNWLNKSPXName)
  1109. Shell $(UtilityInf) RemoveRpcProtocol "ncacn_nb_ipx"
  1110. Shell $(UtilityInf) RemoveClientRpcProtocol "ncadg_ipx"
  1111. Shell $(UtilityInf) RemoveClientRpcProtocol "ncacn_spx"
  1112. Shell $(UtilityInf) RemoveServerRpcProtocol "ncadg_ipx"
  1113. Shell $(UtilityInf) RemoveServerRpcProtocol "ncacn_spx"
  1114. ForListDo $(OEM_ABANDON_SOFTWARE)
  1115. DEBUG-OUTPUT "Remove component: "$($)
  1116. Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), $($)
  1117. EndForListDo
  1118. ForListDo $(OEM_ABANDON_OPTIONS)
  1119. DEBUG-OUTPUT "Remove component: "$($)
  1120. Set UseSvcctrl = "YES"
  1121. Shell $(UtilityInf), RemoveService, $($), $(UseSvcctrl)
  1122. EndForListDo
  1123. Shell $(UtilityInf) RemoveServiceProvider $(ProductNWLNKIPXName)
  1124. ;
  1125. ; Remove Name Space Provider
  1126. ;
  1127. Shell $(UtilityInf), RemoveNameSpaceProvider, $(ProviderGUID)
  1128. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\Browser\Parameters" $(MAXIMUM_ALLOWED) BrowserParamKey
  1129. ifstr(i) $(BrowserParamKey) != ""
  1130. DeleteRegValue $(BrowserParamKey) "DirectHostBinding"
  1131. CloseRegKey $(BrowserParamKey)
  1132. Endif
  1133. ;
  1134. ;-----
  1135. ;
  1136. goto end
  1137. ;---------------------------------------------------------------------
  1138. ; This section handles the upgrade of the service
  1139. ;---------------------------------------------------------------------
  1140. UpgradeSoftware = +
  1141. ; Upgrade software component
  1142. ;
  1143. ; This inf is messed up, it has one option but creates
  1144. ; more than one entry in the software area of the registry.
  1145. ; Messes up upgrade. Since, the option NWLNKIPX does all
  1146. ; the work, we will ignore the rest
  1147. Ifstr(i) $(Option) != NWLNKIPX
  1148. set CommonStatus = STATUS_NO_EFFECT
  1149. goto end
  1150. endif
  1151. OpenRegKey $(!REG_H_LOCAL) "" $(OldProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  1152. Ifstr $(KeyProduct) != $(KeyNull)
  1153. install "Install-Update"
  1154. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  1155. goto fatal
  1156. endif
  1157. ;
  1158. ; Get reference count
  1159. ;
  1160. GetRegValue $(KeyProduct),"RefCount", RefCountInfo
  1161. CloseRegKey $(KeyProduct)
  1162. ;
  1163. ; Remove old nwlnk
  1164. ;
  1165. set OEM_ABANDON_OPTIONS = {+
  1166. "NWLINKSYS",+
  1167. "NWLINKSPX",+
  1168. "NWNBLINKSYS"}
  1169. set OEM_ABANDON_SOFTWARE = {+
  1170. "NWNBLINK",+
  1171. "NWLINKIPX",+
  1172. Streams}
  1173. Debug-Output "OEMNXPIP.INF: At RemoveWinsockInfo"
  1174. ;
  1175. ; Remove Winsock information
  1176. ;
  1177. Shell $(UtilityInf), RemoveWinsockInfo, "NWLINKIPX"
  1178. ;
  1179. ; Remove IPX NB info
  1180. ;
  1181. Shell $(UtilityInf) RemoveRpcProtocol "ncacn_nb_ipx"
  1182. Ifstr(i) $($0) != NO_ERROR
  1183. Debug-Output "OEMNXPIP.INF: ERROR deleting IPX RPC protocol data"
  1184. Endif
  1185. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_SoftwareBase)"\Microsoft\NWCWorkstation" $(MAXIMUM_ALLOWED) NwcKey
  1186. ifstr(i) $(NwcKey) == ""
  1187. ;
  1188. ; Remove IPX RPC info
  1189. ;
  1190. Shell $(UtilityInf) RemoveServerRpcProtocol "ncadg_ipx"
  1191. Ifstr(i) $($0) != NO_ERROR
  1192. Debug-Output "OEMNXPIP.INF: ERROR deleting IPX RPC protocol data"
  1193. Endif
  1194. ;
  1195. ; Remove SPX RPC info
  1196. ;
  1197. Shell $(UtilityInf) RemoveServerRpcProtocol "ncacn_spx"
  1198. Ifstr(i) $($0) != NO_ERROR
  1199. Debug-Output "OEMNXPIP.INF: ERROR deleting SPX RPC protocol data"
  1200. Endif
  1201. else
  1202. CloseRegKey $(NwcKey)
  1203. endif
  1204. ForListDo $(OEM_ABANDON_SOFTWARE)
  1205. DEBUG-OUTPUT "Remove component: "$($)
  1206. ifstr(i) $($) == "Streams"
  1207. Shell $(UtilityInf), RemoveStreams
  1208. else
  1209. Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), $($), FALSE
  1210. endif
  1211. EndForListDo
  1212. ForListDo $(OEM_ABANDON_OPTIONS)
  1213. DEBUG-OUTPUT "Remove component: "$($)
  1214. ifstr(i) $($) != "NWLINKSPX"
  1215. Set UseSvcctrl = "YES"
  1216. else
  1217. Set UseSvcctrl = "NO"
  1218. endif
  1219. Shell $(UtilityInf), RemoveService, $($), $(UseSvcctrl)
  1220. EndForListDo
  1221. ;
  1222. ; Install new nwlnk driver
  1223. ;
  1224. set OldInstallMode = $(!NTN_InstallMode)
  1225. set !NTN_InstallMode = install
  1226. Shell "" "InstallOption" $(!STF_LANGUAGE) "NWLNKIPX" +
  1227. $(!STF_SRCDIR) "NO" "NO" $(DoConfig)
  1228. set !NTN_InstallMode = $(OldInstallMode)
  1229. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  1230. ifstr(i) $(KeyProduct) != ""
  1231. SetRegValue $(KeyProduct), $(RefCountInfo)
  1232. CloseRegKey $(KeyProduct)
  1233. endif
  1234. else
  1235. ;
  1236. ; Cannot Open old software key, Just upgrade the file
  1237. ;
  1238. install "Install-Update"
  1239. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  1240. goto fatal
  1241. endif
  1242. CloseRegKey $(KeyProduct)
  1243. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NwlnkIpx\Parameters" $(MAXIMUM_ALLOWED) KeyParameters
  1244. ifstr(i) $(KeyParameters) != ""
  1245. GetRegValue $(KeyParameters), "ReplaceConfigDialog", ReplaceInfo
  1246. Debug-Output "GetRegValue returned "$(RegLastError)
  1247. ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  1248. SetRegValue $(KeyParameters) {ReplaceConfigDialog,$(NoTitle),$(!REG_VT_DWORD),0}
  1249. endif
  1250. CloseRegKey $(KeyParameters)
  1251. endif
  1252. ;
  1253. ; Add SPX bind rule
  1254. ;
  1255. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_SoftwareBase)"\"$(Manufacturer)"\NwlnkSpx\CurrentVersion\NetRules" $(MAXIMUM_ALLOWED) KeyNetRules
  1256. ifstr(i) $(KeyNetRules) != ""
  1257. set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleNWLNKSPXType)},+
  1258. {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleNWLNKSPXBindable)},+
  1259. {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleNWLNKSPXClass)},+
  1260. {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleNWLNKSPXUse)},+
  1261. {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleNWLNKSPXBindForm)}}
  1262. Shell $(UtilityInf), AddValueList, $(KeyNetRules), $(NewValueList)
  1263. CloseRegKey $(KeyNetRules)
  1264. endif
  1265. ;
  1266. ; Add Name Space Provider
  1267. ;
  1268. Shell $(UtilityInf), AddNameSpaceProvider, +
  1269. $(ProductNWLNKIPXDisplayName), +
  1270. $(ProviderImagePath), +
  1271. $(ProviderNameSpaces), +
  1272. TRUE, +
  1273. $(ProviderGUID)
  1274. ;
  1275. ; Add Service Provider
  1276. ;
  1277. Shell $(UtilityInf), AddServiceProvider, $(ProductNWLNKIPXName), +
  1278. $(ProviderImagePath), 8
  1279. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_SoftwareBase)"\Microsoft\NWCWorkstation" $(MAXIMUM_ALLOWED) NwcKey
  1280. ifstr(i) $(NwcKey) == ""
  1281. Shell $(UtilityInf) RemoveServerRpcProtocol "ncadg_ipx"
  1282. Shell $(UtilityInf) RemoveServerRpcProtocol "ncacn_spx"
  1283. else
  1284. CloseRegKey $(NwcKey)
  1285. endif
  1286. Shell $(UtilityInf) AddClientRpcProtocol "ncadg_ipx" "rpclt1.dll"
  1287. Shell $(UtilityInf) AddClientRpcProtocol "ncacn_spx" "rpclt1.dll"
  1288. endif
  1289. ;
  1290. ; Set proper security on the nwlnkspx service so that normal users can
  1291. ; start the service. Ignore any error; it's not fatal.
  1292. ;
  1293. LibraryProcedure DontCare $(!NCPA_HANDLE), CPlSetup $(!STF_HWND),+
  1294. SECURESVC, $(ProductNWLNKSPXName), 3
  1295. Set MappingOption = NWLNKIPX
  1296. Shell $(UtilityInf) UpdateWinsockMappings $(Product$(MappingOption)Name) $(ProductNWLNKIPXWshDllPath)
  1297. Set MappingOption = NWLNKSPX
  1298. Shell $(UtilityInf) UpdateWinsockMappings $(Product$(MappingOption)Name) $(ProductNWLNKIPXWshDllPath)
  1299. set RegistryErrorIndex = $($R0)
  1300. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1301. Debug-Output "OEMNXPIP.INF: Registry error: UpdateWinsockInfo."
  1302. Endif
  1303. ;
  1304. ; Cache away the unattend state for bindings
  1305. ;
  1306. set UnattendInstallMode = 0
  1307. Ifstr(i) $(!STF_UNATTENDED) == "YES"
  1308. set UnattendInstallMode = 1
  1309. Debug-Output "IPX: UnattendInstallMode(3) = "$(UnattendInstallMode)
  1310. endif
  1311. Ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  1312. set UnattendInstallMode = 1
  1313. Debug-Output "IPX: UnattendInstallMode(4) = "$(UnattendInstallMode)
  1314. endif
  1315. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) UnattendProduct
  1316. ifstr(i) $(UnattendProduct) != ""
  1317. ;
  1318. ; Set unattend state
  1319. ;
  1320. SetRegValue $(UnattendProduct) {Unattend,$(NoTitle),$(!REG_VT_DWORD),$(UnattendInstallMode)}
  1321. CloseRegKey $(UnattendProduct)
  1322. endif
  1323. ;
  1324. ; Update load order group membership
  1325. ;
  1326. OpenRegKey $(!REG_H_LOCAL) "" $(ServiceNWLNKKeyName) $(MAXIMUM_ALLOWED) NWLNKKeyService
  1327. Ifstr $(NWLNKKeyService) != $(KeyNull)
  1328. SetRegValue $(NWLNKKeyService) {Group,$(NoTitle),$(!REG_VT_SZ),"PNP_TDI"}
  1329. CloseRegKey $(NWLNKKeyService)
  1330. endif
  1331. OpenRegKey $(!REG_H_LOCAL) "" $(ServiceNWLNKNBKeyName) $(MAXIMUM_ALLOWED) NWLNKNBKeyService
  1332. Ifstr $(NWLNKNBKeyService) != $(KeyNull)
  1333. SetRegValue $(NWLNKNBKeyService) {Group,$(NoTitle),$(!REG_VT_SZ),"PNP_TDI"}
  1334. CloseRegKey $(NWLNKNBKeyService)
  1335. endif
  1336. ;
  1337. ; Update NetRules Keys for NwlnkIpx and NwlnkNb.
  1338. ;
  1339. OpenRegKey $(!REG_H_LOCAL) "" $(NWLNKIPXNetRuleKeyName) $(MAXIMUM_ALLOWED) NWLNKIPXKeyNetRules
  1340. Ifstr $(NWLNKIPXKeyNetRules) != $(KeyNull)
  1341. SetRegValue $(NWLNKIPXKeyNetRules) {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleNWLNKIPXUse)}
  1342. CloseRegKey $(NWLNKIPXKeyNetRules)
  1343. endif
  1344. OpenRegKey $(!REG_H_LOCAL) "" $(NWLNKNBNetRuleKeyName) $(MAXIMUM_ALLOWED) NWLNKNBKeyNetRules
  1345. Ifstr $(NWLNKNBKeyNetRules) != $(KeyNull)
  1346. SetRegValue $(NWLNKNBKeyNetRules) {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleNWLNKNBUse)}
  1347. CloseRegKey $(NWLNKNBKeyNetRules)
  1348. endif
  1349. ;
  1350. ; Update Current version Keys for NwlnkIpx and NwlnkNb.
  1351. ;
  1352. OpenRegKey $(!REG_H_LOCAL) "" $(NWLNKIPXKeyName) $(MAXIMUM_ALLOWED) NWLNKIPXKey
  1353. Ifstr $(NWLNKIPXKey) != $(KeyNull)
  1354. SetRegValue $(NWLNKIPXKey) {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductNWLNKIPXDescription)}
  1355. SetRegValue $(NWLNKIPXKey) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductNWLNKIPXOpSupport)}
  1356. CloseRegKey $(NWLNKIPXKey)
  1357. endif
  1358. OpenRegKey $(!REG_H_LOCAL) "" $(NWLNKNBKeyName) $(MAXIMUM_ALLOWED) NWLNKNBKey
  1359. Ifstr $(NWLNKNBKey) != $(KeyNull)
  1360. SetRegValue $(NWLNKNBKey) {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductNWLNKNBDescription)}
  1361. SetRegValue $(NWLNKNBKey) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductNWLNKNBOpSupport)}
  1362. CloseRegKey $(NWLNKNBKey)
  1363. endif
  1364. ; Add RPC server protocols.
  1365. Shell $(UtilityInf) AddServerRpcProtocol "ncadg_ipx" "rpclt1.dll"
  1366. Shell $(UtilityInf) AddServerRpcProtocol "ncacn_spx" "rpclt1.dll"
  1367. goto end
  1368. ;
  1369. ;----- Everything was OK
  1370. ;
  1371. successful = +
  1372. goto end
  1373. ;
  1374. ;-----
  1375. ;
  1376. infomsg =+
  1377. read-syms InfoDlg
  1378. ui start "Warning"
  1379. set CommonStatus = STATUS_USERCANCEL
  1380. goto end
  1381. ;
  1382. ;-----
  1383. ;
  1384. warning = +
  1385. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  1386. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1387. goto ShellCodeError
  1388. endif
  1389. ifstr(i) $($R1) == "OK"
  1390. goto $(to)
  1391. else-ifstr(i) $($R1) == "CANCEL"
  1392. goto $(from)
  1393. else
  1394. goto "end"
  1395. endif
  1396. ;
  1397. ;-----
  1398. ;
  1399. nonfatal = +
  1400. ifstr(i) $(Error) == ""
  1401. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1402. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1403. goto ShellCodeError
  1404. endif
  1405. set Error = $($R0)
  1406. endif
  1407. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(Error)
  1408. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1409. goto ShellCodeError
  1410. endif
  1411. ifstr(i) $($R1) == "OK"
  1412. goto $(from)
  1413. else
  1414. goto "end"
  1415. endif
  1416. ;
  1417. ;-----
  1418. ;
  1419. fatalregistry = +
  1420. Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  1421. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1422. goto ShellCodeError
  1423. endif
  1424. set Error = $($R0)
  1425. goto fatal
  1426. ;
  1427. ;-----
  1428. ;
  1429. fatal = +
  1430. ifstr(i) $(Error) == ""
  1431. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1432. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1433. goto ShellCodeError
  1434. endif
  1435. set Error = $($R0)
  1436. endif
  1437. Ifint $(BillboardVisible) != 0
  1438. Shell "subroutn.inf" PopBillboard
  1439. Set BillboardVisible = 0
  1440. Endif
  1441. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1442. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1443. goto ShellCodeError
  1444. endif
  1445. goto setfailed
  1446. ;
  1447. ;-----
  1448. ;
  1449. ShellCodeError = +
  1450. set DlgType = "MessageBox"
  1451. set STF_MB_TITLE = $(ShellCodeErrorTitle)
  1452. set STF_MB_TEXT = $(ShellCodeErrorText)
  1453. set STF_MB_TYPE = 1
  1454. set STF_MB_ICON = 3
  1455. set STF_MB_DEF = 1
  1456. ui start "Error Message"
  1457. goto setfailed
  1458. ;
  1459. ;-----
  1460. ;
  1461. setfailed = +
  1462. set CommonStatus = STATUS_FAILED
  1463. ifstr(i) $(OEM_ABANDON_ON) == TRUE
  1464. set OEM_ABANDON_ON = FALSE
  1465. goto removeadapter
  1466. endif
  1467. goto end
  1468. ;
  1469. ;-----
  1470. ;
  1471. end = +
  1472. goto term
  1473. ;
  1474. ;-----
  1475. ;
  1476. term = +
  1477. Return $(CommonStatus)
  1478. ;**********************************************************************
  1479. ; Create the configuration
  1480. ;**********************************************************************
  1481. [CreateNWLNKConfiguration]
  1482. read-syms GeneralConstants
  1483. Set NWLNKSvcKeyHandle = $($0)
  1484. Debug-Output "NWLNK.INF: installing NWLNK configuration:"
  1485. ;
  1486. ;----- Create the NetConfig Entry
  1487. ;
  1488. CreateRegKey $(NWLNKSvcKeyHandle) {"NetConfig",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyNetConfig
  1489. ;
  1490. ;----- Close the NetConfig key
  1491. ;
  1492. CloseRegKey $(KeyNetConfig)
  1493. ;
  1494. ;----- All Done
  1495. ;
  1496. CreateNWLNKConfigDone = +
  1497. Debug-Output "NWLNK.INF: installing NWLNK.....done."
  1498. Return NO_ERROR
  1499. ;********************************************************************
  1500. ;********************************************************************
  1501. [Install-Option]
  1502. set STF_VITAL = ""
  1503. ;
  1504. ;----- Add files to the copy list
  1505. ;
  1506. ifstr(i) $(AddCopy) == "YES"
  1507. Debug-Output "NWLNK.INF: Adding files to copy list"
  1508. AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1509. AddSectionFilesToCopyList Files-NWLNKEXE $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1510. endif
  1511. ;
  1512. ;----- Copy the files over
  1513. ;
  1514. ifstr(i) $(DoCopy) == "YES"
  1515. Debug-Output "NWLNK.INF: Copying Files"
  1516. set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1517. CopyFilesInCopyList
  1518. endif
  1519. ifstr(i) $(DoConfig) == "YES"
  1520. endif
  1521. Exit
  1522. ;********************************************************************
  1523. ;********************************************************************
  1524. [Install-Update]
  1525. set STF_VITAL = ""
  1526. set STF_OVERWRITE = "VERIFYSOURCEOLDER"
  1527. ;
  1528. ;-----
  1529. ;
  1530. AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1531. AddSectionFilesToCopyList Files-NWLNKEXE $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1532. ;
  1533. ;-----
  1534. ;
  1535. Exit
  1536. [RipDialog]
  1537. DlgType = "MessageBox"
  1538. STF_MB_TITLE = $(ProCaption)
  1539. STF_MB_TEXT = $(InstallRip)
  1540. STF_MB_TYPE = 3
  1541. STF_MB_ICON = 1
  1542. STF_MB_DEF = 1