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.

1186 lines
42 KiB

  1. ;-----------------------------------------------------------------------
  2. ;
  3. ; FILE: NetBond.Inf
  4. ;
  5. ; DESCRIPTION: This file contains inf sub-routines that are run by the
  6. ; the new NCPA and NetSetup Wizard. These routines Glue
  7. ; the current INF components/functions to the new code.
  8. ;
  9. ;
  10. ;-----------------------------------------------------------------------
  11. [NotifySyms]
  12. !PWM_SETPROGRESSTEXT = 2163 ; 1024 + 1139
  13. !PWM_SETPROGRESSPOS = 2162 ; 1024 + 1138
  14. !PWM_SETPROGRESSSIZE = 2161 ; 1024 + 1137
  15. !PWM_PROGRESSEND = 2160 ; 1024 + 1136
  16. !PGI_REMOVE = 0
  17. !PGI_INSTALL = 1
  18. !PGI_COPY = 2
  19. !PGI_UPDATE = 3
  20. ;-----------------------------------------------------------------------
  21. ;
  22. ; ROUTINE: SetStatusInReg
  23. ;
  24. ; DESCRIPTION: This routine saves the passed string into the registry
  25. ; as the return value from sections called from this inf.
  26. ;
  27. ; INPUTS: $0 - ClearReg - YES | NO; Set or Clear Registry
  28. ; $1 - ErrorMsg - The string to save in the registry
  29. ;
  30. ; OUTPUTS: none
  31. ;
  32. ; NOTES: In the Reg Key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Ncpa the value
  33. ; InfReturn is set to the passed string
  34. ;
  35. ;
  36. ;------------------------------------------------------------------------
  37. [SetStatusInReg]
  38. set ClearReg = $($0)
  39. set ErrorMsg = $($1)
  40. Set SetupKeyName = "SOFTWARE\Microsoft\NCPA"
  41. Set ErrorValueName = "InfReturn"
  42. Set MaskAllAccess = 33554432
  43. OpenRegKey $(!REG_H_LOCAL) "" $(SetupKeyName) $(MaskAllAccess) SetupKey
  44. Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  45. ifstr(i) ClearReg == YES
  46. DeleteRegValue $(SetupKey) $(ErrorValueName)
  47. else
  48. SetRegValue $(SetupKey) {$(ErrorValueName),0,$(!REG_VT_SZ),$(ErrorMsg)}
  49. endif
  50. CloseRegKey $(SetupKey)
  51. endif
  52. return
  53. ;-----------------------------------------------------------------------
  54. ;
  55. ; ROUTINE: IsNetCard
  56. ;
  57. ; DESCRIPTION: This routine determines whether the inf file name
  58. ; that is passed in is a net driver inf file (prefixed by oemnad.
  59. ;
  60. ;
  61. ; INPUTS: $0 - InfFileName
  62. ;
  63. ; OUTPUTS: YES if $0 is an oemnad*.inf, NO otherwise
  64. ;
  65. ; NOTES:
  66. ;
  67. ;------------------------------------------------------------------------
  68. [IsNetCard]
  69. set ThisInfName = $($0)
  70. set NetCard = "NO"
  71. Split-String $(ThisInfName) "\." SrcDirList
  72. QueryListSize ListSize $(SrcDirList)
  73. ifint $(ListSize) >= 3
  74. set-sub Position = $(ListSize), 2
  75. set InfName = *($(SrcDirList), $(Position))
  76. Split-String $(InfName) "dD" CharList
  77. QueryListSize ListSize $(CharList)
  78. ifint $(ListSize) >= 2
  79. ifstr(i) *($(CharList), 1) == "oemna"
  80. ifstr(i) *($(CharList), 2) == "d"
  81. set NetCard = "YES"
  82. endif
  83. endif
  84. endif
  85. endif
  86. return $(NetCard)
  87. ;-----------------------------------------------------------------------
  88. ;
  89. ; ROUTINE: PrepRegForNetOptions
  90. ;
  91. ; DESCRIPTION: This routine finds all net infs in the system32 dir
  92. ; and places them in the registry.
  93. ;
  94. ; INPUTS: !NTN_NETTYPE - {NetAdapter | NetTransport | NetService | NetProvider | Network }
  95. ;
  96. ;
  97. ; OUTPUTS: $R0: STATUS: STATUS_SUCCESSFUL |
  98. ; STATUS_FAILED
  99. ;
  100. ;
  101. ;------------------------------------------------------------------------
  102. [PrepRegForNetOptions]
  103. Debug-Output "Other.INF: Get options NTN_NETTYPE "$(!NTN_NETTYPE)
  104. ForListDo $(!NTN_NETTYPE)
  105. Debug-Output "Other.INF: Get options net type "$($)
  106. shell "Other.inf" ReturnOemOptions $(!STF_LANGUAGE) $($) TRUE
  107. ifstr(i) $($R0) == "STATUS_SUCCESSFUL"
  108. Debug-Output "NETBOND.INF: Other OEM options found for type "$($)
  109. endif
  110. EndForListDo
  111. set Status = STATUS_SUCCESSFUL
  112. Return $(Status)
  113. ;--------------------------------------------------------------------
  114. ;
  115. ; InstallAndCopyNetComponets
  116. ;
  117. ; Parameters
  118. ; !NTN_InfsToBeRun
  119. ; !NTN_OptionsToBeRun
  120. ; !NTN_TextToBeShown
  121. ; !NTN_NETOEMPATHS
  122. ;
  123. ; !NTN_NCDETINFOS - INF list containing detect info list
  124. ; Detected netcards have entries, all others are "{}"
  125. ; "{
  126. ; { OPTIONNAME,
  127. ; <card index>,
  128. ; <numeric card type>,
  129. ; <detection confidence level>,
  130. ; <bus interface type>,
  131. ; <bus number>
  132. ; }, ... }"
  133. ;
  134. ;--------------------------------------------------------------------
  135. [InstallAndCopyNetComponents]
  136. set UtilityInf = "Utility.inf"
  137. set NcParamInf = "NCPARAM.INF"
  138. set !STF_NETCANCELOVERIDE = "YES"
  139. set !STF_NETDELETEOVERIDE = "YES"
  140. set cDetectCount = 0
  141. Debug-Output "The Glue That Keeps Us Installing"
  142. Debug-Output "NetBond.INF: INFs to be run: "$(!NTN_InfsToBeRun)
  143. Debug-Output "NetBond.INF: Options to install: "$(!NTN_OptionsToBeRun)
  144. Debug-Output "NetBond.INF: Billboards to be shown: "$(!NTN_TextToBeShown)
  145. Debug-Output "NetBond.INF: OemPaths to use: "$(!NTN_NETOEMPATHS)
  146. Debug-Output "NetBond.INF: RegBases to pass: "$(!NTN_RegBases)
  147. Debug-Output "NetBond.INF: STF_NCDETINFOs to be used: "$(!NTN_NCDETINFOS)
  148. Debug-Output "NetBond.INF: NTN_NCDETECTED, items detected: "$(!NTN_NCDETECTED)
  149. Debug-Output "NetBond.INF: NTN_NETSECTIONS, items detected: "$(!NTN_NETSECTIONS)
  150. Debug-Output "NetBond.INF: Install Mode: "$(!NTN_STF_INSTALL_MODE)
  151. Debug-Output "NetBond.INF: NTN_UPGRADEMODE: "$(!NTN_UPGRADEMODE)
  152. Debug-Output "NetBond.INF: NTN_UPGRADEWARN: "$(!NTN_UPGRADEWARN)
  153. Debug-Output "NetBond.INF: STF_UNATTENDED: "$(!STF_UNATTENDED)
  154. Debug-Output "NetBond.INF: STF_GUI_UNATTENDED: "$(!STF_GUI_UNATTENDED)
  155. Debug-Output "NetBond.INF: Notify Hwnd: "$(!NTN_NOTIFY_HWND)
  156. ;
  157. ; make sure install mode is set
  158. ;
  159. ifstr(i) $(!NTN_STF_INSTALL_MODE) != ""
  160. set !STF_INSTALL_MODE = $(!NTN_STF_INSTALL_MODE)
  161. endif
  162. ;
  163. ; make sure reg base is set, used in upgrade only
  164. ;
  165. set !NTN_RegBase = ""
  166. Shell "" SetStatusInReg YES ""
  167. ;
  168. ; Should we ask for the source location?
  169. ;
  170. ifstr(i) $(!NTN_InstallPhase) != primary
  171. ;
  172. ; make sure during secondary install that we ask for the
  173. ; location of the files
  174. ;
  175. Set !STF_SRCDIR_OVERRIDE = ""
  176. reaskforsource = +
  177. Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(!STF_SRCDIR) YES
  178. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  179. Shell "" SetStatusInReg NO "SHELLASKSRCFAIL"
  180. set NetInstallStatus = $($R0)
  181. Goto netcopyescape
  182. Else-Ifstr(i) $($R0) == STATUS_FAILED
  183. Shell "" SetStatusInReg NO "ASKSRCFAIL"
  184. set NetInstallStatus = $($R0)
  185. Goto netcopyescape
  186. Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  187. Shell "" SetStatusInReg NO "USERCANCEL"
  188. set NetInstallStatus = $($R0)
  189. Goto netcopyescape
  190. Endif
  191. ;
  192. ; create modified version of the path specified by the user
  193. ; so that we can be smart about finding the files.
  194. ;
  195. Split-String $($R1), "\", lSrcDirParts
  196. QueryListSize cSrcDirParts $(lSrcDirParts)
  197. ; make sure srcpath has the \
  198. ;
  199. ifstr(i) *($(lSrcDirParts),$(cSrcDirParts)) != "\"
  200. Set SrcDir = $($R1)"\"
  201. else
  202. Set SrcDir = $($R1)
  203. Endif
  204. ; remove the platform from the given path
  205. ;
  206. ifint $(cSrcDirParts) >= 3
  207. debug-output "NETBOND.INF: checking to remove platform"
  208. ifstr(i) *($(lSrcDirParts),$(cSrcDirParts)) == "\"
  209. ; remove the extra \
  210. set-sub iStopParts = $(cSrcDirParts), 2
  211. else
  212. set-sub iStopParts = $(cSrcDirParts), 1
  213. endif
  214. debug-output "NETBOND.INF: parts were "$(cSrcDirParts)" and stops at "$(iStopParts)
  215. set SrcDirMin = ""
  216. set SkipAppend = FALSE
  217. ForListDo $(lSrcDirParts)
  218. ifint $(#) > $(iStopParts)
  219. ifstr(i) $($) == $(!STF_PLATFORM)
  220. set SkipAppend = TRUE
  221. debug-output "NETBOND.INF: skipping appended"$($)
  222. goto skip_appending_list_item
  223. else
  224. ifstr(i) $(SkipAppend) == TRUE
  225. debug-output "NETBOND.INF: skipping appended"$($)
  226. goto skip_appending_list_item
  227. endif
  228. endif
  229. endif
  230. set NewSrcDir = $(SrcDirMin)$($)
  231. set SrcDirMin = $(NewSrcDir)
  232. debug-output "NETBOND.INF: appended items "$(SrcDirMin)
  233. skip_appending_list_item = +
  234. EndForListDo
  235. else
  236. debug-output "NETBOND.INF: path to small to have platform"
  237. set SrcDirMin = *($(lSrcDirParts),1)"\"
  238. endif
  239. debug-output "NETBOND.INF: SrcDirMin : "$(SrcDirMin)
  240. debug-output "NETBOND.INF: SrcDir : "$(SrcDir)
  241. set NtTagFile = "Disk1"
  242. ;
  243. ; check the exact path the user entered
  244. ;
  245. set NtSrc = $(SrcDir)
  246. set Path1 = $(NtSrc)
  247. LibraryProcedure STATUS,$(!LIBHANDLE), CheckFileExistance $(NtSrc)$(NtTagFile)
  248. ifstr(i) $(STATUS) != "YES"
  249. ;
  250. ; check a minimum path we derived from the users entered path
  251. ;
  252. set NtSrc = $(SrcDirMin)
  253. set Path2 = $(NtSrc)
  254. LibraryProcedure STATUS,$(!LIBHANDLE), CheckFileExistance $(NtSrc)$(NtTagFile)
  255. ifstr(i) $(STATUS) != "YES"
  256. ;
  257. ; append the platform to the minimum path and check it
  258. ;
  259. set NtSrc = $(SrcDirMin)$(!STF_PLATFORM)"\"
  260. set Path3 = $(NtSrc)
  261. LibraryProcedure STATUS,$(!LIBHANDLE), CheckFileExistance $(NtSrc)$(NtTagFile)
  262. ifstr(i) $(STATUS) != "YES"
  263. ;
  264. ; no tag file was found, warn user and let them re-enter it
  265. ;
  266. read-syms ErrorMsg$(!STF_LANGUAGE)
  267. Shell "Subroutn.Inf" SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(CannotFindNtFiles)
  268. goto reaskforsource
  269. endif
  270. endif
  271. endif
  272. Set !STF_SRCDIR = $(NtSrc)
  273. endif
  274. ;
  275. ; ssync detect state, since we are running in seperate process
  276. ;
  277. ; Shell $(NcParamInf) Param_SetGlobals
  278. ; Shell $(NcParamInf) Param_ControlDetection DTSTART
  279. Set lInfStatus = {}
  280. Set fRunCopy = FALSE
  281. ; fake an update
  282. ifstr(i) $(!NTN_UPGRADEMODE) == "YES"
  283. Debug-Output "NETBOND.INF: We are in Upgrade now"
  284. set OldInstallMode = $(!NTN_InstallMode)
  285. set !NTN_InstallMode = "Update"
  286. endif
  287. ; no ui if we are are in notify mode
  288. read-syms MessageText$(!STF_LANGUAGE)
  289. ifstr(i) $(!NTN_NOTIFY_HWND) != ""
  290. read-syms NotifySyms
  291. ; set the install type
  292. ifstr(i) $(!NTN_InstallMode) == "Update"
  293. set NTN_PGI = $(!PGI_UPDATE)
  294. else
  295. set NTN_PGI = $(!PGI_INSTALL)
  296. endif
  297. QueryListSize cInfsToBeRun $(!NTN_InfsToBeRun)
  298. LibraryProcedure STATUS, $(!NCPA_HANDLE), SendProgressMessage, $(!PWM_SETPROGRESSSIZE), $(!NTN_NOTIFY_HWND), "D", $(NTN_PGI), "D", $(cInfsToBeRun)
  299. ; set to default text, displays the guage and text
  300. ;
  301. LibraryProcedure STATUS, $(!NCPA_HANDLE), SendProgressMessage, $(!PWM_SETPROGRESSTEXT), $(!NTN_NOTIFY_HWND), "D", $(NTN_PGI), "D", "-1"
  302. endif
  303. ;
  304. ; Loop on list and shell the specific infs...
  305. ;
  306. ForListDo $(!NTN_InfsToBeRun)
  307. Set ThisInfName = $($)
  308. Debug-Output "NETBOND.INF: Installing "$(ThisInfName)
  309. ifstr(i) $(!NTN_InstallMode) == "Update"
  310. set !NTN_RegBase = *($(!NTN_RegBases),$(#))
  311. Debug-Output "NETBOND.INF: NTN_RegBase is "$(!NTN_RegBase)
  312. ; If this not a Microsoft file, we ignore it.
  313. Shell $(ThisInfName) GetSignature
  314. ifstr(i) $($ShellCode) != $(!SHELL_CODE_OK)
  315. Debug-Output "NETBOND.INF: Does not have a GetSignature section "$(ThisInfName)
  316. ifstr(i) $(!STF_UNATTENDED) == "NO"
  317. ifstr(i) $(!NTN_UPGRADEWARN) == "YES"
  318. set ServiceTitle = *($(!NTN_TextToBeShown), $(#))
  319. Shell "" IsNetCard $(ThisInfName)
  320. ifstr(i) $($R0) == "YES"
  321. read-syms UpgradeNetCardWarnings
  322. else
  323. read-syms UpgradeWarnings
  324. endif
  325. read-syms WarningDlg
  326. ui start "Warning"
  327. endif
  328. endif
  329. goto skipthisinf
  330. endif
  331. ifstr(i) $($R0) != "MICROSOFT_FILE"
  332. Debug-Output "NETBOND.INF: This is not an MS Inf "$(ThisInfName)
  333. ifstr(i) $(!STF_UNATTENDED) == "NO"
  334. ifstr(i) $(!NTN_UPGRADEWARN) == "YES"
  335. set ServiceTitle = *($(!NTN_TextToBeShown), $(#))
  336. Shell "" IsNetCard $(ThisInfName)
  337. ifstr(i) $($R0) == "YES"
  338. read-syms UpgradeNetCardWarnings
  339. else
  340. read-syms UpgradeWarnings
  341. endif
  342. read-syms WarningDlg
  343. ui start "Warning"
  344. endif
  345. endif
  346. goto skipthisinf
  347. endif
  348. endif
  349. ; no ui if we are are in notify mode
  350. ifstr(i) $(!NTN_NOTIFY_HWND) == ""
  351. ifstr(i) $(!NTN_InstallMode) == "Update"
  352. Shell "subroutn.inf" PushBillboard NETSTATUSDLG $(MPreUpgrade1)*($(!NTN_TextToBeShown),$(#))$(MPreInstall2)
  353. else
  354. Shell "subroutn.inf" PushBillboard NETSTATUSDLG $(MPreInstall1)*($(!NTN_TextToBeShown),$(#))$(MPreInstall2)
  355. endif
  356. Set BillboardVisible = 1
  357. else
  358. LibraryProcedure STATUS, $(!NCPA_HANDLE), SendProgressMessage, $(!PWM_SETPROGRESSTEXT), $(!NTN_NOTIFY_HWND), "D", $(NTN_PGI), "A", *($(!NTN_TextToBeShown),$(#))
  359. endif
  360. Set InfOption = *($(!NTN_OptionsToBeRun),$(#))
  361. ;
  362. ; support netcard detection of params
  363. ; this info was saved during detection, so that these
  364. ; needed variables get set correctly
  365. ;
  366. Set !STF_NCDETINFO = *($(!NTN_NCDETINFOS),$(#))
  367. ifstr(i) $(!STF_NCDETINFO) != "{}"
  368. Set !STF_NCDETECT = "YES"
  369. Set !STF_NCDETCARD = *($(!STF_NCDETINFO),2)
  370. Set !STF_NCOPTION = *($(!STF_NCDETINFO),1)
  371. Debug-Output "NETBOND.INF: DetectInfo Available"
  372. ; only used to sync state so verify will work
  373. ;
  374. ;detectloop = +
  375. ; Shell $(NcParamInf) Param_DetectCard
  376. ; set-add cDetectCount = $(cDetectCount), 1
  377. ;
  378. ; ifint $(!STF_NCDETCARD) >= $(cDetectCount)
  379. ; goto detectloop
  380. ; endif
  381. else
  382. Debug-Output "NETBOND.INF: No DetectInfo Available"
  383. Set !STF_NCDETECT = "NO"
  384. Set !STF_NCDETCARD = 0
  385. Set !STF_NCOPTION = ""
  386. endif
  387. ;
  388. ; use the oem path if specified
  389. ;
  390. Set OemPath = *($(!NTN_NETOEMPATHS),$(#))
  391. ifstr(i) $(OemPath) == ""
  392. Set OemPath = $(!STF_SRCDIR)
  393. endif
  394. ;
  395. ; make sure all overides are turned off from inf to inf
  396. ;
  397. Set !STF_SRCDIR_OVERRIDE = ""
  398. ;
  399. ; use the unattended sections if specified
  400. ;
  401. Set !STF_UNATTENDED_SECTION = *($(!NTN_NETSECTIONS),$(#))
  402. Debug-Output "NETBOND.INF: Unattend Section for "$(ThisInfName)" is "$(!STF_UNATTENDED_SECTION)
  403. ;
  404. ; preload netcard parameters, actually this will load the netcard
  405. ; symbols even for non-card infs, but since these are only used
  406. ; from netcard infs, this is ok. (we currently don't define the
  407. ; inf types at this point)
  408. ;
  409. ; also note that GetDefault answer checks STF_GUI_UNATTENDED and only
  410. ; loads them if it is yes
  411. ;
  412. shell "subroutn.inf" GetDefaultAnswer "NetCardParameterList"
  413. ;
  414. ; do the inf
  415. ;
  416. ifstr(i) $(!NTN_InstallMode) != "Update"
  417. Shell $(ThisInfName) InstallOption $(!STF_LANGUAGE) $(InfOption) $(OemPath) "YES" "NO" "NO"
  418. else
  419. Shell $(ThisInfName) InstallOption $(!STF_LANGUAGE) $(InfOption) $(OemPath) "YES" "NO" "YES"
  420. endif
  421. ; Reset the title string
  422. ; no ui if we are are in notify mode
  423. ifstr(i) $(!NTN_NOTIFY_HWND) == ""
  424. Set BillboardVisible = 1
  425. ifstr(i) $(!NTN_InstallMode) == "Update"
  426. Set-title *($(!NTN_TextToBeShown),$(#))$(MPostUpgrade)
  427. else
  428. Set-title *($(!NTN_TextToBeShown),$(#))$(MPostInstall)
  429. endif
  430. else
  431. LibraryProcedure STATUS, $(!NCPA_HANDLE), SendProgressMessage, $(!PWM_SETPROGRESSPOS), $(!NTN_NOTIFY_HWND), "D", $(NTN_PGI), "D", $(#)
  432. endif
  433. Set NetInstallStatus = $($R0)
  434. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  435. Debug-Output "NETBOND.INF: INF "$(ThisInfName)" SHELL ERROR!"
  436. Set NetInstallStatus = $($ShellCode)
  437. Endif
  438. ;
  439. ; store the status for latter return
  440. ;
  441. set lInfStatus = >($(lInfStatus), $(NetInstallStatus) )
  442. ;
  443. ; run the copy on succesful install of at least one component
  444. ;
  445. Ifstr(i) $(NetInstallStatus) == STATUS_SUCCESSFUL
  446. Set fRunCopy = TRUE
  447. Endif
  448. Ifstr(i) $(NetInstallStatus) == STATUS_REBIND
  449. Set fRunCopy = TRUE
  450. Endif
  451. Ifstr(i) $(NetInstallStatus) == STATUS_NO_EFFECT
  452. Set fRunCopy = TRUE
  453. Endif
  454. Ifstr(i) $(NetInstallStatus) == STATUS_REBOOT
  455. Set fRunCopy = TRUE
  456. Endif
  457. skipthisinf = +
  458. EndForListDo
  459. ; clear the status text, removes the guage and text
  460. ;
  461. ;LibraryProcedure STATUS, $(!NCPA_HANDLE), SendProgressMessage, $(!PWM_SETPROGRESSTEXT), $(!NTN_NOTIFY_HWND), "D", $(NTN_PGI), "D", "0"
  462. ;
  463. ; Run the copy operation, but only if needed
  464. ;
  465. ; note that the STF_NCPA_FLUSH_COPYLIST was an atiquated way of the inf
  466. ; to notify ncpa that the copy list was flushed.
  467. ;
  468. ifstr(i) $(fRunCopy) == TRUE
  469. Install InstallNetFiles
  470. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  471. Shell "" SetStatusInReg NO "COPY:"$(STF_INSTALL_OUTCOME)":"$(lInfStatus)
  472. goto netcopyescape
  473. endif
  474. endif
  475. ;
  476. ; The products are set to be copied, and the Registry is up to date.
  477. ;
  478. netruninfescape = +
  479. Ifint $(BillboardVisible) != 0
  480. Shell "subroutn.inf" PopBillboard
  481. Set BillboardVisible = 0
  482. Endif
  483. ;
  484. ; return the status of each inf
  485. ;
  486. Shell "" SetStatusInReg NO "INSTALL:STATUS_SUCCESSFUL:"$(lInfStatus)
  487. netcopyescape = +
  488. ;
  489. ; error status is saved in registry
  490. ;
  491. ; set back old mode
  492. ifstr(i) $(!NTN_InstallMode) == "Update"
  493. set !NTN_InstallMode = $(OldInstallMode)
  494. endif
  495. return STATUS_SUCCESSFUL
  496. ;--------------------------------------------------------------------
  497. ;
  498. ; RemoveNetComponets
  499. ;
  500. ; Parameters
  501. ; !NTN_InfsToBeRun
  502. ; !NTN_OptionsToBeRun
  503. ; !NTN_TextToBeShown
  504. ; !NTN_RegBases
  505. ;
  506. ;--------------------------------------------------------------------
  507. [RemoveNetComponents]
  508. set UtilityInf = "Utility.inf"
  509. set NcParamInf = "NCPARAM.INF"
  510. set !STF_NETCANCELOVERIDE = "YES"
  511. set !STF_NETDELETEOVERIDE = "YES"
  512. Debug-Output "The Glue That Keeps Us Installing"
  513. Debug-Output "NetBond.INF: INFs to be run: "$(!NTN_InfsToBeRun)
  514. Debug-Output "NetBond.INF: Options to install: "$(!NTN_OptionsToBeRun)
  515. Debug-Output "NetBond.INF: Billboards to be shown: "$(!NTN_TextToBeShown)
  516. Debug-Output "NetBond.INF: RegBases to pass: "$(!NTN_RegBases)
  517. Shell "" SetStatusInReg YES ""
  518. Set lInfStatus = {}
  519. ; no ui if we are are in notify mode
  520. read-syms MessageText$(!STF_LANGUAGE)
  521. ifstr(i) $(!NTN_NOTIFY_HWND) != ""
  522. read-syms NotifySyms
  523. QueryListSize cInfsToBeRun $(!NTN_InfsToBeRun)
  524. LibraryProcedure STATUS, $(!NCPA_HANDLE), SendProgressMessage, $(!PWM_SETPROGRESSSIZE), $(!NTN_NOTIFY_HWND), "D", $(!PGI_REMOVE), "D", $(cInfsToBeRun)
  525. ; sets the default text, displays the gauge and text
  526. ;
  527. LibraryProcedure STATUS, $(!NCPA_HANDLE), SendProgressMessage, $(!PWM_SETPROGRESSTEXT), $(!NTN_NOTIFY_HWND), "D", $(!PGI_REMOVE), "D", "-1"
  528. endif
  529. ;
  530. ; make sure the infs know we are removing them
  531. ;
  532. set !NTN_InstallMode = deinstall
  533. ;
  534. ; Loop on list and shell the specific infs...
  535. ;
  536. ForListDo $(!NTN_InfsToBeRun)
  537. Set ThisInfName = $($)
  538. Debug-Output "NETBOND.INF: Removing "$(ThisInfName)
  539. ; no ui if we are are in notify mode
  540. ifstr(i) $(!NTN_NOTIFY_HWND) == ""
  541. Shell "subroutn.inf" PushBillboard NETSTATUSDLG $(MPreRemove1)*($(!NTN_TextToBeShown),$(#))$(MPreRemove2)
  542. Set BillboardVisible = 1
  543. else
  544. LibraryProcedure STATUS, $(!NCPA_HANDLE), SendProgressMessage, $(!PWM_SETPROGRESSTEXT), $(!NTN_NOTIFY_HWND), "D", $(!PGI_REMOVE), "A", *($(!NTN_TextToBeShown),$(#))
  545. endif
  546. Set InfOption = *($(!NTN_OptionsToBeRun),$(#))
  547. Set OemPath = $(!STF_SRCDIR)
  548. ;
  549. ; make sure the reg base is set for this item to remove
  550. ;
  551. Set !NTN_RegBase = *($(!NTN_RegBases),$(#))
  552. ;
  553. ; do the inf
  554. ;
  555. Shell $(ThisInfName) InstallOption $(!STF_LANGUAGE) $(InfOption) $(OemPath) "YES" "NO" "NO"
  556. ; Reset the title string
  557. ; no ui if we are are in notify mode
  558. ifstr(i) $(!NTN_NOTIFY_HWND) == ""
  559. Set-title *($(!NTN_TextToBeShown),$(#))$(MPostRemove)
  560. else
  561. LibraryProcedure STATUS, $(!NCPA_HANDLE), SendProgressMessage, $(!PWM_SETPROGRESSPOS), $(!NTN_NOTIFY_HWND), "D", $(!PGI_REMOVE), "D", $(#)
  562. endif
  563. Set NetInstallStatus = $($R0)
  564. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  565. Debug-Output "NETBOND.INF: INF "$(ThisInfName)" SHELL ERROR!"
  566. Set NetInstallStatus = $($ShellCode)
  567. Endif
  568. ;
  569. ; store the status for latter return
  570. ;
  571. set lInfStatus = >($(lInfStatus), $(NetInstallStatus) )
  572. EndForListDo
  573. ;
  574. ; The products are set to be copied, and the Registry is up to date.
  575. ;
  576. netruninfescape = +
  577. Ifint $(BillboardVisible) != 0
  578. Shell "subroutn.inf" PopBillboard
  579. Set BillboardVisible = 0
  580. Endif
  581. ; clear the status text, removes the gauge and text
  582. ;
  583. ;LibraryProcedure STATUS, $(!NCPA_HANDLE), SendProgressMessage, $(!PWM_SETPROGRESSTEXT), $(!NTN_NOTIFY_HWND), "D", $(!PGI_REMOVE), "D", "0"
  584. ;
  585. ; return the status of each inf
  586. ;
  587. Shell "" SetStatusInReg NO "REMOVE:STATUS_SUCCESSFUL:"$(lInfStatus)
  588. netcopyescape = +
  589. ;
  590. ; error status is saved in registry
  591. ;
  592. return STATUS_SUCCESSFUL
  593. ;-----------------------------------------------------------------------
  594. ;
  595. ; ROUTINE: OemHaveDisk
  596. ;
  597. ; DESCRIPTION:
  598. ;
  599. ; INPUTS:
  600. ;
  601. ; OUTPUTS:
  602. ;
  603. ; NOTES:
  604. ;
  605. ;------------------------------------------------------------------------
  606. [OemHaveDisk]
  607. Shell "" SetStatusInReg YES ""
  608. shell "Other.inf" GetNewOEMMultiOption $(!STF_LANGUAGE) {} $(!NTN_NETTYPE) "A:"
  609. Debug-Output "Status:"$($R0)" OemList:"$($R1)" OptionChoice"$($R2)" ChosenText"$($R3)" Diskette:"$($R4)
  610. Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  611. shell "" SetStatusInReg NO *(*($($R1),1),1)","$($R4)","$($R2)","$($R3)
  612. else
  613. shell "" SetStatusInReg NO $($R0)
  614. endif
  615. Return $($R0)
  616. ;-----------------------------------------------------------------------
  617. ;
  618. ; Install sections...
  619. ;
  620. ;------------------------------------------------------------------------
  621. [InstallNetFiles]
  622. set !STF_NCPA_FLUSH_COPYLIST = TRUE
  623. CopyFilesInCopyList
  624. exit
  625. ;***********************************************************************************************
  626. ;
  627. ; UpgradeNetwork - Upgrade all the network components.
  628. ;
  629. ; From Here down is taken directly from the NtLanman.Inp file for upgrade support,
  630. ; it has been modified so that bindings will be done outside this inf after this
  631. ; call
  632. ;
  633. ;***********************************************************************************************
  634. ;
  635. ;[UpgradeNetwork]
  636. ; set !STF_NETCANCELOVERIDE = "YES"
  637. ; set !STF_NETDELETEOVERIDE = "YES"
  638. ; Shell "" SetStatusInReg YES ""
  639. ; ifstr(i) $(!NTN_NOTIFY_HWND) != ""
  640. ; read-syms NotifySyms
  641. ;LibraryProcedure STATUS, $(!NCPA_HANDLE), SendProgressMessage, $(!PWM_SETPROGRESSSIZE), $(!NTN_NOTIFY_HWND), "D", $(!PGI_UPDATE), "D", $(cSectionsToRun)
  642. ; sets the default text, displays the gauge and text
  643. ;
  644. ; LibraryProcedure STATUS, $(!NCPA_HANDLE), SendProgressMessage, $(!PWM_SETPROGRESSTEXT), $(!NTN_NOTIFY_HWND), "D", $(!PGI_UPDATE), "D", "-1"
  645. ; endif
  646. ;
  647. ; Enable network card first
  648. ;
  649. ; Shell "" EnableNetworkComponents
  650. ;
  651. ; Update network components that do not have an inf
  652. ;
  653. ; Shell "" UpdateSpecificItems
  654. ;
  655. ; For each inf files upgrade
  656. ;
  657. ; Shell "" UpdateEachInf
  658. ;
  659. ; Change the card number from 0X to X
  660. ;
  661. ; LibraryProcedure STATUS, $(!NCPA_HANDLE), UpgradeCardNum
  662. ;
  663. ; Update SNA stuff
  664. ;
  665. ; LibraryProcedure STATUS, $(!NCPA_HANDLE), UpgradeSNA
  666. ;
  667. ; Remove some old inf files
  668. ;
  669. ; Shell "" RemoveOldInfFile "NWWKSTA", "NetService", "oemnsv", "oemnsvnw.inf"
  670. ; LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\oemnxpsn.inf"
  671. ;
  672. ; fix mac services files
  673. ;
  674. ; ifstr(i) $(!STF_PRODUCT) != "WINNT"
  675. ; LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\oemnxpsm.inf"
  676. ; else
  677. ; LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\oemnsvsm.inf"
  678. ; endif
  679. ; return
  680. ;******************************************************************************
  681. ;
  682. ; UpdatesSpecificItems - update specific network compents that is not handled
  683. ; by a specific INF
  684. ;
  685. ;******************************************************************************
  686. ;[UpdateSpecificItems]
  687. ; set MAXIMUM_ALLOWED = 33554432
  688. ;
  689. ; update AFD
  690. ;
  691. ; Shell "Utility.inf" UpgradeAFD
  692. ;
  693. ; Fix NDIS problems, these were in builds around 1116.
  694. ;
  695. ; set NDISService = "SYSTEM\CurrentControlSet\Services\NDIS"
  696. ; OpenRegKey $(!REG_H_LOCAL) "" $(NDISService) $(MAXIMUM_ALLOWED) KeyNDIS
  697. ; ifstr(i) $(KeyNDIS) != ""
  698. ; DeleteRegValue $(KeyNDIS) "ImagePath"
  699. ; DeleteRegValue $(KeyNDIS) "ObjectName"
  700. ; CloseRegKey $(KeyNDIS)
  701. ; endif
  702. ;
  703. ; Warn user of upgrade needed for Directory Service Manager for NetWare Administrative Tools
  704. ;
  705. ; LibraryProcedure FilePresent, $(!LIBHANDLE), CheckFileExistance $(!STF_WINDOWSSYSPATH)\swclnt.dll
  706. ; ifstr(i) $(FilePresent) == "YES"
  707. ; read-syms UpgradeSWTOOLSTitle
  708. ; read-syms UpgradeWarnings
  709. ; read-syms WarningDlg
  710. ; ui start "Warning"
  711. ; endif
  712. ; return
  713. ;***********************************************************************************************
  714. ;
  715. ; EnableNetworkComponents - Enable all the network components.
  716. ;
  717. ;***********************************************************************************************
  718. ;[EnableNetworkComponents]
  719. ; set MAXIMUM_ALLOWED = 33554432
  720. ; set NcpaName = "Software\Microsoft\Ncpa\CurrentVersion"
  721. ; OpenRegKey $(!REG_H_LOCAL) "" $(NcpaName) $(MAXIMUM_ALLOWED) KeyNcpa
  722. ; ifstr(i) $(KeyNcpa) != ""
  723. ; GetRegValue $(KeyNcpa),"DisableList", DisableListInfo
  724. ; set DisableList = *($(DisableListInfo),4)
  725. ; ForListDo $(DisableList)
  726. ;
  727. ; Enable each network component
  728. ;
  729. ; set ServiceName = "System\CurrentControlSet\Services\"$($)
  730. ; OpenRegKey $(!REG_H_LOCAL) "" $(ServiceName) $(MAXIMUM_ALLOWED) KeyService
  731. ; ifstr(i) $(KeyService) != ""
  732. ; GetRegValue $(KeyService),"OldStart", OldStartInfo
  733. ; set OldStart = *($(OldStartInfo),4)
  734. ; SetRegValue $(KeyService) {Start,$(NoTitle),*($(OldStartInfo),3),*($(OldStartInfo),4)}
  735. ; LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceStart, $($), $(OldStart)
  736. ;
  737. ; Remove Old Start Value
  738. ;
  739. ; DeleteRegValue $(KeyService) "OldStart"
  740. ; CloseRegKey $(KeyService)
  741. ; endif
  742. ; EndForListDo
  743. ; DeleteRegValue $(KeyNcpa) "DisableList"
  744. ; CloseRegKey $(KeyNcpa)
  745. ; endif
  746. ; return
  747. ;***********************************************************************************************
  748. ;
  749. ; UpdateEachInf - Search the register for all the network components. Then
  750. ; update each one of them.
  751. ;
  752. ;***********************************************************************************************
  753. ;[UpdateEachInf]
  754. ; read-syms UpgradeDialog$(!STF_LANGUAGE)
  755. ; set WarningList = { "SWSRV", "NWSRV", "NWTOOLS" }
  756. ; set UnsupportedOptions = { "AM1500T", "AM1500T2", "AM1500T2" }
  757. ; set MAXIMUM_ALLOWED = 33554432
  758. ; set OptionList = {}
  759. ; set InfFileList = {}
  760. ; set ManufacturerList = { "Software\DigiBoard" , "Software\Microsoft" }
  761. ; ForListDo $(ManufacturerList)
  762. ; set SoftwareName = $($)
  763. ; OpenRegKey $(!REG_H_LOCAL) "" $(SoftwareName) $(MAXIMUM_ALLOWED) KeySoftware
  764. ; ifstr(i) $(KeySoftware) != ""
  765. ; EnumRegKey $(KeySoftware) SoftwareList
  766. ; ForListDo $(SoftwareList)
  767. ;
  768. ; Find all the network component
  769. ;
  770. ; set ComponentName = $(SoftwareName)"\"*($($),1)
  771. ; OpenRegKey $(!REG_H_LOCAL) "" $(ComponentName) $(MAXIMUM_ALLOWED) KeyComponent
  772. ; ifstr(i) $(KeyComponent) != ""
  773. ; set NetRulesName = $(ComponentName)"\CurrentVersion\NetRules"
  774. ; OpenRegKey $(!REG_H_LOCAL) "" $(NetRulesName) $(MAXIMUM_ALLOWED) KeyNetRules
  775. ; ifstr(i) $(KeyNetRules) != ""
  776. ;
  777. ; Put the inf option and file into the list
  778. ;
  779. ; GetRegValue $(KeyNetRules),"InfName", InfNameInfo
  780. ; GetRegValue $(KeyNetRules),"InfOption", InfOptionInfo
  781. ; set ComponentInfName = *($(InfNameInfo),4)
  782. ; set ComponentInfOption = *($(InfOptionInfo),4)
  783. ; retrieve the componet title
  784. ; set CurrentVerName = $(ComponentName)"\CurrentVersion"
  785. ; OpenRegKey $(!REG_H_LOCAL) "" $(CurrentVerName) $(MAXIMUM_ALLOWED) KeyCurrentVer
  786. ; GetRegValue $(KeyCurrentVer),"Title", InfTitleInfo
  787. ; CloseRegKey $(KeyCurrentVer)
  788. ; set ComponentTitle = *($(InfTitleInfo),4)
  789. ;
  790. ; let the user know of orphaned software
  791. ;
  792. ; ifcontains(i) $(ComponentInfOption) in $(UnsupportedOptions)
  793. ; read-syms UpgradeUnsupported
  794. ; read-syms WarningDlg
  795. ; ui start "Warning"
  796. ; endif
  797. ;
  798. ; Directory Service Manager for NetWare or
  799. ; File and Print Services for NetWare special cases
  800. ;
  801. ; ifcontains(i) $(ComponentInfOption) in $(WarningList)
  802. ; read-syms Upgrade$(ComponentInfOption)Title
  803. ; read-syms UpgradeWarnings
  804. ; read-syms WarningDlg
  805. ; ui start "Warning"
  806. ; endif
  807. ;
  808. ; Handle special case for NWCWorkstation and MCSXNS
  809. ;
  810. ; ifstr(i) $(ComponentInfOption) == "NWWKSTA"
  811. ; ifstr(i) $(ComponentInfName) != "oemnsvnw.inf"
  812. ; LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\"$(ComponentInfName)
  813. ; set ComponentInfName = "oemnsvnw.inf"
  814. ; SetRegValue $(KeyNetRules) {InfName,$(NoTitle),$(!REG_VT_SZ),"oemnsvnw.inf"}
  815. ; endif
  816. ; endif
  817. ; ifstr(i) $(ComponentInfOption) == "SNMP"
  818. ; set CurrentVersionKey = $(ComponentName)"\CurrentVersion"
  819. ; OpenRegKey $(!REG_H_LOCAL) "" $(CurrentVersionKey) $(MAXIMUM_ALLOWED) CurrentVersion
  820. ; set SoftwareType = "SoftwareType"
  821. ; set SoftwareTypeValue = "service"
  822. ; SetRegValue $(CurrentVersion) {$(SoftwareType),$(NoTitle),$(!REG_VT_SZ),$(SoftwareTypeValue)}
  823. ; CloseRegKey $(CurrentVersion)
  824. ; set ComponentInfName = "oemnsvsn.inf"
  825. ; SetRegValue $(KeyNetRules) {InfName,$(NoTitle),$(!REG_VT_SZ),$(ComponentInfName)}
  826. ; endif
  827. ; fix atalk file inf name
  828. ; ifstr(i) $(ComponentInfOption) == "ATALK"
  829. ; ifstr(i) $(!STF_PRODUCT) != "WINNT"
  830. ; set NewAtalkInf = "oemnsvsm.inf"
  831. ; else
  832. ; set NewAtalkInf = "oemnxpsm.inf"
  833. ; endif
  834. ; ifstr(i) $(ComponentInfName) != $(NewAtalkInf)
  835. ; set ComponentInfName = $(NewAtalkInf)
  836. ; SetRegValue $(KeyNetRules) {InfName,$(NoTitle),$(!REG_VT_SZ),$(ComponentInfName)}
  837. ; endif
  838. ; endif
  839. ; fix Services For Mac inf name
  840. ; ifstr(i) $(ComponentInfOption) == "SFM"
  841. ; ifstr(i) $(ComponentInfName) != "oemnsvsm.inf"
  842. ; set ComponentInfName = "oemnsvsm.inf"
  843. ; SetRegValue $(KeyNetRules) {InfName,$(NoTitle),$(!REG_VT_SZ),$(ComponentInfName)}
  844. ; endif
  845. ; endif
  846. ; fix Services For Mac inf name
  847. ; ifstr(i) $(ComponentInfOption) == "MACPRINT"
  848. ; ifstr(i) $(ComponentInfName) != "oemnsvsm.inf"
  849. ; set ComponentInfName = "oemnsvsm.inf"
  850. ; SetRegValue $(KeyNetRules) {InfName,$(NoTitle),$(!REG_VT_SZ),$(ComponentInfName)}
  851. ; endif
  852. ; endif
  853. ; fix Services For Mac inf name
  854. ; ifstr(i) $(ComponentInfOption) == "AFPSVC"
  855. ; ifstr(i) $(ComponentInfName) != "oemnsvsm.inf"
  856. ; set ComponentInfName = "oemnsvsm.inf"
  857. ; SetRegValue $(KeyNetRules) {InfName,$(NoTitle),$(!REG_VT_SZ),$(ComponentInfName)}
  858. ; endif
  859. ; endif
  860. ; ifstr(i) $(ComponentInfOption) == "NWLINK"
  861. ; set ComponentInfOption = "NWLNKIPX"
  862. ; SetRegValue $(KeyNetRules) {InfOption,$(NoTitle),$(!REG_VT_SZ),"NWLNKIPX"}
  863. ; endif
  864. ; ifstr(i) $(ComponentInfOption) == "BLOODHOUND"
  865. ; ifstr(i) $(ComponentInfName) != "oemnsvbh.inf"
  866. ; LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\"$(ComponentInfName)
  867. ; set ComponentInfName = "oemnsvbh.inf"
  868. ; SetRegValue $(KeyNetRules) {InfName,$(NoTitle),$(!REG_VT_SZ),"oemnsvbh.inf"}
  869. ; endif
  870. ; set ComponentInfOption = "NETMON"
  871. ; SetRegValue $(KeyNetRules) {InfOption,$(NoTitle),$(!REG_VT_SZ),"NETMON"}
  872. ; endif
  873. ; ifstr(i) $(ComponentInfOption) == "PCNTN3"
  874. ;
  875. ; remove the third party inf file
  876. ;
  877. ; LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\"$(ComponentInfName)
  878. ; set ComponentInfOption = "AMDPCI"
  879. ; set ComponentInfName = "oemnadap.inf"
  880. ; endif
  881. ; ifstr(i) $(ComponentInfOption) == "MCSXNS"
  882. ; goto skipxns
  883. ; endif
  884. ; ifstr(i) $(ComponentInfOption) == "Ubnb"
  885. ; goto skipxns
  886. ; endif
  887. ; Shell $(ComponentInfName) GetSignature
  888. ; Ifstr(i) $($ShellCode) != $(!SHELL_CODE_OK)
  889. ; goto skipxns
  890. ; endif
  891. ; ifstr(i) $($R0) != "MICROSOFT_FILE"
  892. ; goto skipxns
  893. ; endif
  894. ; ifcontains(i) $(ComponentInfName) NOT-IN $(InfFileList)
  895. ; ifstr(i) $(InfFileList) == {}
  896. ; set InfFileList = {$(ComponentInfName)}
  897. ; set OptionList = {$(ComponentInfOption)}
  898. ; set TitleList = {$(ComponentTitle)}
  899. ; else
  900. ; set InfFileList = >($(InfFileList),$(ComponentInfName))
  901. ; set OptionList = >($(OptionList),$(ComponentInfOption))
  902. ; set TitleList = >($(TitleList),$(ComponentTitle))
  903. ; endif
  904. ; endif
  905. ;skipxns = +
  906. ; CloseRegKey $(KeyNetRules)
  907. ; endif
  908. ; CloseRegKey $(KeyComponent)
  909. ; endif
  910. ; EndForListDo
  911. ; CloseRegKey $(KeySoftware)
  912. ; endif
  913. ; EndForListDo
  914. ; Upgrade all the component in the option list
  915. ;
  916. ; debug-output $(InfFileList)
  917. ; debug-output $(OptionList)
  918. ; debug-output $(TitleList)
  919. ; set OldInstallMode = $(!NTN_InstallMode)
  920. ; set !NTN_InstallMode = "Update"
  921. ; set AddCopy = YES
  922. ; set DoCopy = YES
  923. ; set DoConfig = YES
  924. ; ifstr(i) $(!NTN_NOTIFY_HWND) != ""
  925. ; QueryListSize cInfsToBeRun $(InfFileList)
  926. ; LibraryProcedure STATUS, $(!NCPA_HANDLE), SendProgressMessage, $(!PWM_SETPROGRESSSIZE), $(!NTN_NOTIFY_HWND), "D", $(!PGI_UPDATE), "D", $(cInfsToBeRun)
  927. ; sets the default text, displays the gauge and text
  928. ;
  929. ; LibraryProcedure STATUS, $(!NCPA_HANDLE), SendProgressMessage, $(!PWM_SETPROGRESSTEXT), $(!NTN_NOTIFY_HWND), "D", $(!PGI_UPDATE), "D", "-1"
  930. ; endif
  931. ; ForListDo $(InfFileList)
  932. ; debug-output $($)
  933. ; debug-output *($(OptionList), $(#))
  934. ; ifstr(i) $(!NTN_NOTIFY_HWND) != ""
  935. ; LibraryProcedure STATUS, $(!NCPA_HANDLE), SendProgressMessage, $(!PWM_SETPROGRESSTEXT), $(!NTN_NOTIFY_HWND), "D", $(!PGI_UPDATE), "A", *($(TitleList), $(#))
  936. ; endif
  937. ; Shell $($) "InstallOption" +
  938. ; $(!STF_LANGUAGE) *($(OptionList), $(#)) +
  939. ; $(!STF_SRCDIR) $(AddCopy) $(DoCopy) $(DoConfig)
  940. ; Ifstr(i) $($ShellCode) != $(!SHELL_CODE_OK)
  941. ; Debug-Output "NCPASHEL.INF: SHELL ERROR: "$($ShellCode)
  942. ; Endif
  943. ; ifstr(i) $(!NTN_NOTIFY_HWND) != ""
  944. ; LibraryProcedure STATUS, $(!NCPA_HANDLE), SendProgressMessage, $(!PWM_SETPROGRESSPOS), $(!NTN_NOTIFY_HWND), "D", $(PGI_UPDATE), "D", $(#)
  945. ; endif
  946. ; EndForListDo
  947. ; set !NTN_InstallMode = $(OldInstallMode)
  948. ; install "Install-UpdateFiles"
  949. ; return
  950. ;***********************************************************************************************
  951. ;
  952. ; RemoveoldInfFile - remove old inf file
  953. ; Entry: $0 - Option name (ie NWWKSTA)
  954. ; $1 - Inf file type (ie, NetService)
  955. ; $2 - inf prefix (ie oemnsv)
  956. ; $3 - the new inf file to keep (ie oemnsvnw.inf)
  957. ;
  958. ;***********************************************************************************************
  959. ;[OEMFiles]
  960. ; OemFiles = {} ? $(!LIBHANDLE) FindFileInstances $(!STF_WINDOWSSYSPATH)"\"$(Prefix)"*.inf"
  961. ;[RemoveOldInfFile]
  962. ; set OptionName = $($0)
  963. ; set OptionType = $($1)
  964. ; set Prefix = $($2)
  965. ; set CurrentInf = $($3)
  966. ;
  967. ; First get all the filenames
  968. ;
  969. ; set OemOptionList = {}
  970. ; set InfToDelete = {}
  971. ; read-syms OEMFiles
  972. ; detect OEMFiles
  973. ;
  974. ; Get the option from each file
  975. ;
  976. ; ForListDo $(OemFiles)
  977. ; ifstr(i) $($) != $(CurrentInf)
  978. ; set OemFileName = $(!STF_WINDOWSSYSPATH)"\"$($)
  979. ; shell "other.inf", GetOptionsFromINF $(!STF_LANGUAGE) $(OptionType) $(OemFileName)
  980. ; ifstr(i) $($R0) == STATUS_SUCCESSFUL
  981. ; ifcontains(i) $(OptionName) in $($R1)
  982. ; set InfToDelete = >($(InfToDelete), $($))
  983. ; endif
  984. ; endif
  985. ; endif
  986. ; EndForListDo
  987. ; debug-output $(InfToDelete)
  988. ;
  989. ; del all the old files
  990. ;
  991. ; ForListDo $(InfToDelete)
  992. ; LibraryProcedure Status1, $(!LIBHANDLE), DelFile, $(!STF_WINDOWSSYSPATH)"\"$($)
  993. ; EndForListDo
  994. ; return
  995. ;***********************************************************************************************
  996. ;
  997. ; Install-UpdateFiles - Copy all the new network components files.
  998. ;
  999. ;***********************************************************************************************
  1000. ;[Install-UpdateFiles]
  1001. ; set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1002. ; CopyFilesInCopyList
  1003. ; exit