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.

1917 lines
76 KiB

  1. ;/****************************************************************************
  2. ;* oemnxppp.inf : $Revision: 1.10
  3. ;* Modified : $Date: Feb 06 1996 16:42:16
  4. ;* By : $Author: abordia $, U.S. Robotics Access Corp.
  5. ;* Logfile : $Logfile: L:/SRC/INSTALL/STRAWMAN/INFFILE/oemsetup.inv
  6. ;*****************************************************************************
  7. ;* Copyright (c) $Date: Feb 06 1996 16:42:16 $,
  8. ;* U.S. Robotics Access Corp., Microsoft Corp.
  9. ;* All Rights Reserved
  10. ;*****************************************************************************
  11. ;* "OTHER CODE"
  12. ;* This software may be used to implement the POINT to POINT TUNNELING
  13. ;* PROTOCOL as defined by the PPTP forum. The PPTP forum consists of:
  14. ;* U.S. Robotics, Ascend Communications, Microsoft, 3Com/Primary Access,
  15. ;* Telematics.
  16. ;*****************************************************************************
  17. ;*
  18. ;* This file is part of the USR Total Control STRAWMAN Installation Program
  19. ;*
  20. ;* It is the RASPPTP WindowsNT Setup File
  21. ;*
  22. ;*****************************************************************************
  23. ;*
  24. ;* Redistribution and use in source and binary forms, with or without
  25. ;* modification, are permitted provided that the following conditions
  26. ;* are met:
  27. ;*
  28. ;* 1. Redistributions of source code must retain this entire header
  29. ;* including the above copyright notice, this list of conditions and
  30. ;* the following disclaimer.
  31. ;* 2. Source code access must be limited to employees or contractors of
  32. ;* Microsoft Corp.
  33. ;* 3. The name of U.S. Robotics may not be used to endorse or promote
  34. ;* products derived from this software without specific prior written
  35. ;* permission of U.S. Robotics.
  36. ;*
  37. ;* THIS SOFTWARE IS PROVIDED BY U.S. ROBOTICS ACESS CORP. ``AS IS'' AND
  38. ;* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  39. ;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  40. ;* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL U.S. ROBOTICS BE LIABLE FOR
  41. ;* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  42. ;* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  43. ;* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  44. ;* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  45. ;* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  46. ;* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  47. ;* POSSIBILITY OF SUCH DAMAGE.
  48. ;*
  49. ;*****************************************************************************/
  50. ;***********************************************************************
  51. ;
  52. ;***********************************************************************
  53. [Identification]
  54. OptionType = NetTransport
  55. ;***********************************************************************
  56. ;RamC, Commented out because PPTP is platform independent and should not
  57. ;be using this information. 12/10/96
  58. ;***********************************************************************
  59. ;[PlatformsSupported]
  60. ; ISA
  61. ; EISA
  62. ; "Jazz-Internal Bus"
  63. ;***********************************************************************
  64. ;
  65. ;***********************************************************************
  66. [Options]
  67. RASPPTP
  68. ;***********************************************************************
  69. ;
  70. ;***********************************************************************
  71. [FileConstants]
  72. InfName = "OEMNXPPP.INF"
  73. UtilityInf = "UTILITY.INF"
  74. ParamInf = "NCPARAM.INF"
  75. subroutineinf = "SUBROUTN.INF"
  76. SoftwareType = "driver"
  77. Exit_Code = 0
  78. NetEventDLL = "%SystemRoot%\System32\netevent.dll"
  79. IoLogMsgDLL = "%SystemRoot%\System32\IoLogMsg.dll"
  80. RASPPTPMsgDLL = "%SystemRoot%\System32\raspptpl.dll;%SystemRoot%\System32\netevent.dll"
  81. Manufacturer = "Microsoft"
  82. ProductMajorVersion = "4"
  83. ProductMinorVersion = "0"
  84. ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)
  85. ProductSoftwareName = "RASPPTPM"
  86. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\RASPPTPM.sys"
  87. NetworkCardKeyName = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards"
  88. ProductKeyBase = $(!NTN_SoftwareBase)"\"$(Manufacturer)
  89. NetRuleSoftwareType = "RASPPTPSys RASPPTPDriver"
  90. NetRuleSoftwareUse = $(SoftwareType)
  91. NetRuleSoftwareBindForm = """RASPPTPSys"" yes no container"
  92. NetRuleSoftwareClass = {"RASPPTPDriver basic"}
  93. NetRuleSoftwareBindable = {"RASPPTPDriver RASPPTPAdapter non exclusive 100"}
  94. ProductHardwareName = "RASPPTPM"
  95. NetRuleHardwareBindForm = " yes yes container"
  96. NetRuleHardwareRASPPTPType = "RASPPTP RASPPTPAdapter"
  97. NetRuleHardwareRASPPTPClass = {"RASPPTPAdapter basic"}
  98. BindableRASPPTPTxt = {"RASPPTPDriver RASPPTPAdapter non exclusive 100"}
  99. ProductOpSupport = 134 ; 0x0086 ; Display,Removable,Properties,Not Updatable
  100. ;values for the placeholder Microsoft\RASPPTP transport
  101. ProductRASPPTPName = "RASPPTP"
  102. ProductRASPPTPSvcType = "transport"
  103. NetRuleRASPPTPClass = "classRaspptpTransport ""basic"""
  104. NetRuleRASPPTPType = "RaspptpTransport classRaspptpTransport"
  105. NetRuleRASPPTPUse = "system"
  106. TapiDevices = "TAPI DEVICES"
  107. TapiDeviceKey = $(ProductHardwareName)
  108. TapiMediaType = "VPN"
  109. ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"+
  110. $(ProductSoftwareName)"\CurrentVersion"
  111. ParamKeyName = $(!NTN_ServiceBase)"\"$(ProductHardwareName)+
  112. "\Parameters"
  113. ProductRASPPTPKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"+
  114. "RASPPTP\CurrentVersion"
  115. ; default to dialup line mode = 1 -- leased line = 0
  116. ; Right now this file only supports dialup mode - leased line changes are needed
  117. LineType = 1
  118. ; FIXME - Set to zero before release
  119. DebugFlags = 0
  120. ; RASPPTP_SPECFIC_START
  121. ;***********************************************************************
  122. ; The following constants are specifically for the raspptpe.sys driver
  123. ; which is specific to STRAWMAN
  124. ;***********************************************************************
  125. [SMANFileConstants]
  126. PPTPProductMajorVersion = "4"
  127. PPTPProductMinorVersion = "0"
  128. PPTPProductVersion = $(PPTPProductMajorVersion)"."$(PPTPProductMinorVersion)
  129. PPTPProductSoftwareName = "RASPPTPE"
  130. PPTPProductSoftwareImagePath = "\SystemRoot\System32\drivers\RASPPTPE.sys"
  131. PPTPNetRuleSoftwareType = "RASPPTPSys RASPPTPDriver"
  132. PPTPNetRuleSoftwareBindForm = """RASPPTPSys"" yes no container"
  133. PPTPNetRuleSoftwareClass = {"RASPPTPDriver basic"}
  134. PPTPNetRuleSoftwareBindable = {"RASPPTPDriver RASPPTPAdapter non exclusive 100"}
  135. PPTPProductHardwareName = "RASPPTPE"
  136. PPTPNetRuleHardwareRASPPTPType = "RASPPTP RASPPTPAdapter"
  137. PPTPNetRuleHardwareRASPPTPClass = {"RASPPTPAdapter basic"}
  138. PPTPBindableRASPPTPTxt = {"RASPPTPDriver RASPPTPAdapter non exclusive 100"}
  139. PPTPProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"+
  140. $(PPTPProductSoftwareName)"\CurrentVersion"
  141. PPTPParamKeyName = $(!NTN_ServiceBase)"\"$(PPTPProductHardwareName)+
  142. "\Parameters"
  143. ;RASPPTP_SPECIFIC_END
  144. ;***********************************************************************
  145. ;
  146. ;***********************************************************************
  147. [GeneralConstants]
  148. from = ""
  149. to = ""
  150. ExitCodeOk = 0
  151. ExitCodeCancel = 1
  152. ExitCodeFatal = 2
  153. KeyNull = ""
  154. MAXIMUM_ALLOWED = 33554432
  155. SERVICE_NO_CHANGE = 4294967295
  156. RegistryErrorIndex = NO_ERROR
  157. KeyProduct = ""
  158. KeyParameters = ""
  159. TRUE = 1
  160. FALSE = 0
  161. NoTitle = 0
  162. ExitState = "Active"
  163. OldVersionExisted = $(FALSE)
  164. DriverPath = $(!STF_NTPATH)\drivers
  165. ;***********************************************************************
  166. ;
  167. ;***********************************************************************
  168. [Date]
  169. Now = {} ? $(!LIBHANDLE) GetSystemDate
  170. ;***********************************************************************
  171. ;
  172. ;***********************************************************************
  173. [Identify]
  174. Read-Syms Identification
  175. Set Status = STATUS_SUCCESSFUL
  176. Set Identifier = $(OptionType)
  177. Set Media = #("Source Media Descriptions", 1, 1)
  178. Return $(Status) $(Identifier) $(Media)
  179. ;***********************************************************************
  180. ;
  181. ;***********************************************************************
  182. [ReturnOptions]
  183. Set Status = STATUS_FAILED
  184. Set OptionList = {}
  185. Set OptionTextList = {}
  186. Set LanguageList = ^(LanguagesSupported, 1)
  187. IfContains(i) $($0) in $(LanguageList)
  188. IfStr(i) $($1) == ""
  189. GoTo SetOptions
  190. EndIf
  191. ;
  192. ;RamC, Commented out because PPTP is platform independent and should not
  193. ;be checking the platfom. 12/10/96
  194. ;
  195. ; Set PlatformList = ^(PlatformsSupported, 1)
  196. ; IfContains(i) $($1) in $(PlatformList)
  197. ; GoTo SetOptions
  198. ; Else
  199. ; Set Status = STATUS_NOTSUPPORTED
  200. ; GoTo ExitReturnOptions
  201. ; EndIf
  202. Else
  203. Set Status = STATUS_NOLANGUAGE
  204. GoTo ExitReturnOptions
  205. EndIf
  206. SetOptions = +
  207. Set OptionList = ^(Options, 1)
  208. Set OptionTextList = ^(OptionsText$($0), 1)
  209. Set Status = STATUS_SUCCESSFUL
  210. ExitReturnOptions = +
  211. Return $(Status) $(OptionList) $(OptionTextList)
  212. ;***********************************************************************
  213. ;
  214. ;***********************************************************************
  215. [InstallOption]
  216. Set Status = STATUS_FAILED
  217. Set Option = $($1)
  218. Set SrcDir = $($2)
  219. Set RasDir = $($2)
  220. Set AddCopy = $($3)
  221. Set DoCopy = $($4)
  222. Set DoConfig = $($5)
  223. Set LanguageList = ^(LanguagesSupported, 1)
  224. IfContains(i) $($0) NOT-IN $(LanguageList)
  225. Return STATUS_NOLANGUAGE
  226. EndIf
  227. ;
  228. ; FIXME - make sure this flag is disabled before shipping
  229. ;
  230. Set-Subst LF = "\n"
  231. Read-Syms GeneralConstants
  232. Read-Syms FileConstants
  233. Read-Syms DialogConstants$(!STF_LANGUAGE)
  234. ;RASPPTP_SPECIFIC_START
  235. Read-Syms SMANFileConstants
  236. ;RASPPTP_SPECIFIC_END
  237. IfStr(i) $(!NTN_Origination) == "NCPA"
  238. Set Continue = $(OK)
  239. EndIf
  240. Read-Syms FileConstants$(!STF_LANGUAGE)
  241. Detect Date
  242. Set-Title $(FunctionTitle)$(Option)
  243. ;RASPPTP_SPECIFIC_START
  244. Read-Syms SMANFileConstants$(!STF_LANGUAGE)
  245. ;RASPPTP_SPECIFIC_END
  246. Set to = Begin
  247. Set from = Begin
  248. Set CommonStatus = STATUS_SUCCESSFUL
  249. EndWait
  250. ;***********************************************************************
  251. ;
  252. ;***********************************************************************
  253. Begin = +
  254. Set ActivateDetection = FALSE
  255. IfStr(i) $(!NTN_InstallMode) == deinstall
  256. Set StartLabel = RemoveAdapter
  257. Else-IfStr(i) $(!NTN_InstallMode) == Update
  258. Set StartLabel = UpgradeSoftware
  259. Else-IfStr(i) $(!NTN_InstallMode) == bind
  260. Set StartLabel = BindingAdapter
  261. Else-IfStr(i) $(!NTN_InstallMode) == configure
  262. Set StartLabel = ConfigureAdapter
  263. Set ActivateDetection = TRUE
  264. Set CommonStatus = STATUS_REBOOT
  265. ; Set CommonStatus = STATUS_SUCCESSFUL
  266. IfStr(i) $(ProductKeyName) == $(!NTN_RegBase)
  267. Debug-Output $(InfName)": Cannot configure the EtherWORKS 3 driver software."
  268. Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  269. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  270. Debug-Output $(InfName)": ShellCode error: cannot get an error string."
  271. GoTo ShellCodeError
  272. EndIf
  273. Set Error = $($R0)
  274. Set from = end
  275. Set to = end
  276. GoTo NonFatalInfo
  277. EndIf
  278. Else
  279. Set StartLabel = InstallAdapter
  280. Set ActivateDetection = TRUE
  281. Set OEM_ABANDON_OPTIONS = {}
  282. Set OEM_ABANDON_SOFTWARE = FALSE
  283. Set OEM_ABANDON_ON = TRUE
  284. ;RASPPTP_SPECIFIC_START
  285. Set OEM_ABANDON_PPTP_SOTWARE = FALSE
  286. ;RASPPTP_SPECIFIC_END
  287. EndIf
  288. Debug-Output $(InfName)": =================================================="
  289. Debug-Output $(InfName)": STF_CWDIR is: "$(!STF_CWDIR)
  290. Debug-Output $(InfName)": STF_LANGUAGE is: "$(!STF_LANGUAGE)
  291. Debug-Output $(InfName)": Option is: "$(Option)
  292. Debug-Output $(InfName)": !STF_NCDETECT is: "$(!STF_NCDETECT)
  293. Debug-Output $(InfName)": !STF_NCOPTION is: "$(!STF_NCOPTION)
  294. Debug-Output $(InfName)": !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  295. Debug-Output $(InfName)": !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  296. Debug-Output $(InfName)": =================================================="
  297. Set DetectedCard = FALSE
  298. IfStr(i) $(ActivateDetection) != TRUE
  299. GoTo $(StartLabel)
  300. EndIf
  301. Debug-Output $(InfName)": Calling Param_SetDefaults"
  302. Shell $(ParamInf) Param_SetDefaults {}
  303. IfStr(i) $(!STF_NCDETECT) == YES
  304. IfStr(i) $(!STF_NCOPTION) == $(Option)
  305. Set DetectedCard = TRUE
  306. Debug-Output $(InfName)": Setting DetectedCard to TRUE"
  307. EndIf
  308. EndIf
  309. Shell "" DebugConfiguration "After parameter querying"
  310. Set from = FatalError
  311. Set to = FatalError
  312. GoTo $(StartLabel)
  313. ;***********************************************************************
  314. ;
  315. ;***********************************************************************
  316. InstallAdapter = +
  317. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  318. IfStr $(KeyProduct) != $(KeyNull)
  319. CloseRegKey $(KeyProduct)
  320. IfStr(i) !(NTN_RegBase) == $(ProductKeyName)
  321. Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  322. $(ProductVersion)
  323. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  324. Debug-Output $(InfName)": ShellCode error: cannot get an error string."
  325. GoTo ShellCodeError
  326. EndIf
  327. GoTo end
  328. Else
  329. Shell $(UtilityInf), CardExistedDlg
  330. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  331. Debug-Output $(InfName)": ShellCode error: cannot get an error string."
  332. GoTo ShellCodeError
  333. EndIf
  334. IfStr(i) $($R1) != "OK"
  335. Set CommonStatus = STATUS_USERCANCEL
  336. GoTo end
  337. EndIf
  338. Set OldVersionExisted = $(TRUE)
  339. EndIf
  340. EndIf
  341. Set CurrParamSettings = {}
  342. IfStr(i) $(DetectedCard) != TRUE
  343. GoTo AdapterSetup
  344. EndIf
  345. StartWait
  346. Shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
  347. EndWait
  348. IfStr(i) $($R0) != STATUS_SUCCESSFUL
  349. GoTo AdapterSetup
  350. EndIf
  351. Set DetectedParams = $($R1)
  352. Debug-Output $(InfName)": Calling Param_SetDefaults to merge detected params"
  353. Shell $(ParamInf) Param_SetDefaults $(DetectedParams)
  354. GoTo AdapterSetup
  355. ;***********************************************************************
  356. ;
  357. ;***********************************************************************
  358. ConfigureAdapter = +
  359. Read-Syms InvokeConfigureDlg$(!STF_LANGUAGE)
  360. LoadLibrary "x" $(!STF_CWDDIR)raspptpc.dll RASPPTPDLGHANDLE
  361. Debug-Output $(InfName)": Getting info from GetChassisConfiguration"
  362. Debug-Output $(InfName)": NTN_InstallMode is "$(!NTN_InstallMode)
  363. LibraryProcedure Result, $(RASPPTPDLGHANDLE), GetChassisConfiguration $(!NTN_InstallMode)
  364. Set NumberOfLineDevices = *($(Result), 1)
  365. Set AdapterNum = *($(Result), 2)
  366. FreeLibrary $(RASPPTPDLGHANDLE)
  367. ifstr(i) $(NumberOfLineDevices) != "EXITSETUP"
  368. ifstr(i) $(NumberOfLineDevices) != "RASNOCHANGE"
  369. Shell "" UpdateAddressList $(NumberOfLineDevices) $(AdapterNum) $(ProductSoftwareName) +
  370. $(TapiMediaType)
  371. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  372. Debug-Output "Cannot update address list for RAS"
  373. goto ShellCodeError
  374. endif
  375. endif
  376. Set CommonStatus = STATUS_SUCCESSFUL
  377. ; Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", +
  378. ; $(InvokeConfigureMsg)
  379. Else
  380. Set CommonStatus = STATUS_USERCANCEL
  381. EndIf
  382. goto end
  383. ;***********************************************************************
  384. ;
  385. ;***********************************************************************
  386. AdapterSetup = +
  387. Shell "" DebugConfiguration "before Param_ParameterConfidence"
  388. Shell $(ParamInf) Param_ParameterConfidence
  389. IfStr(i) $($R0) != STATUS_SUCCESSFUL
  390. Debug-Output $(InfName)": parameter confidence too low to bypass configuration"
  391. Shell "" DebugConfiguration "before AdapterOptions"
  392. GoTo AdapterOptions
  393. EndIf
  394. IfStr(i) $(DetectedCard) == TRUE
  395. IfStr(i) $(!STF_INSTALL_MODE) != CUSTOM
  396. Shell "" DebugConfiguration "before AdapterVerify"
  397. GoTo AdapterVerify
  398. EndIf
  399. EndIf
  400. ;***********************************************************************
  401. ;
  402. ;***********************************************************************
  403. AdapterOptions = +
  404. Shell "" DebugConfiguration "inside AdapterOptions"
  405. Read-Syms FileDependentDlg$(!STF_LANGUAGE)
  406. ;***********************************************************************
  407. ;
  408. ;***********************************************************************
  409. AdapterVerify = +
  410. Shell "" DebugConfiguration "inside AdapterVerify"
  411. Shell "" DebugConfiguration "after running dialog"
  412. IfStr(i) $(DetectedCard) != TRUE
  413. Shell $(ParamInf) Param_SaveValues
  414. Set NewParamSettings = $($R0)
  415. IfStr(i) $(CurrParamSettings) == {}
  416. Set DiffParamSettings = $(NewParamSettings)
  417. Else
  418. Shell $(ParamInf) Param_DiffValues $(CurrParamSettings)
  419. Set DiffParamSettings = $($R0)
  420. EndIf
  421. Debug-Output $(InfName)": Calling Param_VerifyResources"
  422. Shell $(ParamInf) Param_VerifyResources $(DiffParamSettings)
  423. IfStr(i) $($R0) == STATUS_SUCCESSFUL
  424. Debug-Output $(InfName)": Param_VerifyResources succeeded"
  425. GoTo SkipOptions
  426. EndIf
  427. Else
  428. Set CardVerifyIndex = $(!STF_NCDETCARD)
  429. Debug-Output $(InfName)": Calling Param_VerifyCard"
  430. Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
  431. IfStr(i) $($R0) == STATUS_SUCCESSFUL
  432. Debug-Output $(InfName)": Param_VerifyCard succeeded"
  433. GoTo SkipOptions
  434. EndIf
  435. EndIf
  436. Set from = AdapterOptions
  437. Set to = SkipOptions
  438. Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING
  439. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  440. Debug-Output $(InfName)": ShellCode error: cannot get an error string."
  441. GoTo ShellCodeError
  442. EndIf
  443. Set Error = $($R0)
  444. GoTo WarningMsg
  445. ;***********************************************************************
  446. ;
  447. ;***********************************************************************
  448. SkipOptions =+
  449. IfInt $(OldVersionExisted) == $(TRUE)
  450. IfStr(i) $(!NTN_InstallMode) == configure
  451. GoTo WriteParameters
  452. EndIf
  453. EndIf
  454. StartWait
  455. IfInt $(OldVersionExisted) == $(FALSE)
  456. IfStr(i) $(!NTN_InstallMode) == "install"
  457. IfStr(i) $(DoCopy) == "YES"
  458. Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  459. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  460. GoTo ShellCodeError
  461. Else-IfStr(i) $($R0) == STATUS_FAILED
  462. Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  463. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  464. GoTo ShellCodeError
  465. EndIf
  466. Set Error = $($R0)
  467. GoTo FatalError
  468. Else-IfStr(i) $($R0) == STATUS_USERCANCEL
  469. GoTo SuccessfulOption
  470. EndIf
  471. Set SrcDir = $($R1)
  472. EndIf
  473. Install "Install-Option"
  474. IfStr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  475. Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  476. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  477. GoTo ShellCodeError
  478. EndIf
  479. Set Error = $($R0)
  480. GoTo FatalError
  481. EndIf
  482. EndIf
  483. ; Add the placeholder dummy RASPPTP transport to registry
  484. Shell $(UtilityInf), InstallSoftwareProduct, $(Manufacturer),+
  485. $(ProductRASPPTPName), $(InfName)
  486. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  487. Debug-Output "InstallSoftware bombed out."
  488. goto ShellCodeError
  489. endif
  490. set RegistryErrorIndex = $($R0)
  491. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  492. Debug-Output "REGISTRY PROBLEM"
  493. CloseRegKey $($R1)
  494. CloseRegKey $($R2)
  495. goto FatalRegistry
  496. endif
  497. ;
  498. ; At this point:
  499. ; $R1 contains the product version key handle;
  500. ; $R2 contains the NetRules subkey handle;
  501. Set SoftProductKey = $($R1)
  502. Set SoftNetRuleKey = $($R2)
  503. ; set product key information in the registry
  504. set NewValueList = +
  505. {{Infname ,$(NoTitle),$(!REG_VT_SZ),$(InfName)},+
  506. {SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(ProductRASPPTPSvcType)},+
  507. {Title,$(NoTitle),$(!REG_VT_SZ), $(ProductRASPPTPTitle)},+
  508. {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductRASPPTPDescription)},+
  509. {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)},+
  510. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  511. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  512. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  513. Shell $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  514. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  515. CloseRegKey $(SoftProductKey)
  516. CloseRegKey $(SoftNetRuleKey)
  517. goto ShellCodeError
  518. endif
  519. set RegistryErrorIndex = $($R0)
  520. CloseRegKey $(SoftProductKey)
  521. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  522. CloseRegKey $(SoftNetRuleKey)
  523. goto FatalRegistry
  524. endif
  525. ; set netrules information in the registry
  526. set NewValueList = +
  527. {{class, $(NoTitle), $(!REG_VT_SZ), $(NetRuleRASPPTPClass)},+
  528. {type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleRASPPTPType)},+
  529. {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleRASPPTPUse)}, +
  530. {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}, +
  531. {Infname ,$(NoTitle),$(!REG_VT_SZ),$(InfName)}}
  532. Shell $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  533. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  534. goto ShellCodeError
  535. endif
  536. set RegistryErrorIndex = $($R0)
  537. CloseRegKey $(SoftNetRuleKey)
  538. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  539. goto FatalRegistry
  540. endif
  541. Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  542. $(ProductSoftwareName), +
  543. $(ProductSoftwareName), +
  544. $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  545. $(ProductSoftwareImagePath), "kernelautostart", "NDIS", {}, "",+
  546. $(RASPPTPMsgDLL)
  547. Set OEM_ABANDON_SOFTWARE = TRUE
  548. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  549. Debug-Output $(InfName)": ShellCode error"
  550. GoTo ShellCodeError
  551. EndIf
  552. Set RegistryErrorIndex = $($R0)
  553. Set KeyProduct = $($R1)
  554. Set SoftNetRulesKey = $($R2)
  555. CloseRegKey $($R3)
  556. CloseRegKey $($R4)
  557. CloseRegKey $($R5)
  558. IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  559. EndWait
  560. Debug-Output $(InfName)": Registry error: add software components"
  561. CloseRegKey $(KeyProduct)
  562. CloseRegKey $(SoftNetRulesKey)
  563. GoTo FatalRegistry
  564. EndIf
  565. Set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  566. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  567. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  568. {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  569. {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  570. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  571. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  572. Shell $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  573. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  574. Debug-Output $(InfName)": ShellCode error."
  575. GoTo ShellCodeError
  576. EndIf
  577. Set RegistryErrorIndex = $($R0)
  578. IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  579. EndWait
  580. Debug-Output $(InfName)": Registry error: add value list."
  581. CloseRegKey $(KeyProduct)
  582. CloseRegKey $(SoftNetRulesKey)
  583. GoTo FatalRegistry
  584. EndIf
  585. Set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  586. {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  587. {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  588. {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  589. {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(Bindable$(Option)Txt)}, +
  590. {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  591. Shell $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  592. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  593. Debug-Output $(InfName)": ShellCode error."
  594. GoTo ShellCodeError
  595. EndIf
  596. Set RegistryErrorIndex = $($R0)
  597. CloseRegKey $(KeyProduct)
  598. CloseRegKey $(SoftNetRulesKey)
  599. IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  600. EndWait
  601. Debug-Output $(InfName)": Resgitry error: add value list."
  602. GoTo FatalRegistry
  603. EndIf
  604. Shell "" AddServiceDependency $(ProductSoftwareName) $(PPTPProductSoftwareName)
  605. ;RASPPTP_SPECIFIC_START
  606. Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  607. $(PPTPProductSoftwareName), +
  608. $(PPTPProductSoftwareName), +
  609. $(PPTPProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  610. $(PPTPProductSoftwareImagePath), "kernelauto", "NDIS", {}, "",+
  611. $(RASPPTPMsgDLL)
  612. Set OEM_ABANDON_PPTP_SOFTWARE = TRUE
  613. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  614. Debug-Output $(InfName)": ShellCode error"
  615. GoTo ShellCodeError
  616. EndIf
  617. Set RegistryErrorIndex = $($R0)
  618. Set PPTPKeyProduct = $($R1)
  619. Set PPTPSoftNetRulesKey = $($R2)
  620. CloseRegKey $($R3)
  621. CloseRegKey $($R4)
  622. CloseRegKey $($R5)
  623. IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  624. EndWait
  625. Debug-Output $(InfName)": Registry error: add sman software components"
  626. CloseRegKey $(PPTPKeyProduct)
  627. CloseRegKey $(PPTPSoftNetRulesKey)
  628. GoTo FatalRegistry
  629. EndIf
  630. Set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  631. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(PPTPProductMajorVersion)},+
  632. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(PPTPProductMinorVersion)},+
  633. {Title,$(NoTitle),$(!REG_VT_SZ),$(PPTPProductSoftwareTitle)},+
  634. {Description,$(NoTitle),$(!REG_VT_SZ),$(PPTPProductSoftwareDescription)},+
  635. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(PPTPProductSoftwareName)},+
  636. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  637. Shell $(UtilityInf), AddValueList, $(PPTPKeyProduct), $(NewValueList)
  638. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  639. Debug-Output $(InfName)": ShellCode error."
  640. GoTo ShellCodeError
  641. EndIf
  642. Set RegistryErrorIndex = $($R0)
  643. IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  644. EndWait
  645. Debug-Output $(InfName)": Registry error: add value list."
  646. CloseRegKey $(PPTPKeyProduct)
  647. CloseRegKey $(PPTPSoftNetRulesKey)
  648. GoTo FatalRegistry
  649. EndIf
  650. ;RASPPTP_SPECIFIC_END
  651. EndIf
  652. Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  653. IfInt $($R4) != -1
  654. Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  655. EndIf
  656. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  657. Debug-Output $(InfName)": Cannot add hardware component"
  658. GoTo ShellCodeError
  659. EndIf
  660. Set RegistryErrorIndex = $($R0)
  661. IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  662. EndWait
  663. Debug-Output $(InfName)": Registry error: add hardware component"
  664. CloseRegKey $($R1)
  665. CloseRegKey $($R2)
  666. CloseRegKey $($R3)
  667. GoTo FatalRegistry
  668. EndIf
  669. Set KeyParameters = $($R3)
  670. Set KeyAdapterRules = $($R2)
  671. Set AdapterNumber = $($R4)
  672. Set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  673. {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  674. {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  675. {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  676. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  677. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)},+
  678. {Hidden,$(NoTitle),$(!REG_VT_DWORD),1}}
  679. Shell $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  680. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  681. Debug-Output $(InfName)": ShellCode error"
  682. GoTo ShellCodeError
  683. EndIf
  684. CloseRegKey $($R1)
  685. Set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  686. Set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  687. Set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardware$(Option)Type)},+
  688. {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  689. {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardware$(Option)Class)}, +
  690. {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  691. Shell $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  692. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  693. Debug-Output $(InfName)": ShellCode error."
  694. GoTo ShellCodeError
  695. EndIf
  696. Set RegistryErrorIndex = $($R0)
  697. IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  698. EndWait
  699. Debug-Output $(InfName)": Registry error: add value list."
  700. CloseRegKey $(KeyParameters)
  701. CloseRegKey $(KeyAdapterRules)
  702. GoTo FatalRegistry
  703. EndIf
  704. CloseRegKey $(KeyAdapterRules)
  705. ; Now, add the NetCard information to the software section.
  706. ; we use this information for deleting this netcard on removal of PPTP
  707. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  708. IfStr $(KeyProduct) != $(KeyNull)
  709. SetRegValue $(KeyProduct) {NetCard,$(NoTitle),$(!REG_VT_DWORD),$(AdapterNumber)}
  710. CloseRegKey $(KeyProduct)
  711. EndIf
  712. GoTo WriteParameters
  713. ;***********************************************************************
  714. ;
  715. ;***********************************************************************
  716. WriteParameters = +
  717. ; Since no simple arithmetic is possible, a little convulated way to create
  718. ; the address list from the number of line devices. Also configure the
  719. ; NetServer IP Addresses
  720. LoadLibrary "x" $(!STF_CWDDIR)raspptpc.dll RASPPTPDLGHANDLE
  721. Debug-Output $(InfName)": Getting info from GetChassisConfiguration"
  722. Debug-Output "!STF_UNATTENDED is "$(!STF_UNATTENDED)
  723. Debug-Output "!STF_GUI_UNATTENDED is "$(!STF_GUI_UNATTENDED)
  724. Debug-Output "!STF_UNATTENDED_SECTION is "$(!STF_UNATTENDED_SECTION)
  725. ; To support Unattended mode of installing pptp (i.e., no UI, but silent install
  726. ; unless setup encounters an error) use the following algorithm.
  727. ;
  728. ; ifstr(i) $(!STF_GUI_UNATTENDED) == YES
  729. ; then !STF_UNATTENDED contains the name of the unattended script file
  730. ; and !STF_UNATTENDED_SECTION contains the name of the section in the
  731. ; script file that we should be reading for pptp parameters.
  732. ; else
  733. ; this is an attended mode of install
  734. ; endif
  735. LibraryProcedure Result, $(RASPPTPDLGHANDLE), GetChassisConfiguration $(!NTN_InstallMode) +
  736. $(!STF_GUI_UNATTENDED) $(!STF_UNATTENDED) $(!STF_UNATTENDED_SECTION)
  737. Debug-Output $(InfName)": Result value is :"$(Result)
  738. Set NumberOfLineDevices = *($(Result), 1)
  739. FreeLibrary $(RASPPTPDLGHANDLE)
  740. ifstr(i) $(NumberOfLineDevices) == "EXITSETUP"
  741. Read-Syms InvokeCancelDlg$(!STF_LANGUAGE)
  742. Debug-Output $(InfName)": GetChassisConfiguration User selected ExitSetup"
  743. Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", $(InvokeCancelMsg)
  744. GoTo SetFailed
  745. endif
  746. Debug-Output $(InfName)": Number Of Line Devices are :"$(NumberOfLineDevices)
  747. Shell "" CreateFullTapiAddrList $(AdapterNumber)
  748. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  749. Debug-Output "Cannot create the TAPI address list"
  750. goto ShellCodeError
  751. endif
  752. Set FullTapiAddrList = $($R0)
  753. Set TapiAddressList = {}
  754. ForListDo $(FullTapiAddrList)
  755. Set CurListItem = $($)
  756. Set CurListNumber = $(#)
  757. IfInt $(CurListNumber) <= $(NumberOfLineDevices)
  758. Set TapiAddressList = >($(TapiAddressList), $(CurListItem))
  759. Endif
  760. EndForListDo
  761. Debug-Output $(InfName)": Modified Tapi Address List is :"$(TapiAddressList)
  762. Set NewValueList = {+
  763. {AddressList,$(NoTitle),$(!REG_VT_MULTI_SZ),$(TapiAddressList)},+
  764. ;{BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  765. ;{BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusType)},+
  766. {DeviceName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  767. ;{InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(InterruptNumber)},+
  768. {LineType,$(NoTitle),$(!REG_VT_DWORD),$(LineType)},+
  769. {MediaType,$(NoTitle),$(!REG_VT_SZ),$(TapiMediaType)},+
  770. ;{RamBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(RamBaseAddress)}+
  771. }
  772. Shell $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  773. CloseRegKey $(KeyParameters)
  774. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  775. Debug-Output $(InfName)": ShellCode error."
  776. GoTo ShellCodeError
  777. EndIf
  778. Set RegistryErrorIndex = $($R0)
  779. IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  780. Debug-Output $(InfName)": Registry error: Add value list"
  781. GoTo FatalRegistry
  782. EndIf
  783. ;
  784. ; Skip TAPI/RAS setup if already installed.
  785. ;
  786. IfStr(i) $(!NTN_InstallMode) == configure
  787. GoTo SuccessfulOption
  788. EndIf
  789. ; Set PPTPTcpMaxDataRetransmissions to 9 in services\tcpip\parameters
  790. OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\TcpIp\Parameters" $(MAXIMUM_ALLOWED) TcpKey
  791. IfStr(i) $(TcpKey) != ""
  792. Debug-Output $(InfName)": setting tcpip\parameters\PPTPTcpMaxDataRetransmissions to 9"
  793. SetRegValue $(TcpKey) {PPTPTcpMaxDataRetransmissions,$(NoTitle),$(!REG_VT_DWORD), 9}
  794. CloseRegKey $(TcpKey)
  795. Else
  796. Debug-Output $(InfName)": Registry error: can't open services\tcpip key"
  797. EndIf
  798. ;
  799. ; Create the SOFTWARE\Microsoft\TAPI DEVICES\RASPPTPM key
  800. ;
  801. ; This key name should be the same as the miniport driver name without the
  802. ; extension - RASPPTPM.SYS
  803. OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft" $(MAXIMUM_ALLOWED) BaseKey
  804. shell "" HtCreateRegKey $(BaseKey) "TAPI DEVICES\RASPPTPM"
  805. IfStr(i) $($R0) != NO_ERROR
  806. Debug-Output $(InfName)": Error creating registry key!"
  807. GoTo FatalRegistry
  808. EndIf
  809. Set TapiDeviceKey = $($R1)
  810. Set NewValueList = {+
  811. {Address,$(NoTitle),$(!REG_VT_MULTI_SZ),$(TapiAddressList)},+
  812. {"Media Type",$(NoTitle),$(!REG_VT_SZ),$(TapiMediaType)}}
  813. Shell $(UtilityInf), AddValueList, $(TapiDeviceKey), $(NewValueList)
  814. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  815. Debug-Output $(InfName)": ShellCode error."
  816. GoTo ShellCodeError
  817. EndIf
  818. Set RegistryErrorIndex = $($R0)
  819. IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  820. Debug-Output $(InfName)": Registry error: Add value list"
  821. GoTo FatalRegistry
  822. EndIf
  823. CloseRegKey $(TapiDeviceKey)
  824. CloseRegKey $(BaseKey)
  825. ; if TCP/IP is not installed, then shell to the TCP/IP setup INF file
  826. ; to install it only in the attended mode.
  827. ;
  828. ifstr(i) $(!STF_INSTALL_MODE) == EXPRESS
  829. GoTo InstallRas
  830. Else
  831. Shell "" InstallTCPIPIfNotInstalled $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig)
  832. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  833. Debug-Output "Cannot install TCP/IP if not already installed"
  834. goto ShellCodeError
  835. endif
  836. ifstr(i) $($R0) != STATUS_SUCCESSFUL
  837. Debug-Output "Error installing TCP/IP"
  838. set Error = "Error installing TCP/IP"
  839. goto FatalError
  840. endif
  841. ;
  842. Shell "" DebugGlobalFlags "After TCP/IP"
  843. ;
  844. EndIf
  845. InstallRas = +
  846. ; install or configure RAS only in attended mode of install
  847. ifstr(i) $(!STF_INSTALL_MODE) == EXPRESS
  848. GoTo SuccessfulOption
  849. Else
  850. ;
  851. ; if RAS is not installed, then shell ras setup INF file to install RAS
  852. ; else invoke RAS to allow user to configure RAS for RASPPTP.
  853. ;
  854. Read-Syms InvokeRasDlg$(!STF_LANGUAGE)
  855. Shell "oemnsvra.inf" CheckRasInstalled
  856. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  857. Debug-Output $(InfName)": Error Shelling the RAS INF file oemnsvra.inf"
  858. Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), +
  859. "STATUS", $(InvokeRasError)
  860. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  861. GoTo ShellCodeError
  862. EndIf
  863. GoTo RASSetup
  864. EndIf
  865. Set RasInstalled = $($R0)
  866. Debug-Output $(InfName)": Is RAS Installed? "$(RasInstalled)
  867. ;
  868. ; display a message to the user that RAS setup will now be invoked
  869. ;
  870. ; give the user a choice to say YES or NO to this query.
  871. IfStr(i) $(RasInstalled) == FALSE
  872. read-syms InvokeRasSetupDlg$(!STF_LANGUAGE)
  873. ui start "InvokeRasSetup"
  874. ifstr(i) $(DLGEVENT) == "YES"
  875. goto RASSetup
  876. else-ifstr(i) $(DLGEVENT) == "NO"
  877. GoTo SuccessfulOption
  878. endif
  879. ; Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", +
  880. ; $(InvokeRasSetupMsg)
  881. ; IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  882. ; GoTo RASSetup
  883. ; EndIf
  884. Else
  885. read-syms InvokeRasConfigDlg$(!STF_LANGUAGE)
  886. ui start "InvokeRasConfig"
  887. ifstr(i) $(DLGEVENT) == "YES"
  888. goto RASSetup
  889. else-ifstr(i) $(DLGEVENT) == "NO"
  890. GoTo SuccessfulOption
  891. endif
  892. ; Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", +
  893. ; $(InvokeRasConfigMsg)
  894. ; IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  895. ; GoTo RASSetup
  896. ; EndIf
  897. EndIf
  898. EndWait
  899. GoTo RASSetup
  900. Endif
  901. ;***********************************************************************
  902. ;
  903. ;***********************************************************************
  904. RASSetup =+
  905. ; force the copy flags to YES to allow RAS setup to copy files
  906. ; even if in config mode.
  907. Set AddCopy = YES
  908. Set DoCopy = YES
  909. Set DoConfig = YES
  910. ;
  911. ; change the global install mode flag to configure if RAS is already installed
  912. ;
  913. IfStr(i) $(RasInstalled) == TRUE
  914. Set SaveNTN_InstallMode = $(!NTN_InstallMode)
  915. Set !NTN_InstallMode = configure
  916. EndIf
  917. ; if we have already obtained the SrcDir use that instead of
  918. ; prompting the user again
  919. Set PREV_SRCDIR = $(!STF_SRCDIR_OVERRIDE)
  920. Set !STF_SRCDIR_OVERRIDE = $(SrcDir)
  921. ;
  922. ; now invoke RAS setup to do the right thing
  923. ;
  924. Shell "oemnsvra.inf" InstallOption $(!STF_LANGUAGE) "RAS" $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig)
  925. set !STF_SRCDIR_OVERRIDE = $(PREV_SRCDIR)
  926. ;
  927. ; restore the global instal mode flag if it was changed
  928. ;
  929. IfStr(i) $(RasInstalled) == TRUE
  930. Set !NTN_InstallMode = $(SaveNTN_InstallMode)
  931. EndIf
  932. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  933. Debug-Output $(InfName)": Error Shelling the RAS INF file oemnsvra.inf"
  934. Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", +
  935. $(InvokeRasError)
  936. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  937. GoTo ShellCodeError
  938. EndIf
  939. GoTo SuccessfulOption
  940. EndIf
  941. EndWait
  942. GoTo SuccessfulOption
  943. ;***********************************************************************
  944. ;
  945. ;***********************************************************************
  946. BindingAdapter =+
  947. Set Error = "Binding: Sorry, not yet implemented."
  948. GoTo FatalError
  949. ;***********************************************************************
  950. ;
  951. ;***********************************************************************
  952. RemoveAdapter = +
  953. ;RASPPTP_SPECIFIC_START
  954. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  955. IfStr $(KeyProduct) != $(KeyNull)
  956. GetRegValue $(KeyProduct),"NetCard", NetCardInfo
  957. Set NetCard = *($(NetCardInfo), 4)
  958. Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  959. $(ProductSoftwareName), $(NetworkCardKeyName)"\"$(NetCard)
  960. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  961. Debug-Output $(InfName)": ShellCode error"
  962. GoTo ShellCodeError
  963. EndIf
  964. Set RegistryErrorIndex = $($R0)
  965. IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  966. GoTo FatalRegistry
  967. EndIf
  968. EndIf
  969. Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  970. $(PPTPProductSoftwareName)
  971. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  972. Debug-Output $(InfName)": ShellCode error"
  973. GoTo ShellCodeError
  974. EndIf
  975. Set RegistryErrorIndex = $($R0)
  976. IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  977. GoTo FatalRegistry
  978. EndIf
  979. ; Remove the place holder RASPPTP transport entry
  980. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyBase) +
  981. $(MAXIMUM_ALLOWED) ProductKey
  982. Ifstr $(ProductKey) == $(KeyNull)
  983. Debug-Output "OEMNXPPP.INF: could not open Software product key"
  984. else
  985. DeleteRegTree $(ProductKey) $(ProductRASPPTPName)
  986. CloseRegKey $(ProductKey)
  987. endif
  988. ; remove the TAPI DEVICES port information
  989. OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\TAPI DEVICES" $(MAXIMUM_ALLOWED) BaseKey
  990. IfStr $(BaseKey) != $(KeyNull)
  991. DeleteRegTree $(BaseKey) $(ProductSoftwareName)
  992. EndIf
  993. ; remove PPTPTcpMaxDataRetransmissions value from services\tcpip\parameters which
  994. ; was added when PPTP was installed.
  995. OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\TcpIp\Parameters" $(MAXIMUM_ALLOWED) TcpKey
  996. IfStr(i) $(TcpKey) != ""
  997. Debug-Output $(InfName)": removing tcpip\parameters\PPTPTcpMaxDataRetransmissions value"
  998. DeleteRegValue $(TcpKey) "PPTPTcpMaxDataRetransmissions"
  999. CloseRegKey $(TcpKey)
  1000. Else
  1001. Debug-Output $(InfName)": Registry error: can't open services\tcpip key"
  1002. EndIf
  1003. ;
  1004. ; if RAS is installed, then shell ras setup INF file to allow user
  1005. ; to delete PPTP ports
  1006. ;
  1007. Read-Syms InvokeRasDlg$(!STF_LANGUAGE)
  1008. Shell "oemnsvra.inf" CheckRasInstalled
  1009. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1010. Debug-Output $(InfName)": Error Shelling the RAS INF file oemnsvra.inf"
  1011. Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), +
  1012. "STATUS", $(InvokeRasError)
  1013. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1014. GoTo ShellCodeError
  1015. EndIf
  1016. GoTo RASSetup2
  1017. EndIf
  1018. Set RasInstalled = $($R0)
  1019. Debug-Output $(InfName)": Is RAS Installed? "$(RasInstalled)
  1020. ;
  1021. ; display a message to the user that RAS setup will now be invoked
  1022. ;
  1023. IfStr(i) $(RasInstalled) == FALSE
  1024. goto end
  1025. Else
  1026. Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", +
  1027. $(InvokeRasConfigMsg2)
  1028. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1029. GoTo RASSetup2
  1030. EndIf
  1031. EndIf
  1032. EndWait
  1033. GoTo RASSetup2
  1034. ;***********************************************************************
  1035. ;
  1036. ;***********************************************************************
  1037. RASSetup2 =+
  1038. Set AddCopy = NO
  1039. Set DoCopy = NO
  1040. Set DoConfig = NO
  1041. ;
  1042. ; change the global install mode flag to configure if RAS is already installed
  1043. ;
  1044. Set SaveNTN_InstallMode = $(!NTN_InstallMode)
  1045. Set !NTN_InstallMode = configure
  1046. ;
  1047. ; now invoke RAS setup to do the right thing
  1048. ;
  1049. Shell "oemnsvra.inf" InstallOption $(!STF_LANGUAGE) "RAS" $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig)
  1050. ;
  1051. ; restore the global instal mode flag if it was changed
  1052. ;
  1053. Set !NTN_InstallMode = $(SaveNTN_InstallMode)
  1054. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1055. Debug-Output $(InfName)": Error Shelling the RAS INF file oemnsvra.inf"
  1056. Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", +
  1057. $(InvokeRasError)
  1058. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1059. GoTo ShellCodeError
  1060. EndIf
  1061. GoTo end
  1062. EndIf
  1063. ;RASPPTP_SPECIFIC_END
  1064. GoTo end
  1065. ;***********************************************************************
  1066. ;
  1067. ;***********************************************************************
  1068. UpgradeSoftware = +
  1069. Debug-Output $(InfName)": comes into 1st part of upgrade"
  1070. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  1071. IfStr $(KeyProduct) != $(KeyNull)
  1072. GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  1073. Set Version = *($(VersionInfo), 4)
  1074. Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  1075. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1076. Debug-Output $(InfName)": ShellCode error"
  1077. GoTo ShellCodeError
  1078. EndIf
  1079. Set !UG_Filename = $($R0)
  1080. IfStr(i) $(!UG_Filename) != ""
  1081. Debug-Output $(InfName)": starts to install"
  1082. install "Install-Update"
  1083. IfStr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  1084. GoTo FatalError
  1085. EndIf
  1086. EndIf
  1087. SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)}
  1088. SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)}
  1089. IfInt $(Version) != $(ProductVersion)
  1090. EndIf
  1091. CloseRegKey $(KeyProduct)
  1092. Else
  1093. GoTo FatalRegistry
  1094. EndIf
  1095. ;RASPPTPE_SPECIFIC_START
  1096. Debug-Output $(InfName)": comes into PPTPE part of upgrade"
  1097. OpenRegKey $(!REG_H_LOCAL) "" $(PPTPProductKeyName) $(MAXIMUM_ALLOWED) PPTPKeyProduct
  1098. IfStr $(PPTPKeyProduct) != $(KeyNull)
  1099. SetRegValue $(PPTPKeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(PPTPProductMajorVersion)}
  1100. SetRegValue $(PPTPKeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(PPTPProductMinorVersion)}
  1101. CloseRegKey $(PPTPKeyProduct)
  1102. Else
  1103. GoTo FatalRegistry
  1104. EndIf
  1105. ;RASPPTPE_SPECIFIC_END
  1106. ;RASPPTP_SPECIFIC_START
  1107. ;
  1108. ; This is the location that the NCPA cares about
  1109. ;
  1110. Debug-Output $(InfName)": comes into PPTP part of upgrade"
  1111. OpenRegKey $(!REG_H_LOCAL) "" $(ProductRASPPTPKeyName) $(MAXIMUM_ALLOWED) PPTPKeyProduct
  1112. IfStr $(PPTPKeyProduct) != $(KeyNull)
  1113. SetRegValue $(PPTPKeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(PPTPProductMajorVersion)}
  1114. SetRegValue $(PPTPKeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(PPTPProductMinorVersion)}
  1115. SetRegValue $(PPTPKeyProduct) {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductRASPPTPDescription)}
  1116. SetRegValue $(PPTPKeyProduct) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  1117. CloseRegKey $(PPTPKeyProduct)
  1118. Else
  1119. GoTo FatalRegistry
  1120. EndIf
  1121. ;RASPPTPE_SPECIFIC_END
  1122. GoTo end
  1123. ;***********************************************************************
  1124. ;
  1125. ;***********************************************************************
  1126. SuccessfulOption = +
  1127. GoTo end
  1128. ;***********************************************************************
  1129. ;
  1130. ;***********************************************************************
  1131. Abandon = +
  1132. ForListDo $(OEM_ABANDON_OPTIONS)
  1133. Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1134. $(ProductSoftwareName), $($)
  1135. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1136. Debug-Output $(InfName)": ShellCode error"
  1137. GoTo ShellCodeError
  1138. EndIf
  1139. Set RegistryErrorIndex = $($R0)
  1140. IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  1141. GoTo FatalRegistry
  1142. EndIf
  1143. EndForListDo
  1144. IfStr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  1145. Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1146. $(ProductSoftwareName), FALSE
  1147. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1148. Debug-Output $(InfName)": ShellCode error"
  1149. GoTo ShellCodeError
  1150. EndIf
  1151. Set RegistryErrorIndex = $($R0)
  1152. IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  1153. GoTo FatalRegistry
  1154. EndIf
  1155. EndIf
  1156. ;RASPPTP_SPECIFIC_START
  1157. IfStr(i) $(OEM_ABANDON_PPTP_SOFTWARE) == TRUE
  1158. Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1159. $(PPTPProductSoftwareName), FALSE
  1160. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1161. Debug-Output $(InfName)": ShellCode error"
  1162. GoTo ShellCodeError
  1163. EndIf
  1164. Set RegistryErrorIndex = $($R0)
  1165. IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  1166. GoTo FatalRegistry
  1167. EndIf
  1168. EndIf
  1169. ;RASPPTP_SPECIFIC_END
  1170. GoTo end
  1171. ;***********************************************************************
  1172. ;
  1173. ;***********************************************************************
  1174. WarningMsg = +
  1175. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  1176. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1177. GoTo ShellCodeError
  1178. EndIf
  1179. IfStr(i) $($R1) == "OK"
  1180. GoTo $(to)
  1181. Else-IfStr(i) $($R1) == "CANCEL"
  1182. GoTo $(from)
  1183. EndIf
  1184. GoTo end
  1185. ;***********************************************************************
  1186. ;
  1187. ;***********************************************************************
  1188. NonFatalInfo = +
  1189. Set Severity = STATUS
  1190. Set CommonStatus = STATUS_USERCANCEL
  1191. IfStr(i) $(Error) == ""
  1192. Set Severity = NONFATAL
  1193. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1194. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1195. GoTo ShellCodeError
  1196. EndIf
  1197. Set Error = $($R0)
  1198. EndIf
  1199. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  1200. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1201. GoTo ShellCodeError
  1202. EndIf
  1203. IfStr(i) $($R1) == "OK"
  1204. GoTo $(from)
  1205. EndIf
  1206. GoTo end
  1207. ;***********************************************************************
  1208. ;
  1209. ;***********************************************************************
  1210. FatalRegistry = +
  1211. Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  1212. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1213. GoTo ShellCodeError
  1214. EndIf
  1215. Set Error = $($R0)
  1216. GoTo FatalError
  1217. ;***********************************************************************
  1218. ;
  1219. ;***********************************************************************
  1220. FatalDetect = +
  1221. Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  1222. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1223. Debug-Output $(InfName)": ShellCode error: cannot get an error string."
  1224. GoTo ShellCodeError
  1225. EndIf
  1226. Set Error = $($R0)
  1227. GoTo FatalError
  1228. ;***********************************************************************
  1229. ;
  1230. ;***********************************************************************
  1231. FatalError = +
  1232. IfStr(i) $(Error) == ""
  1233. Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1234. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1235. GoTo ShellCodeError
  1236. EndIf
  1237. Set Error = $($R0)
  1238. EndIf
  1239. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1240. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1241. GoTo ShellCodeError
  1242. EndIf
  1243. GoTo SetFailed
  1244. ;***********************************************************************
  1245. ;
  1246. ;***********************************************************************
  1247. ShellCodeError = +
  1248. Set DlgType = "MessageBox"
  1249. Set STF_MB_TITLE = $(ShellCodeErrorTitle)
  1250. Set STF_MB_TEXT = $(ShellCodeErrorText)
  1251. Set STF_MB_TYPE = 1
  1252. Set STF_MB_ICON = 3
  1253. Set STF_MB_DEF = 1
  1254. UI Start "Error Message"
  1255. GoTo SetFailed
  1256. ;***********************************************************************
  1257. ;
  1258. ;***********************************************************************
  1259. SetFailed = +
  1260. Set CommonStatus = STATUS_FAILED
  1261. IfStr(i) $(OEM_ABANDON_ON) == TRUE
  1262. Set OEM_ABANDON_ON = FALSE
  1263. GoTo Abandon
  1264. EndIf
  1265. GoTo end
  1266. ;***********************************************************************
  1267. ;
  1268. ;***********************************************************************
  1269. end = +
  1270. Return $(CommonStatus)
  1271. ;***********************************************************************
  1272. ;
  1273. ;***********************************************************************
  1274. [HtCreateRegKey]
  1275. Debug-Output $(InfName)": Entering [HtCreateRegKey]"
  1276. Set ECR_Result = NO_ERROR
  1277. Set ECR_BaseKeyHandle = $($0)
  1278. Set ECR_NewPath = $($1)
  1279. Set KeyNull = ""
  1280. Set MAXIMUM_ALLOWED = 33554432
  1281. Debug-Output $(InfName)": HtCreateRegKey - ECR_BaseKeyHandle = "$(ECR_BaseKeyHandle)
  1282. Debug-Output $(InfName)": ECR_NewPath = "$(ECR_NewPath)
  1283. Debug-Output $(InfName)": MAXIMUM_ALLOWED = "$(MAXIMUM_ALLOWED)
  1284. Debug-Output $(InfName)": KeyNull = "$(KeyNull)
  1285. OpenRegKey $(ECR_BaseKeyHandle) "" $(ECR_NewPath) $(MAXIMUM_ALLOWED) +
  1286. ECR_BaseKey
  1287. Debug-Output $(InfName)": ECR_BaseKey = "$(ECR_BaseKey)
  1288. Debug-Output $(InfName)": OpenRegKey returned "$($R0)
  1289. IfStr $(ECR_BaseKey) == $(KeyNull)
  1290. Debug-Output $(InfName)": ECR_BaseKey == KeyNull"
  1291. Else
  1292. Debug-Output $(InfName)": ECR_BaseKey != KeyNull"
  1293. Set ECR_KeyHandle = $(ECR_BaseKey)
  1294. GoTo ECR_Return
  1295. EndIf
  1296. Set ECR_TmpPath = ""
  1297. Split-String $(ECR_NewPath) "\" ECR_PList
  1298. Debug-Output $(InfName)": ECR_PList = "$(ECR_PList)
  1299. ForListDo $(ECR_PList)
  1300. IfStr(i) $($) != "\"
  1301. IfInt $(#) == 1
  1302. Set ECR_TmpPath = $($)
  1303. Else
  1304. Set ECR_TmpPath = $(ECR_TmpPath)"\"$($)
  1305. EndIf
  1306. Debug-Output $(InfName)": Determining if "$(ECR_TmpPath)" exists"
  1307. OpenRegKey $(ECR_BaseKeyHandle) "" $(ECR_TmpPath) $(MAXIMUM_ALLOWED) ECR_BaseKey
  1308. IfStr $(ECR_BaseKey) == $(KeyNull)
  1309. Debug-Output $(InfName)": Creating "$(ECR_TmpPath)
  1310. CreateRegKey $(ECR_BaseKeyHandle) {$(ECR_TmpPath),0,GenericClass} "" $(MAXIMUM_ALLOWED) "" ECR_KeyHandle
  1311. IfStr(i) $(ECR_KeyHandle) == $(KeyNull)
  1312. Set ECR_Result = $($R0)
  1313. GoTo ECR_Return
  1314. EndIf
  1315. EndIf
  1316. EndIf
  1317. EndForListDo
  1318. ECR_Return = +
  1319. Return $(ECR_Result) $(ECR_KeyHandle)
  1320. ;***********************************************************************
  1321. ;
  1322. ;***********************************************************************
  1323. [InstallTCPIPIfNotInstalled]
  1324. Debug-Output $(InfName)"InstallTCPIPIfNotInstalled entry "
  1325. Debug-Output $(InfName)"!NTN_ServiceBase is "$(!NTN_ServiceBase)
  1326. set SrcDir = $($0)
  1327. set AddCopy = $($1)
  1328. set DoCopy = $($2)
  1329. set DoConfig = $($3)
  1330. Read-Syms InvokeTCPIPDlg$(!STF_LANGUAGE)
  1331. set TcpIpKeyName = $(!NTN_ServiceBase)"\TcpIp"
  1332. Set KeyNull = ""
  1333. Set status = STATUS_FAILED
  1334. Set TcpIpInstalled = FALSE
  1335. Set MAXIMUM_ALLOWED = 33554432
  1336. set Protocol = "TCPIP"
  1337. set KeyService = $(KeyNull)
  1338. set DeleteFlag = 0
  1339. set DeleteFlagInfo = {}
  1340. OpenRegKey $(!REG_H_LOCAL) "" $(TcpIpKeyName) $(MAXIMUM_ALLOWED) KeyService
  1341. Ifstr(i) $(KeyService) != $(KeyNull)
  1342. GetRegValue $(KeyService),"DeleteFlag", DeleteFlagInfo
  1343. set DeleteFlag = *($(DeleteFlagInfo), 4)
  1344. ifint $(DeleteFlag) != 1
  1345. set TcpIpInstalled = TRUE
  1346. endif
  1347. CloseRegKey $(KeyService)
  1348. endif
  1349. Debug-Output $(InfName)"TCP/IP Installed? "$(TcpIpInstalled)
  1350. Ifstr(i) $(TcpIpInstalled) == "FALSE"
  1351. Debug-Output $(InfName)"Installing TCP/IP"
  1352. Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", +
  1353. $(InvokeTCPSetupMsg)
  1354. set InvokedByRas = FALSE
  1355. ; set the !STF_SRCDIR_OVERRIDE to SrcDir so that TCP setup can
  1356. ; use this information rather than ask the user again for
  1357. ; source directory.
  1358. Debug-Output $(InfName)": resetting stf_srcdir_override flag"
  1359. Set PREV_SRCDIR = $(!STF_SRCDIR_OVERRIDE)
  1360. Set !STF_SRCDIR_OVERRIDE = $(SrcDir)
  1361. Shell "oemnxptc.inf" InstallOption $(!STF_LANGUAGE) "TC" $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig) $(InvokedByRas)
  1362. set !STF_SRCDIR_OVERRIDE = $(PREV_SRCDIR)
  1363. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1364. Debug-Output $(InfName)"SHELL ERROR! during TCP/IP installation"
  1365. Goto InstallTCPEscape
  1366. Endif
  1367. Set status = $($R0)
  1368. Ifstr(i) $(status) != STATUS_SUCCESSFUL
  1369. Ifstr(i) $(status) != STATUS_USERCANCEL
  1370. Debug-Output $(InfName)"oemnxptc.inf returned "$(status)
  1371. Goto InstallTCPEscape
  1372. Endif
  1373. Endif
  1374. Else
  1375. set status = STATUS_SUCCESSFUL
  1376. Endif
  1377. ;***********************************************************************
  1378. ;
  1379. ;***********************************************************************
  1380. InstallTCPEscape = +
  1381. set RetStatus = $(status)
  1382. return $(RetStatus)
  1383. ;RASPPTP_SPECIFIC_START
  1384. ;***********************************************************************
  1385. ;
  1386. ;***********************************************************************
  1387. [AddUSRMediaGroupToServiceGroupOrder]
  1388. Debug-Output $(InfName)": Entering [AddUSRMediaGroupToServiceGroupOrder]"
  1389. Set MAXIMUM_ALLOWED = 33554432
  1390. Set KeyNull = ""
  1391. Read-Syms SMANFileConstants
  1392. set GroupOrderName = "SYSTEM\CurrentControlSet\Control\ServiceGroupOrder"
  1393. OpenRegKey $(!REG_H_LOCAL) "" $(GroupOrderName) $(MAXIMUM_ALLOWED) KeyGroup
  1394. set OldList = {}
  1395. Ifstr(i) $(KeyGroup) != $(KeyNull)
  1396. GetRegValue $(KeyGroup) "List" TmpList
  1397. ifint $(RegLastError) == 0
  1398. ForListDo *($(TmpList), 4)
  1399. set OldList = >($(OldList), $($))
  1400. EndForListDo
  1401. endif
  1402. Debug-Output "AddUSRMediaGroupToServiceGroupOrder current list "$(OldList)
  1403. Ifcontains(i) $(PPTPGroupName) not-in $(OldList)
  1404. set NewGroupList = {}
  1405. ForListDo $(OldList)
  1406. ifstr(i) $($) == "NDIS"
  1407. set NewGroupList = >($(NewGroupList), $(PPTPGroupName))
  1408. endif
  1409. set NewGroupList = >($(NewGroupList), $($))
  1410. EndForListDo
  1411. Debug-Output "AddUSRMediaGroupToServiceGroupOrder new list "$(NewGroupList)
  1412. SetRegValue $(KeyGroup) {List, 0,$(!REG_VT_MULTI_SZ),$(NewGroupList)}
  1413. endif
  1414. CloseRegKey $(KeyGroup)
  1415. else
  1416. Debug-Output "AddUSRMediaGroupToServiceGroupOrder error opening ServiceGroupOrder key."
  1417. Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", "ServiceGroupOrder Update Failed"
  1418. endif
  1419. return
  1420. ;RASPPTP_SPECIFIC_END
  1421. ;***********************************************************************
  1422. ;
  1423. ;***********************************************************************
  1424. [UpdateAddressList]
  1425. Debug-Output $(InfName)": Entering [UpdateAddressList]"
  1426. Set NumberLineDevices = $($0)
  1427. Set AdapNum = $($1)
  1428. Set DriverName = $($2)
  1429. Set MediaType = $($3)
  1430. Set MAXIMUM_ALLOWED = 33554432
  1431. Set KeyNull = ""
  1432. Debug-Output $(InfName)": number of line devices received value "$(NumberLineDevices)
  1433. Debug-Output $(InfName)": adapter number received value "$(AdapNum)
  1434. Debug-Output $(InfName)": driver name received value "$(DriverName)
  1435. ; create the new address list
  1436. Shell "" CreateFullTapiAddrList $(AdapNum)
  1437. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1438. Debug-Output "Cannot create the new TAPI address list"
  1439. goto ShellCodeError
  1440. endif
  1441. Set NewTapiAddrList = $($R0)
  1442. Set TapiAddressList = {}
  1443. ForListDo $(NewTapiAddrList)
  1444. Set CurListItem = $($)
  1445. Set CurListNumber = $(#)
  1446. IfInt $(CurListNumber) <= $(NumberLineDevices)
  1447. Set TapiAddressList = >($(TapiAddressList), $(CurListItem))
  1448. Endif
  1449. EndForListDo
  1450. Debug-Output $(InfName)": Modified new Tapi Address List is :"$(TapiAddressList)
  1451. ;
  1452. ; delete the old value under RASPPTP driver and create new one
  1453. ;
  1454. set RASPPTPAddress = "SYSTEM\CurrentControlSet\Services\"$(DriverName)$(AdapNum)"\Parameters"
  1455. Debug-Output $(InfName)": RASPPTPAddress is "$(RASPPTPAddress)
  1456. OpenRegKey $(!REG_H_LOCAL) "" $(RASPPTPAddress) $(MAXIMUM_ALLOWED) KeyParam
  1457. Debug-Output $(InfName)": keyparam value is "$(KeyParam)
  1458. Ifstr(i) $(KeyParam) != $(KeyNull)
  1459. Debug-Output $(InfName)": entering to set usrwan2 value"
  1460. DeleteRegValue $(KeyParam) "AddressList"
  1461. SetRegValue $(KeyParam) {AddressList, 0,$(!REG_VT_MULTI_SZ),$(TapiAddressList)}
  1462. CloseRegKey $(KeyParam)
  1463. EndIf
  1464. ;
  1465. ; Create the SOFRWARE\Microsoft\TAPI DEVICES\RASPPTPM key or open it if exists
  1466. ; and set the new address value
  1467. ; This key name should be the same as the miniport driver name without the
  1468. ; extension - RASPPTPM.SYS
  1469. ;
  1470. OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft" $(MAXIMUM_ALLOWED) BaseKey
  1471. Shell "" HtCreateRegKey $(BaseKey) "TAPI DEVICES\RASPPTPM"
  1472. IfStr(i) $($R0) != NO_ERROR
  1473. Debug-Output $(InfName)": Error creating registry key!"
  1474. GoTo FatalRegistry
  1475. EndIf
  1476. Set TapiDeviceKey = $($R1)
  1477. DeleteRegValue $(TapiDeviceKey) "Address"
  1478. DeleteRegValue $(TapiDeviceKey) "Media Type"
  1479. SetRegValue $(TapiDeviceKey) {Address, 0,$(!REG_VT_MULTI_SZ),$(TapiAddressList)}
  1480. SetRegValue $(TapiDeviceKey) {"Media Type", 0,$(!REG_VT_SZ),$(MediaType)}
  1481. CloseRegKey $(TapiDeviceKey)
  1482. CloseRegKey $(BaseKey)
  1483. ; shell to RAS and invoke it
  1484. Read-Syms InvokeRasDlg$(!STF_LANGUAGE)
  1485. Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", +
  1486. $(InvokeRasConfigMsg)
  1487. Set AddCopy = YES
  1488. Set DoCopy = YES
  1489. Set DoConfig = YES
  1490. ;
  1491. ; change the global install mode flag to configure RAS since already installed
  1492. ;
  1493. Set SaveNTN_InstallMode = $(!NTN_InstallMode)
  1494. Set !NTN_InstallMode = configure
  1495. ; now invoke RAS
  1496. Shell "oemnsvra.inf" InstallOption $(!STF_LANGUAGE) "RAS" "" $(AddCopy) $(DoCopy) $(DoConfig)
  1497. ;
  1498. ; restore the global instal mode flag
  1499. ;
  1500. Set !NTN_InstallMode = $(SaveNTN_InstallMode)
  1501. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1502. Debug-Output $(InfName)": Error Shelling the RAS INF file oemnsvra.inf"
  1503. Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", +
  1504. $(InvokeRasError)
  1505. IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1506. GoTo ShellCodeError
  1507. EndIf
  1508. EndIf
  1509. EndWait
  1510. return
  1511. ;***********************************************************************
  1512. ;
  1513. ;***********************************************************************
  1514. [CreateFullTapiAddrList]
  1515. Debug-Output $(InfName)": Entering [TapiAddrList]"
  1516. Set AdapterNum = $($0)
  1517. Set FullTapiAddrList = {$(AdapterNum)"-1-0", $(AdapterNum)"-2-0", $(AdapterNum)"-3-0", +
  1518. $(AdapterNum)"-4-0", $(AdapterNum)"-5-0", $(AdapterNum)"-6-0", +
  1519. $(AdapterNum)"-7-0", $(AdapterNum)"-8-0", $(AdapterNum)"-9-0", +
  1520. $(AdapterNum)"-10-0", $(AdapterNum)"-11-0", $(AdapterNum)"-12-0", +
  1521. $(AdapterNum)"-13-0", $(AdapterNum)"-14-0", $(AdapterNum)"-15-0", +
  1522. $(AdapterNum)"-16-0", $(AdapterNum)"-17-0", $(AdapterNum)"-18-0", +
  1523. $(AdapterNum)"-19-0", $(AdapterNum)"-20-0", $(AdapterNum)"-21-0", +
  1524. $(AdapterNum)"-22-0", $(AdapterNum)"-23-0", $(AdapterNum)"-24-0", +
  1525. $(AdapterNum)"-25-0", $(AdapterNum)"-26-0", $(AdapterNum)"-27-0", +
  1526. $(AdapterNum)"-28-0", $(AdapterNum)"-29-0", $(AdapterNum)"-30-0", +
  1527. $(AdapterNum)"-31-0", $(AdapterNum)"-32-0", $(AdapterNum)"-33-0", +
  1528. $(AdapterNum)"-34-0", $(AdapterNum)"-35-0", $(AdapterNum)"-36-0", +
  1529. $(AdapterNum)"-37-0", $(AdapterNum)"-38-0", $(AdapterNum)"-39-0", +
  1530. $(AdapterNum)"-40-0", $(AdapterNum)"-41-0", $(AdapterNum)"-42-0", +
  1531. $(AdapterNum)"-43-0", $(AdapterNum)"-44-0", $(AdapterNum)"-45-0", +
  1532. $(AdapterNum)"-46-0", $(AdapterNum)"-47-0", $(AdapterNum)"-48-0", +
  1533. $(AdapterNum)"-49-0", $(AdapterNum)"-50-0", $(AdapterNum)"-51-0", +
  1534. $(AdapterNum)"-52-0", $(AdapterNum)"-53-0", $(AdapterNum)"-54-0", +
  1535. $(AdapterNum)"-55-0", $(AdapterNum)"-56-0", $(AdapterNum)"-57-0", +
  1536. $(AdapterNum)"-58-0", $(AdapterNum)"-59-0", $(AdapterNum)"-60-0", +
  1537. $(AdapterNum)"-61-0", $(AdapterNum)"-62-0", $(AdapterNum)"-63-0", +
  1538. $(AdapterNum)"-64-0", $(AdapterNum)"-65-0", $(AdapterNum)"-66-0", +
  1539. $(AdapterNum)"-67-0", $(AdapterNum)"-68-0", $(AdapterNum)"-69-0", +
  1540. $(AdapterNum)"-70-0", $(AdapterNum)"-71-0", $(AdapterNum)"-72-0", +
  1541. $(AdapterNum)"-73-0", $(AdapterNum)"-74-0", $(AdapterNum)"-75-0", +
  1542. $(AdapterNum)"-76-0", $(AdapterNum)"-77-0", $(AdapterNum)"-78-0", +
  1543. $(AdapterNum)"-79-0", $(AdapterNum)"-80-0", $(AdapterNum)"-81-0", +
  1544. $(AdapterNum)"-82-0", $(AdapterNum)"-83-0", $(AdapterNum)"-84-0", +
  1545. $(AdapterNum)"-85-0", $(AdapterNum)"-86-0", $(AdapterNum)"-87-0", +
  1546. $(AdapterNum)"-88-0", $(AdapterNum)"-89-0", $(AdapterNum)"-90-0", +
  1547. $(AdapterNum)"-91-0", $(AdapterNum)"-92-0", $(AdapterNum)"-93-0", +
  1548. $(AdapterNum)"-94-0", $(AdapterNum)"-95-0", $(AdapterNum)"-96-0", +
  1549. $(AdapterNum)"-97-0", $(AdapterNum)"-98-0", $(AdapterNum)"-99-0", +
  1550. $(AdapterNum)"-100-0", $(AdapterNum)"-101-0", $(AdapterNum)"-102-0", +
  1551. $(AdapterNum)"-103-0", $(AdapterNum)"-104-0", $(AdapterNum)"-105-0", +
  1552. $(AdapterNum)"-106-0", $(AdapterNum)"-107-0", $(AdapterNum)"-108-0", +
  1553. $(AdapterNum)"-109-0", $(AdapterNum)"-110-0", $(AdapterNum)"-111-0", +
  1554. $(AdapterNum)"-112-0", $(AdapterNum)"-113-0", $(AdapterNum)"-114-0", $(AdapterNum)"-115-0", +
  1555. $(AdapterNum)"-116-0", $(AdapterNum)"-117-0", $(AdapterNum)"-118-0", +
  1556. $(AdapterNum)"-119-0", $(AdapterNum)"-120-0", $(AdapterNum)"-121-0", +
  1557. $(AdapterNum)"-122-0", $(AdapterNum)"-123-0", $(AdapterNum)"-124-0", +
  1558. $(AdapterNum)"-125-0", $(AdapterNum)"-126-0", $(AdapterNum)"-127-0", +
  1559. $(AdapterNum)"-128-0", $(AdapterNum)"-129-0", $(AdapterNum)"-130-0", +
  1560. $(AdapterNum)"-131-0", $(AdapterNum)"-132-0", $(AdapterNum)"-133-0", +
  1561. $(AdapterNum)"-134-0", $(AdapterNum)"-135-0", $(AdapterNum)"-136-0", +
  1562. $(AdapterNum)"-137-0", $(AdapterNum)"-138-0", $(AdapterNum)"-139-0", +
  1563. $(AdapterNum)"-140-0", $(AdapterNum)"-141-0", $(AdapterNum)"-142-0", +
  1564. $(AdapterNum)"-143-0", $(AdapterNum)"-144-0", $(AdapterNum)"-145-0", +
  1565. $(AdapterNum)"-146-0", $(AdapterNum)"-147-0", $(AdapterNum)"-148-0", +
  1566. $(AdapterNum)"-149-0", $(AdapterNum)"-150-0", $(AdapterNum)"-151-0", +
  1567. $(AdapterNum)"-152-0", $(AdapterNum)"-153-0", $(AdapterNum)"-154-0", +
  1568. $(AdapterNum)"-155-0", $(AdapterNum)"-156-0", $(AdapterNum)"-157-0", +
  1569. $(AdapterNum)"-158-0", $(AdapterNum)"-159-0", $(AdapterNum)"-160-0", +
  1570. $(AdapterNum)"-161-0", $(AdapterNum)"-162-0", $(AdapterNum)"-163-0", +
  1571. $(AdapterNum)"-164-0", $(AdapterNum)"-165-0", $(AdapterNum)"-166-0", +
  1572. $(AdapterNum)"-167-0", $(AdapterNum)"-168-0", $(AdapterNum)"-169-0", +
  1573. $(AdapterNum)"-170-0", $(AdapterNum)"-171-0", $(AdapterNum)"-172-0", +
  1574. $(AdapterNum)"-173-0", $(AdapterNum)"-174-0", $(AdapterNum)"-175-0", +
  1575. $(AdapterNum)"-176-0", $(AdapterNum)"-177-0", $(AdapterNum)"-178-0", +
  1576. $(AdapterNum)"-179-0", $(AdapterNum)"-180-0", $(AdapterNum)"-181-0", +
  1577. $(AdapterNum)"-182-0", $(AdapterNum)"-183-0", $(AdapterNum)"-184-0", +
  1578. $(AdapterNum)"-185-0", $(AdapterNum)"-186-0", $(AdapterNum)"-187-0", +
  1579. $(AdapterNum)"-188-0", $(AdapterNum)"-189-0", $(AdapterNum)"-190-0", +
  1580. $(AdapterNum)"-191-0", $(AdapterNum)"-192-0", $(AdapterNum)"-193-0", +
  1581. $(AdapterNum)"-194-0", $(AdapterNum)"-195-0", $(AdapterNum)"-196-0", +
  1582. $(AdapterNum)"-197-0", $(AdapterNum)"-198-0", $(AdapterNum)"-199-0", +
  1583. $(AdapterNum)"-200-0", $(AdapterNum)"-201-0", $(AdapterNum)"-202-0", +
  1584. $(AdapterNum)"-203-0", $(AdapterNum)"-204-0", $(AdapterNum)"-205-0", +
  1585. $(AdapterNum)"-206-0", $(AdapterNum)"-207-0", $(AdapterNum)"-208-0", +
  1586. $(AdapterNum)"-209-0", $(AdapterNum)"-210-0", $(AdapterNum)"-211-0", +
  1587. $(AdapterNum)"-212-0", $(AdapterNum)"-213-0", $(AdapterNum)"-214-0", $(AdapterNum)"-215-0", +
  1588. $(AdapterNum)"-216-0", $(AdapterNum)"-217-0", $(AdapterNum)"-218-0", +
  1589. $(AdapterNum)"-219-0", $(AdapterNum)"-220-0", $(AdapterNum)"-221-0", +
  1590. $(AdapterNum)"-222-0", $(AdapterNum)"-223-0", $(AdapterNum)"-224-0", +
  1591. $(AdapterNum)"-225-0", $(AdapterNum)"-226-0", $(AdapterNum)"-227-0", +
  1592. $(AdapterNum)"-228-0", $(AdapterNum)"-229-0", $(AdapterNum)"-230-0", +
  1593. $(AdapterNum)"-231-0", $(AdapterNum)"-232-0", $(AdapterNum)"-233-0", +
  1594. $(AdapterNum)"-234-0", $(AdapterNum)"-235-0", $(AdapterNum)"-236-0", +
  1595. $(AdapterNum)"-237-0", $(AdapterNum)"-238-0", $(AdapterNum)"-239-0", +
  1596. $(AdapterNum)"-240-0", $(AdapterNum)"-241-0", $(AdapterNum)"-242-0", +
  1597. $(AdapterNum)"-243-0", $(AdapterNum)"-244-0", $(AdapterNum)"-245-0", +
  1598. $(AdapterNum)"-246-0", $(AdapterNum)"-247-0", $(AdapterNum)"-248-0", +
  1599. $(AdapterNum)"-249-0", $(AdapterNum)"-250-0", $(AdapterNum)"-251-0", +
  1600. $(AdapterNum)"-252-0", $(AdapterNum)"-253-0", $(AdapterNum)"-254-0", +
  1601. $(AdapterNum)"-255-0", $(AdapterNum)"-256-0"}
  1602. return $(FullTapiAddrList)
  1603. [AddServiceDependency]
  1604. ; This routine adds the service dependency
  1605. ; Input: $($0) is the dependent service
  1606. ; $($1) is the service $($0) depends on
  1607. Debug-Output "AddServiceDependency: entry"
  1608. set MAXIMUM_ALLOWED = 33554432
  1609. set SERVICE_NO_CHANGE = 4294967295
  1610. set Status = STATUS_FAILED
  1611. Set KeyNull = ""
  1612. set DependentService = $(!NTN_ServiceBase)\$($0)
  1613. set DependentName = $($0)
  1614. set DependOn = $($1)
  1615. set ServiceKey = $(KeyNull)
  1616. OpenRegKey $(!REG_H_LOCAL) "" $(DependentService)"\Linkage" $(MAXIMUM_ALLOWED) ServiceKey
  1617. ifstr(i) $(ServiceKey) != $(KeyNull)
  1618. GetRegValue $(ServiceKey) "OtherDependencies" ServicesList
  1619. ifint $(RegLastError) != 0
  1620. set ServiceValues = {}
  1621. else
  1622. set ServiceValues = *($(ServicesList),4)
  1623. endif
  1624. debug-output "AddServiceDependency: Old OtherDependencies: "$(ServiceValues)
  1625. ifstr(i) $(ServiceValues) == {}
  1626. Set ServiceValues = {$(DependOn)}
  1627. else-ifstr(i) $(ServiceValues) == ""
  1628. Set ServiceValues = {$(DependOn)}
  1629. else-ifcontains(i) $(DependOn) in $(ServiceValues)
  1630. ; It is already there!! something is wrong, but it doesn't matter
  1631. return STATUS_SUCCESSFUL
  1632. else
  1633. ; Add to the dependcy list
  1634. Set ServiceValues = >($(ServiceValues), $(DependOn))
  1635. endif
  1636. debug-output "AddServiceDependency: New OtherDependencies: "$(ServiceValues)
  1637. SetRegValue $(ServiceKey) {OtherDependencies, 0,+
  1638. $(!REG_VT_MULTI_SZ), $(ServiceValues)}
  1639. CloseRegKey $(ServiceKey)
  1640. set Status = STATUS_SUCCESSFUL
  1641. else
  1642. Debug-Output "AddServiceDependency: error opening service "$(DependentService)"\Linkage"
  1643. endif
  1644. set KeyService = $(KeyNull)
  1645. OpenRegKey $(!REG_H_LOCAL) "" $(DependentService) $(MAXIMUM_ALLOWED) KeyService
  1646. ifstr $(KeyService) != $(KeyNull)
  1647. set newDependList = {$(DependOn)}
  1648. GetRegValue $(KeyService) "DependOnService" ServiceList
  1649. ifint $(RegLastError) == 0
  1650. Debug-Output "AddServiceDependency: old DependOnService List "*($(ServiceList), 4)
  1651. ForListDo *($(ServiceList),4)
  1652. ifstr(i) $($) != $(DependOn)
  1653. set newDependList = >($(newDependList), $($))
  1654. endif
  1655. EndForListDo
  1656. endif
  1657. GetRegValue $(KeyService) "DependOnGroup" GrpList
  1658. ifint $(RegLastError) == 0
  1659. Debug-Output "AddServiceDependency: old DependOnGroup List "*($(GrpList), 4)
  1660. ForListDo *($(GrpList),4)
  1661. set grp = "+"$($)
  1662. set newDependList = >($(newDependList), $(grp))
  1663. EndForListDo
  1664. endif
  1665. Debug-Output "OEMNSVRA.INF: AddServiceDependency: new Dependency List "$(newDependList)
  1666. LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, $(DependentName) $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), $(SERVICE_NO_CHANGE), "", "", $(newDependList), "", "", ""
  1667. CloseRegKey $(KeyService)
  1668. else
  1669. Debug-Output "AddServiceDependency: failed to open service linkage key"$(DependentService)
  1670. endif
  1671. Debug-Output "AddServiceDependency: exit"
  1672. return $(Status)
  1673. ;***********************************************************************
  1674. ;
  1675. ;***********************************************************************
  1676. [DebugConfiguration]
  1677. Debug-Output $(!p:InfName)": **CONFIGURATION STATE: "$($0)
  1678. Debug-Output $(!p:InfName)": InterruptNumber is "$(!p:InterruptNumber)
  1679. Debug-Output $(!p:InfName)": RamBaseAddress is "$(!p:RamBaseAddress)
  1680. Return
  1681. ;***********************************************************************
  1682. ;
  1683. ;***********************************************************************
  1684. [DebugGlobalFlags]
  1685. Debug-Output $(InfName)": **CONFIGURATION STATE: "$($0)
  1686. Debug-Output $(InfName)": !STF_SRCDIR_USED value is "$(!STF_SRCDIR_USED)
  1687. Debug-Output $(InfName)": !STF_SRCDIR_KEYED value is "$(!STF_SRCDIR_KEYED)
  1688. Debug-Output $(InfName)": !STF_SRCDIR_OVERRIDE value is "$(!STF_SRCDIR_OVERRIDE)
  1689. Return
  1690. ;***********************************************************************
  1691. ;
  1692. ;***********************************************************************
  1693. [Install-Option]
  1694. Set STF_VITAL = ""
  1695. IfStr(i) $(AddCopy) == "YES"
  1696. AddSectionFilesToCopyList Files-RASPPTPDLL $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1697. ;RASPPTP_SPECIFIC_START
  1698. AddSectionFilesToCopyList Files-RASPPTPDRV $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1699. ;RASPPTP_SPECIFIC_END
  1700. EndIf
  1701. IfStr(i) $(DoCopy) == "YES"
  1702. Set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1703. CopyFilesInCopyList
  1704. Else
  1705. LibraryProcedure STATUS, $(!NCPA_HANDLE), CopySingleFile $(!STF_HWND) $(SrcDir)\RASPPTPC.DLL $(!STF_WINDOWSSYSPATH)\RASPPTPC.DLL
  1706. EndIf
  1707. Exit
  1708. ;***********************************************************************
  1709. ;
  1710. ;***********************************************************************
  1711. [Install-Update]
  1712. Set STF_VITAL = ""
  1713. Set STF_OVERWRITE = "VERIFYSOURCEOLDER"
  1714. AddSectionFilesToCopyList Files-RASPPTPDLL $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1715. ;RASPPTP_SPECIFIC_START
  1716. AddSectionFilesToCopyList Files-RASPPTPDRV $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1717. ;RASPPTP_SPECIFIC_END
  1718. Set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1719. CopyFilesInCopyList
  1720. Exit