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.

10489 lines
394 KiB

  1. ;***********************************************************************
  2. ;
  3. ; OEMNSVRA.INF
  4. ;
  5. ; NT Routing & Remote Access Service (RAS) Network Setup INF file.
  6. ;
  7. ; This file is derived from the main RAS setup INF file.
  8. ;
  9. ; Modification History:
  10. ;
  11. ; 11-June-96 RamC Changed all instance of STATUS_NO_EFFECT to
  12. ; STATUS_USERCANCEL.
  13. ; 17-July-95 MikeMi System is not a valid SoftwareType,
  14. ; changed to service
  15. ; 01-Aug-92 Ram Cherala Created
  16. ;
  17. ; NOTE: Please don't randomly change the order of the program or the
  18. ; function calls (Shell commands). A lot depends on the order
  19. ; in which the functions are called.
  20. ;
  21. ;-----------------------------------------------------------------------
  22. ; OPTION TYPE
  23. ; -----------
  24. ; This identifies the Option type we are dealing with.
  25. ;
  26. ; NetAdapter, a netcard / transport combination or just a netcard
  27. ; NetDriver, just a netcard driver
  28. ; NetTransport, a complete NDIS-compliant TDI transport stack
  29. ; NetService, an NT networking service
  30. ; NetWork, a complete network ensemble.
  31. ; NetProvider a complete network which supports NT MPR protocol
  32. ;-----------------------------------------------------------------------
  33. [Identification]
  34. OptionType = NetService
  35. [Options]
  36. RAS
  37. [GeneralConstants]
  38. ;
  39. ; Constants to support the use of checkbox dialogs
  40. Chosen = "ON"
  41. NotChosen = "OFF"
  42. TRUE = 1
  43. FALSE = 0
  44. NoTitle = 0
  45. ; set this value to 0 to disable debug output during setup
  46. FLibraryErrCtl = 1
  47. OldVersionExisted = FALSE
  48. [FileConstants]
  49. HandleNull = ""
  50. PORTSDLGHANDLE = $(HandleNull)
  51. RasServerOption = "Server"
  52. RasClientOption = "Client"
  53. RasAdminOption = "Admin"
  54. RasClientAndServerOption = "ClientAndServer"
  55. ; flag that indicates if the proxy service wspsrv is installed
  56. !PROXY_INSTALLED = FALSE
  57. ROUTER_TYPE_RAS = 1
  58. ROUTER_TYPE_LAN = 2
  59. ROUTER_TYPE_WAN = 4
  60. ; Product Info
  61. !Manufacturer = "Microsoft"
  62. !ProductMajorVersion = "4"
  63. !ProductMinorVersion = "0"
  64. ProductVersion = $(!ProductMajorVersion)"."$(!ProductMinorVersion)
  65. ; ProductOpSupport = 134 ; 0x0086 ; Display,Removable,Properties,Not Updatable
  66. ; BUGBUG temporarily enable update so that ITG and others can update the router binaries
  67. ProductOpSupport = 135 ; 0x0087 ; Display,Removable,Properties,Updatable
  68. ; EventLog Message File
  69. NetEventDLL = "%SystemRoot%\System32\netevent.dll"
  70. IoLogMsgDll = "%SystemRoot%\System32\drivers\IoLogMsg.dll"
  71. !RouterMsgDll = "%SystemRoot%\System32\mprmsg.dll"
  72. ; 0x1f (31) allows audit success/failure events to be filtered in the
  73. ; event viewer
  74. !RasEventTypeSupported = 31
  75. RouterEventTypeSupported = 31
  76. ; this variable is used to hide the selected component so that it is
  77. ; not displayed in the list of software/hardware installed by NCPA
  78. ; set this to any value other than 0 to hide the component
  79. ; set it to 0 to disable hiding.
  80. !HideComponent = 1
  81. ; this variable is used to hide the selected component from appearing
  82. ; in the bindings list. We want to hide the ndiswan and asyncmac bindings
  83. ; so that the user cannot disable them. This variable can take value
  84. ; 16 for hiding bindings and 32 for disabling reordering of bindings.
  85. ; HideBindings = 16
  86. ; it has been decided not to hide the bindings afterall, so it shall
  87. ; be written, and so it shall be done!!
  88. HideBindings = 0
  89. ; set this flag to 1 to force NCPA to call our inf file for review bindings
  90. fReviewBindings = 1
  91. !RasInfName = "OEMNSVRA.INF"
  92. ; !STF_CWDDIR is the directory from where this INF file was invoked & is
  93. ; set by NT setup (or NCPA) as the case may be.
  94. ProductFullInfName = $(!STF_CWDDIR)$(!RasInfName)
  95. RasDir = $(!STF_CWDDIR)RAS
  96. ProductPath = $(RasDir)"\"
  97. ; Remote Access Service Software data
  98. ProductRASName = "RAS"
  99. ProductRASImagePath = "%SystemRoot%\system32\ras"
  100. ProductRASSvcType = "service"
  101. NetRuleRASClass = "classRasService ""basic"""
  102. NetRuleRASType = "RasService classRasService"
  103. NetRuleRASUse = "system"
  104. !ProductPCIMACName = "PCIMAC"
  105. ; RAS Server Software data
  106. ProductRASSVRName = "RemoteAccess"
  107. ProductRASSVRImagePath = "%SystemRoot%\system32\mprouter.exe"
  108. ProductRASSVRSvcType = "service"
  109. NetRuleRASSVRClass = "classRasServer ""basic"""
  110. NetRuleRASSVRType = "RasServer classRasServer"
  111. NetRuleRASSVRUse = $(ProductRASSVRSvcType)
  112. NetRuleRASSVRBindForm = """RasServer"" yes yes container"
  113. ; we provide the bindable rule below to enable rassvr to bind to all
  114. ; netbios transports. doing this enables an admin to selectively disable
  115. ; bindings from the NCPA to disallow client access to particular nets.
  116. ; setup, enumerates the bound lanas and provides the non-ras lanas to
  117. ; the rasserver as available lannets.
  118. NetRuleRASSVRBindable = {"classRasServer netBiosTransport non non 100",+
  119. "classRasServer ipxTransport non non 100"}
  120. ; Router registry values
  121. ; the product name is RemoteAccess and not RasServer because we want to
  122. ; be compatible with down level RAS software - i.e. ability to say
  123. ; "net start remoteaccess"
  124. ProductROUTINGName = "Router"
  125. ProductROUTINGImagePath = "%SystemRoot%\system32\mprouter.exe"
  126. ProductROUTINGSvcType = "service"
  127. NetRuleROUTINGClass = "classRasServer ""basic"""
  128. NetRuleROUTINGType = "RasServer classRasServer"
  129. NetRuleROUTINGUse = $(ProductROUTINGSvcType)
  130. NetRuleROUTINGBindForm = """RasServer"" yes yes container"
  131. ; we provide the bindable rule below to enable rassvr to bind to all
  132. ; netbios transports. doing this enables an admin to selectively disable
  133. ; bindings from the NCPA to disallow client access to particular nets.
  134. ; setup, enumerates the bound lanas and provides the non-ras lanas to
  135. ; the rasserver as available lannets.
  136. NetRuleROUTINGBindable = {"classRouter netBiosTransport non non 100",+
  137. "classRouter ipxTransport non non 100"}
  138. PROTO_IP = 33
  139. PROTO_IPX = 43
  140. ; RAS Manager Software data
  141. ProductRASMANName = "RasMan"
  142. ProductRASMANImagePath = "%SystemRoot%\system32\mprouter.exe"
  143. ProductRASMANSvcType = "service"
  144. NetRuleRASMANClass = "classRasManager ""basic"""
  145. NetRuleRASMANType = "RasManager classRasManager"
  146. NetRuleRASMANUse = $(ProductRASMANSvcType)
  147. NetRuleRASMANBindForm = """RasManager"" yes no container"
  148. NetRuleRASMANBindable = ""
  149. ; service data
  150. !ProductRASARPName = "RasArp"
  151. !ProductRASARPImagePath = "\SystemRoot\system32\drivers\rasarp.sys"
  152. !ProductWANARPName = "WanArp"
  153. !ProductWANARPImagePath = "\SystemRoot\system32\drivers\wanarp.sys"
  154. !ProductIPFLTName = "IPFilterDriver"
  155. !ProductIPFLTImagePath = "\SystemRoot\system32\drivers\ipfltdrv.sys"
  156. !ProductIPXPINGName = "IpxPing"
  157. !ProductIPXPINGImagePath = "%SystemRoot%\system32\mprouter.exe"
  158. !ProductNWLNKFWDName = "NwLnkFwd"
  159. !ProductNWLNKFWDImagePath = "\SystemRoot\system32\drivers\nwlnkfwd.sys"
  160. !ProductNWLNKFLTName = "NwLnkFlt"
  161. !ProductNWLNKFLTImagePath = "\SystemRoot\system32\drivers\nwlnkflt.sys"
  162. ; NWLNKRIP AND SAP service data
  163. !ProductRASISNRIPName = "NwlnkRip"
  164. !ProductRASISNSAPName = "NwSapAgent"
  165. !ProductRASISNRIPImagePath = "\SystemRoot\system32\drivers\nwlnkrip.sys"
  166. !ProductRASISNSAPImagePath = "%SystemRoot%\system32\services.exe"
  167. ; RAS Autodial Software data
  168. !ProductRASAUTODIALName = "RasAuto"
  169. !ProductRASAUTODIALImagePath = "%SystemRoot%\system32\mprouter.exe"
  170. !ProductRASAUTODIALSvcType = "service"
  171. ; RAS acd driver data
  172. !ProductRASACDName = "RasAcd"
  173. !ProductRASACDImagePath = "\SystemRoot\system32\drivers\rasacd.sys"
  174. ; NDISWAN Software data
  175. !ProductNDISWANName = "NdisWan"
  176. !ProductNDISWANImagePath = "\SystemRoot\system32\drivers\ndiswan.sys"
  177. ProductNDISWANSvcType = "kernel"
  178. ProductNDISWANType = "transport"
  179. !NetRuleNDISWANType = "ndisWanDrv ndisWanTransport"
  180. !NetRuleNDISWANClass = {"ndisWanTransport basic"}
  181. NetRuleNDISWANUse = $(ProductNDISWANType)" yes yes"
  182. !NetRuleNDISWANBindForm = """NdisWan"" yes no container"
  183. ; the following variable is global because it is used in the
  184. ; UpdateNdisWanInfo routine during ras upgrade.
  185. !NetRuleNDISWANBindable = +
  186. {"rasCapableTransport ndisWanAdapterDialIn non non 100",+
  187. "rasCapableTransport ndisWanAdapterDialOut non non 100",+
  188. "tcpipTransport ndisWanAdapterDialInIP non non 100",+
  189. "tcpipTransport ndisWanAdapterDialOutIP non non 100",+
  190. "netbtTransport ndisWanAdapterDialInIP non non 100",+
  191. "netbtTransport ndisWanAdapterDialOutIP non non 100",+
  192. "ipxTransport ndisWanAdapterDialInOutIPX non non 100",+
  193. "bhService ndisWanAdapterBH non non 100",+
  194. "ndisWanTransport ndisWanAdapterBH non non 100",+
  195. "ndisWanTransport ndisWanAdapterDialIn non non 100",+
  196. "ndisWanTransport ndisWanAdapterDialOut non non 100",+
  197. "ndisWanTransport ndisWanAdapterDialInIP non non 100",+
  198. "ndisWanTransport ndisWanAdapterDialOutIP non non 100",+
  199. "ndisWanTransport ndisWanAdapterDialInOutIPX non non 100"}
  200. ; RAS Asymac Software data
  201. ProductRASASYMACName = "AsyncMac"
  202. ProductRASASYMACImagePath = "\SystemRoot\system32\drivers\asyncmac.sys"
  203. ProductRASASYMACType = "driver"
  204. ProductRASASYMACSvcType = "kernel"
  205. NetRuleRASASYMACType = "rasAsyMacDrv rasAsyMacDriver"
  206. NetRuleRASASYMACClass = {"rasAsyMacDriver basic"}
  207. NetRuleRASASYMACUse = $(ProductRASASYMACType)
  208. NetRuleRASASYMACBindForm = """RasAsyMac"" yes no container"
  209. !NetRuleRASASYMACBindable = +
  210. {"rasAsyMacDriver rasAsyMacAdapter non non 100"}
  211. ;
  212. ; NDISWAN adapter data - we separate the two cases of dialin and dialout
  213. ; adapters corresponding to dialin/out ports
  214. !ProductRASHUBDIALINName = "RasHubDialin"
  215. !ProductRASHUBDIALOUTName = "RasHubDialout"
  216. !ProductRASHUBDIALINIPName = "RasHubDialinIp"
  217. !ProductRASHUBDIALOUTIPName = "RasHubDialoutIp"
  218. !ProductRASHUBDIALINOUTIPXName = "RasHubDialinoutIpx"
  219. !ProductNDISWANDIALINName = "NdisWanDialin"
  220. !ProductNDISWANDIALOUTName = "NdisWanDialout"
  221. !ProductNDISWANDIALINIPName = "NdisWanDialinIp"
  222. !ProductNDISWANDIALOUTIPName = "NdisWanDialoutIp"
  223. !ProductNDISWANDIALINOUTIPXName = "NdisWanDialinoutIpx"
  224. !NetRuleHardwareBHType = "ndisWanBH ndisWanAdapterBH"
  225. !NetRuleHardwareBHClass = {"ndisWanAdapterBH basic"}
  226. !NetRuleHardwareBHBindForm = " yes yes container"
  227. !NetRuleHardwareNDISWANBindForm = " yes yes container"
  228. !NetRuleHardwareDIALINType = "ndiswandialin ndisWanAdapterDialIn"
  229. !NetRuleHardwareDIALINClass = {"ndisWanAdapterDialIn basic"}
  230. !NetRuleHardwareDIALINBlock = {"lanmanServer ndisWanAdapterDialIn",+
  231. "tcpipTransport ndisWanAdapterDialIn",+
  232. "netbtTransport ndisWanAdapterDialIn",+
  233. "ipxTransport ndisWanAdapterDialin",+
  234. "lanmanWorkstation ndisWanAdapterDialIn"}
  235. !NetRuleHardwareDIALINIPType = "ndiswandialinIP ndisWanAdapterDialInIP"
  236. !NetRuleHardwareDIALINIPClass = {"ndisWanAdapterDialInIP basic"}
  237. !NetRuleHardwareDIALINIPBlock = {"lanmanServer ndisWanAdapterDialInIP",+
  238. "nbfTransport ndisWanAdapterDialinIP",+
  239. "ipxTransport ndisWanAdapterDialinIP",+
  240. "lanmanWorkstation ndisWanAdapterDialInIP"}
  241. !NetRuleHardwareDIALOUTType = "ndiswandialout ndisWanAdapterDialOut"
  242. !NetRuleHardwareDIALOUTClass = {"ndisWanAdapterDialOut basic"}
  243. !NetRuleHardwareDIALOUTBlock = {"ipxTransport ndisWanAdapterDialOut"}
  244. !NetRuleHardwareDIALOUTIPType = "ndiswandialoutIP ndisWanAdapterDialOutIP"
  245. !NetRuleHardwareDIALOUTIPClass = {"ndisWanAdapterDialOutIP basic"}
  246. !NetRuleHardwareDIALOUTIPBlock = {"ipxTransport ndisWanAdapterDialOutIP",+
  247. "nbfTransport ndisWanAdapterDialOutIP"}
  248. !NetRuleHardwareDIALINOUTIPXType = "ndiswandialinoutIPX ndisWanAdapterDialInOutIPX"
  249. !NetRuleHardwareDIALINOUTIPXClass = {"ndisWanAdapterDialInOutIPX basic"}
  250. !NetRuleHardwareDIALINOUTIPXBlock = {"nbfTransport ndisWanAdapterDialInOutIPX",+
  251. "tcpipTransport ndisWanAdapterDialInOutIPX",+
  252. "netbtTransport ndisWanAdapterDialInOutIPX"}
  253. ; RAS Asymac adapter data
  254. NetRuleHardwareRASASYMACType = "rasAsyMac rasAsyMacAdapter"
  255. NetRuleHardwareRASASYMACBindForm = " yes yes container"
  256. NetRuleHardwareRASASYMACClass = {"rasAsyMacAdapter basic"}
  257. ; NDIS TAPI device information
  258. !ProductNDISTAPIName = "NdisTapi"
  259. !ProductNDISTAPIImagePath = "\SystemRoot\system32\drivers\ndistapi.sys"
  260. ; Performance data
  261. !RasPerfKeyName = "Performance"
  262. !RasPerfLibraryName = "rasctrs.dll"
  263. !RasPerfOpenFunction = "OpenRasPerformanceData"
  264. !RasPerfCloseFunction = "CloseRasPerformanceData"
  265. !RasPerfCollectFunction = "CollectRasPerformanceData"
  266. !RasCounterFileName = "rasctrs.ini"
  267. ;
  268. ; Registry Key
  269. ProductKeyBase = $(!NTN_SoftwareBase)"\"$(!Manufacturer)
  270. ProductKeyName = $(!NTN_SoftwareBase)"\"$(!Manufacturer)"\"$(ProductRASName)"\CurrentVersion"
  271. ProductRouterName = $(!NTN_SoftwareBase)"\"$(!Manufacturer)"\"$(ProductROUTINGName)"\CurrentVersion"
  272. !NetworkCardKeyName = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards"
  273. RasSvrKeyName = $(!NTN_ServiceBase)"\"$(ProductRASSVRName)
  274. !RouterKeyName = $(!NTN_ServiceBase)"\"$(ProductROUTINGName)
  275. RasSvrParamKeyName = $(!NTN_ServiceBase)"\"$(ProductRASSVRName)"\Parameters"
  276. !RasManSvcKeyName = $(!NTN_ServiceBase)"\"$(ProductRASMANName)
  277. !RasAcdKeyName = $(!NTN_ServiceBase)"\"$(!ProductRASACDName)
  278. !RasArpKeyName = $(!NTN_ServiceBase)"\"$(!ProductRASARPName)
  279. !RasIsnRipKeyName = $(!NTN_ServiceBase)"\"$(!ProductRASISNRIPName)
  280. !RasIsnSapKeyName = $(!NTN_ServiceBase)"\"$(!ProductRASISNSAPName)
  281. !NdisTapiKeyName = $(!NTN_ServiceBase)"\"$(!ProductNDISTAPIName)
  282. !RasManKeyName = $(!NTN_SoftwareBase)"\"$(!Manufacturer)"\"$(ProductRASMANName)"\CurrentVersion"
  283. !RasAutodialKeyName = $(!NTN_ServiceBase)"\"$(!ProductRASAUTODIALName)
  284. RasManParamKeyName = $(!NTN_ServiceBase)"\"$(ProductRASMANName)"\Parameters"
  285. RasManLinkageKeyName = $(!NTN_ServiceBase)"\"$(ProductRASMANName)"\Linkage"
  286. NdisWanParamKeyName = $(!NTN_ServiceBase)"\"$(!ProductNDISWANName)"\Parameters"
  287. NdisWanLinkageKeyName = $(!NTN_ServiceBase)"\"$(!ProductNDISWANName)"\Linkage"
  288. RasAsyMacKeyName = $(!NTN_ServiceBase)"\"$(ProductRASASYMACName)
  289. RasAsyMacParamKeyName = $(!NTN_ServiceBase)"\"$(ProductRASASYMACName)"\Parameters"
  290. RasMacLinkageKeyName = $(!NTN_ServiceBase)"\"$(ProductRASASYMACName)"\Linkage"
  291. RasTapiDevicesKeyName = $(!NTN_SoftwareBase)"\"$(!Manufacturer)"\"$(ProductRASName)"\TAPI DEVICES"
  292. LinkageKeyName = $(!NTN_ServiceBase)"\"$(Product$(Option)Name)"\Linkage"
  293. !ProductNDISWANKeyName = $(!NTN_SoftwareBase)"\"$(!Manufacturer)"\"$(!ProductNDISWANName)"\CurrentVersion"
  294. ProductRASASYMACKeyName = $(!NTN_SoftwareBase)"\"$(!Manufacturer)"\"$(ProductRASASYMACName)"\CurrentVersion"
  295. RasProtocolsKeyName = $(!NTN_SoftwareBase)"\"$(!Manufacturer)"\"$(ProductRASName)"\PROTOCOLS"
  296. ; File names, etc.
  297. !UtilityInf = "UTILITY.INF"
  298. subroutninf = "SUBROUTN.INF"
  299. RascfgDll = "RASCFG.DLL"
  300. Exit_Code = 0
  301. ShellCode = 0
  302. ; Program flow control variables.
  303. from = ""
  304. to = ""
  305. ; Return codes; Exit_Code is set to one of these
  306. ExitCodeOk = 0
  307. ExitCodeCancel = 1
  308. ExitCodeFatal = 2
  309. KeyNull = ""
  310. !MAXIMUM_ALLOWED = 33554432
  311. !SERVICE_NO_CHANGE = 4294967295
  312. !SERVICE_SHARE_INTERACT = 288
  313. RegistryErrorIndex = NO_ERROR
  314. ; size in bytes of various components
  315. ServerSize = 820116
  316. ClientSize = 634260
  317. AdminSize = 513962
  318. ; Default installation options
  319. FInstallServer = $(Chosen)
  320. FInstallClient = $(Chosen)
  321. FInstallAdmin = $(Chosen)
  322. RoutingKeyList = ^(RoutingKeys, 1)
  323. RoutingValueList = ^(RoutingKeys, 2)
  324. [RoutingKeys]
  325. ; Router registry values
  326. Name, "Router"
  327. ImagePath, "%SystemRoot%\system32\mprouter.exe"
  328. SvcType, "service"
  329. Class, "classRouter ""basic"""
  330. Type, "Router classRouter"
  331. Use, "service"
  332. BindForm, """Router"" yes yes container"
  333. ; we provide the bindable rule below to enable rassvr to bind to all
  334. ; netbios transports. doing this enables an admin to selectively disable
  335. ; bindings from the NCPA to disallow client access to particular nets.
  336. ; setup, enumerates the bound lanas and provides the non-ras lanas to
  337. ; the rasserver as available lannets.
  338. Bindable, {"classRouter netBiosTransport non non 100",+
  339. "classRouter ipxTransport non non 100"}
  340. MsgDll, "%SystemRoot%\System32\mprmsg.dll"
  341. ; 0x1f (31) allows audit success/failure events to be filtered in the
  342. ; event viewer
  343. EventType, 31
  344. [UiVars]
  345. ;
  346. ; Destination Drive Particulars
  347. VolumeList = {} ? $(!LIBHANDLE) GetHardDriveLetters
  348. VolumeFreeList = {} ? $(!LIBHANDLE) GetHardDriveFreeSpace
  349. VolumeFSList = {} ? $(!LIBHANDLE) GetHardDriveFileSystems
  350. DestVolume = ""
  351. MinHelpID = 25000
  352. MaxHelpID = 25999
  353. [SystemVars]
  354. ; these need to be defined by us when the setup.exe is used to invoke
  355. ; the .inf file
  356. !STF_PROCESSOR = "" ? $(!LIBHANDLE) GetProcessor
  357. !STF_PLATFORM = "" ? $(!LIBHANDLE) GetPlatform
  358. !STF_WINDOWSPATH = "" ? $(!LIBHANDLE) GetWindowsNtDir
  359. !STF_NTPATH = $(!STF_WINDOWSPATH)
  360. !STF_WINDOWSSYSPATH = "" ? $(!LIBHANDLE) GetWindowsNtSysDir
  361. !STF_COMPUTERNAME = "" ? $(!LIBHANDLE) GetMyComputerName
  362. !STF_USERNAME = "" ? $(!LIBHANDLE) GetMyUserName
  363. !STF_FLOPPYLIST = {} ? $(!LIBHANDLE) GetFloppyDriveLetters
  364. !STF_UNUSEDDRIVES = {} ? $(!LIBHANDLE) GetUnusedDrives
  365. !STF_LANGUAGE = "" ? $(!LIBHANDLE) GetLanguage
  366. !STF_BUSTYPE = "" ? $(!LIBHANDLE) GetMyBusType
  367. !STF_BUSTYPELIST = "" ? $(!LIBHANDLE) GetMyBusTypeList
  368. !NTN_SoftwareBase = "Software"
  369. !NTN_ServiceBase = "System\CurrentControlSet\Services"
  370. !NTN_ScUseRegistry = "NO"
  371. [AvailableSystemMemory]
  372. SystemMemory = "" ? $(!LIBHANDLE) GetMemorySize
  373. MinSystemMemory = 2048
  374. [date]
  375. ; CurrentDate is a list which contains { Sec from 1-1-1970, Year, Month, Day, Hour,
  376. ; Minute, Second }
  377. !CurrentDate = {} ? $(!LIBHANDLE) GetSystemDate
  378. [HelpContextIDs]
  379. ; these IDs are based on the HC_UI_RASMAC_BASE defined in
  380. ; uimsg.h in the BLT common\h directory. portscfg.h uses
  381. ; some of the IDs starting from 25000, so make sure if you
  382. ; change these IDs there is no overlap.
  383. HC_RASOPTIONS = 25020
  384. HC_CLIENTACCESS = 25021
  385. HC_INSTALLOVER1 = 25022
  386. HC_INSTALLOVER2 = 25023
  387. ;---------------------------------------------------------------------------
  388. ; 1. Identify
  389. ;
  390. ; DESCRIPTION: To verify that this INF deals with the same type of options
  391. ; as we are choosing currently.
  392. ;
  393. ; INPUT: None
  394. ;
  395. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL
  396. ; $($R1): Option Type (COMPUTER ...)
  397. ; $($R2): Diskette description
  398. ;---------------------------------------------------------------------------
  399. [Identify]
  400. ;
  401. ;
  402. read-syms Identification
  403. set Status = STATUS_SUCCESSFUL
  404. set Identifier = $(OptionType)
  405. set Media = #("Source Media Descriptions", 1, 1)
  406. Return $(Status) $(Identifier) $(Media)
  407. ;------------------------------------------------------------------------
  408. ; 2. ReturnOptions:
  409. ;
  410. ; DESCRIPTION: To return the option list supported by this INF and the
  411. ; localised text list representing the options.
  412. ;
  413. ;
  414. ; INPUT: $($0): Language used. ( ENG | FRN | ... )
  415. ;
  416. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
  417. ; STATUS_NOLANGUAGE
  418. ; STATUS_FAILED
  419. ;
  420. ; $($R1): Option List
  421. ; $($R2): Option Text List
  422. ;------------------------------------------------------------------------
  423. [ReturnOptions]
  424. ;
  425. ;
  426. set Status = STATUS_FAILED
  427. set OptionList = {}
  428. set OptionTextList = {}
  429. ;
  430. ; Check if the language requested is supported
  431. ;
  432. set LanguageList = ^(LanguagesSupported, 1)
  433. Ifcontains(i) $($0) in $(LanguageList)
  434. goto returnoptions
  435. Else
  436. set Status = STATUS_NOLANGUAGE
  437. goto finish_ReturnOptions
  438. Endif
  439. ;
  440. ; form a list of all the options and another of the text representing
  441. ;
  442. returnoptions = +
  443. set OptionList = ^(Options, 1)
  444. set OptionTextList = ^(OptionsText$($0), 1)
  445. set Status = STATUS_SUCCESSFUL
  446. finish_ReturnOptions = +
  447. Return $(Status) $(OptionList) $(OptionTextList)
  448. ;***********************************************************************
  449. ; SETUP INVOCATION SECTION
  450. ;***********************************************************************
  451. ;------------------------------------------------------------------------
  452. ;
  453. ; Shell Commands:
  454. ;
  455. ; This section is shelled to by main setup program
  456. ; The invoking application passes the RasInstallMode environmental
  457. ; variable set to either "install" or "configure"
  458. ;
  459. [Shell Commands]
  460. set Exit_Code = $(!STF_ERROR_GENERAL)
  461. LoadLibrary "x" $(!STF_SRCDIR)\setupdll.dll !LIBHANDLE
  462. LoadLibrary "x" $(!STF_SRCDIR)\ncpa.cpl !NCPA_HANDLE
  463. ifstr(i) $(!LIBHANDLE) == ""
  464. Debug-Output "OEMNSVRA.INF: unable to load setupdll.dll"
  465. Shell subroutn.inf, SetupMessage $(!STF_LANGUAGE) "FATAL" $(UnableToLoadSetupdll)
  466. set Exit_Code = STATUS_USERCANCEL
  467. exit
  468. endif
  469. ifstr(i) $(!NCPA_HANDLE) == ""
  470. Debug-Output "OEMNSVRA.INF: unable to load ncpa.cpl"
  471. Shell subroutn.inf, SetupMessage $(!STF_LANGUAGE) "FATAL" $(UnableToLoadNcpaCpl)
  472. set Exit_Code = STATUS_USERCANCEL
  473. exit
  474. endif
  475. ifstr(i) $(RAS_INSTALL_MODE) == ""
  476. set RAS_INSTALL_MODE = install
  477. endif
  478. read-syms SystemVars
  479. detect SystemVars
  480. read-syms RasErrors$(!STF_LANGUAGE)
  481. OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\ProductOptions" 33554432 KeyProductOption
  482. ifstr(i) $(KeyProductOption) != ""
  483. GetRegValue $(KeyProductOption) "ProductType" ProductTypeList
  484. set TempProductType = *($(ProductTypeList),4)
  485. ifstr(i) $(TempProductType) == "winnt"
  486. set !STF_PRODUCT = WINNT
  487. else-ifstr(i) $(TempProductType) == "lanmannt"
  488. set !STF_PRODUCT = LANMANNT
  489. else-ifstr(i) $(TempProductType) == "servernt"
  490. set !STF_PRODUCT = SERVERNT
  491. else
  492. Debug-Output "OEMNSVRA.INF: invalid Product Type "$(TempProductType)
  493. Shell subroutn.inf, SetupMessage $(!STF_LANGUAGE) "FATAL" $(UnknownProductType)
  494. set Exit_Code = STATUS_USERCANCEL
  495. exit
  496. endif
  497. CloseRegKey $(KeyProductOptions)
  498. else
  499. Debug-Output "OEMNSVRA.INF: unable to determine Product Type "
  500. Shell subroutn.inf, SetupMessage $(!STF_LANGUAGE) "FATAL" $(NoProductType)
  501. set Exit_Code = STATUS_USERCANCEL
  502. exit
  503. endif
  504. Debug-Output "OEMNSVRA.INF: Product Type "$(!STF_PRODUCT)
  505. ifstr(i) $(RAS_INSTALL_MODE) != "install"
  506. ifstr(i) $(RAS_INSTALL_MODE) != "configure"
  507. ifstr(i) $(RAS_INSTALL_MODE) != "deinstall"
  508. Debug-Output "OEMNSVRA.INF: Invalid RAS_INSTALL_MODE "$(RAS_INSTALL_MODE)
  509. Shell subroutn.inf, SetupMessage $(!STF_LANGUAGE) "STATUS" $(InvalidMode)
  510. set Exit_Code = STATUS_USERCANCEL
  511. exit
  512. endif
  513. endif
  514. endif
  515. set !NTN_InstallMode = $(RAS_INSTALL_MODE)
  516. Shell "" InstallOption $(!STF_LANGUAGE) "RAS" $(!STF_SRCDIR) "YES" "YES" "YES"
  517. ifint $($ShellCode) != $( !SHELL_CODE_OK)
  518. Debug-Output "OEMNSVRA.INF: Failed to shell out to InstallOption"
  519. exit
  520. endif
  521. set Exit_Code = $($R0)
  522. ; set the Exit_Code so that rasphone.exe can determine if bindings
  523. ; should be called or not
  524. ifstr(i) $($R0) == STATUS_SUCCESSFUL
  525. set Exit_Code = 1
  526. endif
  527. Debug-Output "OEMNSVRA.INF: install returned "$($R0)
  528. FreeLibrary $(!LIBHANDLE)
  529. FreeLibrary $(!NCPA_HANDLE)
  530. exit
  531. ;***********************************************************************
  532. ; SETUP (NTLANMAN) INVOCATION SECTION
  533. ;***********************************************************************
  534. ;------------------------------------------------------------------------
  535. ;
  536. ; InstallOption:
  537. ;
  538. ; This section is shelled to by main installation processing.
  539. ;
  540. ;
  541. ; FUNCTION: To copy files representing Options
  542. ; To configure the installed option
  543. ; To update the registry for the installed option
  544. ;
  545. ; INPUT: $($0): Language to use
  546. ; $($1): OptionID to install
  547. ; $($2): SourceDirectory
  548. ; $($3): AddCopy (YES | NO)
  549. ; $($4): DoCopy (YES | NO)
  550. ; $($5): DoConfig (YES | NO)
  551. ;
  552. ; OUTPUT: $($R0): STATUS: STATUS_SUCCESSFUL |
  553. ; STATUS_NOLANGUAGE |
  554. ; STATUS_USERCANCEL |
  555. ; STATUS_FAILED
  556. ;
  557. ;------------------------------------------------------------------------
  558. [InstallOption]
  559. Debug-Output "In InstallOption section"
  560. ; Set default values for
  561. set Status = STATUS_FAILED
  562. ; extract parameters
  563. set Option = $($1)
  564. set SourceDir = $($2)
  565. set AddCopy = $($3)
  566. set DoCopy = $($4)
  567. set DoConfig = $($5)
  568. ; ; note that some legacy .inf files invoke this .inf file with the
  569. ; ; old option RAS. We silently convert this to the new option "ROUTING"
  570. ;
  571. ; ifstr(i) $(Option) == "RAS"
  572. ; set Option = "ROUTING"
  573. ; endif
  574. ;
  575. ; Check if the language requested is supported
  576. ;
  577. set LanguageList = ^(LanguagesSupported, 1)
  578. Ifcontains(i) $($0) NOT-IN $(LanguageList)
  579. Return STATUS_NOLANGUAGE
  580. endif
  581. StartWait
  582. ; define all the constants
  583. set-subst LF = "\n"
  584. ; read the UI variables and detect their setttings on the local machine
  585. read-syms UiVars
  586. detect UiVars
  587. set !STF_NTPATH = $(!STF_WINDOWSSYSPATH)
  588. GetDriveInPath !STF_NTDRIVE $(!STF_WINDOWSSYSPATH)
  589. read-syms GeneralConstants
  590. read-syms FileConstants
  591. read-syms DialogConstants$(!STF_LANGUAGE)
  592. read-syms FileConstants$(!STF_LANGUAGE)
  593. ; read the error messages section
  594. read-syms RasErrors$(!STF_LANGUAGE)
  595. detect date
  596. detect version
  597. ; set the help file
  598. read-syms HelpContextIDs
  599. SetHelpFile $(!STF_CWDDIR)rassetup.hlp $(MinHelpID) $(MaxHelpID)
  600. set-title $(FunctionTitle)
  601. set to = Begin
  602. set from = Begin
  603. ; Assume all is well.
  604. set CommonStatus = STATUS_SUCCESSFUL
  605. Debug-Output "OEMNSVRA.INF: STF_CWDDIR is: "$(!STF_CWDDIR)
  606. Debug-Output "OEMNSVRA.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  607. Debug-Output "OEMNSVRA.INF: Option is: "$(Option)
  608. Debug-Output "OEMNSVRA.INF: NTN_SoftwareBase is: "$(!NTN_SoftwareBase)
  609. Debug-Output "OEMNSVRA.INF: NTN_ServiceBase is: "$(!NTN_ServiceBase)
  610. ; this call will set !PROXY_INSTALLED flag to TRUE or FALSE
  611. ; depending on wspsrv being installed or not on the local machine
  612. Shell "" CheckProxyInstalled
  613. Debug-Output "OEMNSVRA.INF: Proxy Service installed? "$(!PROXY_INSTALLED)
  614. Begin = +
  615. set !NETCARD_LIST = {}
  616. set ServerInstalled = FALSE
  617. set ClientInstalled = FALSE
  618. set AdminInstalled = FALSE
  619. set DoServer = TRUE
  620. set DoClient = TRUE
  621. set DoAdmin = TRUE
  622. set DoServerOnly = FALSE
  623. set DoClientOnly = FALSE
  624. set DoAdminOnly = FALSE
  625. set DoRas = FALSE
  626. set DoRasSvr = FALSE
  627. set DoRouter = FALSE
  628. set DoRasMan = FALSE
  629. set DoNdisWan = FALSE
  630. set DoRasAsyMac = FALSE
  631. IfStr(i) $(!NTN_InstallMode) == deinstall
  632. Set StartLabel = RemoveRas
  633. else-Ifstr(i) $(!NTN_InstallMode) == Update
  634. set StartLabel = UpgradeRas
  635. else-Ifstr(i) $(!NTN_InstallMode) == configure
  636. set StartLabel = ConfigureRas
  637. else-Ifstr(i) $(!NTN_InstallMode) == bind
  638. set StartLabel = BindingsRas
  639. else
  640. set StartLabel = InstallRas
  641. endif
  642. set from = Begin
  643. set to = end
  644. goto $(StartLabel)
  645. ;;;;;;;;;;;;;;;;; INSTALL RAS BEGINS ;;;;;;;;;;;;;;;;;;;;;;
  646. InstallRas = +
  647. ; Modified on 10/1/96 by RamC
  648. ; Note that we use this .inf file to install not only the RAS services, but
  649. ; also the routing services. For the beta, this is not an upgrade, so if only
  650. ; RAS is installed, warn the user that RAS should first be removed and only
  651. ; then the "routing and ras service" be installed.
  652. StartWait
  653. Debug-Output "In InstallRas Section"
  654. Debug-Output "Origin is "$(!NTN_Origination)
  655. Debug-Output "Install Mode "$(!NTN_InstallMode)
  656. Debug-Output "Install phase "$(!NTN_InstallPhase)
  657. Debug-Output "Copy Flag is "$(DoCopy)
  658. Debug-Output "Option is "$(Option)
  659. Debug-Output "SrcDir is "$(SourceDir)
  660. Debug-Output "STF_WINDOWSPATH is "$(!STF_WINDOWSPATH)
  661. Debug-Output "Context Inf name "$(STF_CONTEXTINFNAME)
  662. Debug-Output "!STF_UNATTENDED is "$(!STF_UNATTENDED)
  663. Debug-Output "!STF_GUI_UNATTENDED is "$(!STF_GUI_UNATTENDED)
  664. Debug-Output "!STF_UNATTENDED_SECTION is "$(!STF_UNATTENDED_SECTION)
  665. Debug-Output "Proxy Service installed? "$(!PROXY_INSTALLED)
  666. ; Do not allow the user to install routing on a NT 4.0 workstation
  667. set WindowsVersion = "4.0"
  668. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion" $(!MAXIMUM_ALLOWED) KeyVersion
  669. ifstr $(KeyVersion) != $(KeyNull)
  670. GetRegValue $(KeyVersion) "CurrentVersion" CurrVersion
  671. ifint $(RegLastError) == 0
  672. set WindowsVersion = *($(CurrVersion), 4)
  673. endif
  674. else
  675. Debug-Output "Failed to open registry key "$(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion"
  676. endif
  677. Debug-Output "Windows Version is: "$(WindowsVersion)
  678. ifstr(i) $(!STF_PRODUCT) == "WINNT"
  679. ifstr(i) $(WindowsVersion) == "4.0"
  680. Shell subroutn.inf, SetupMessage $(!STF_LANGUAGE) "STATUS" $(No40WkstaInstall)
  681. set CommonStatus = STATUS_USERCANCEL
  682. goto end
  683. endif
  684. endif
  685. ; To support Unattended mode of installing RAS (i.e., no UI, but silent install
  686. ; unless setup encounters an error) use the following algorithm.
  687. ;
  688. ; ifstr(i) $(!STF_GUI_UNATTENDED) == YES
  689. ; then !STF_UNATTENDED contains the name of the unattended script file
  690. ; and !STF_UNATTENDED_SECTION contains the name of the section in the
  691. ; script file that we should be reading for RAS parameters.
  692. ; else
  693. ; this is an attended mode of install
  694. ; endif
  695. set RasComponentsList = {} ; list of components installed on the system
  696. set NumInstalled = 0 ; number of installed components
  697. ; check if the same version of RAS already exists on the system
  698. ; Modified on 10/3/96 by RamC
  699. ; Since this .inf file is now used to install Routing & Ras and for beta
  700. ; we only support a clean install of Routing, warn the user if only RAS
  701. ; is currently installed.
  702. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(!MAXIMUM_ALLOWED) KeyProduct
  703. Ifstr $(KeyProduct) != $(KeyNull)
  704. ; if this is primary mode of install, then don't complain if RAS is already
  705. ; installed (more than likely by PPTP) and is being installed again by the
  706. ; setup wizard.
  707. Ifstr(i) $(!NTN_InstallPhase) == primary
  708. set CommonStatus = STATUS_USERCANCEL
  709. goto end
  710. EndIf
  711. ; check to see if the Router service is installed
  712. ; if not, warn the user to remove RAS and other MPR components before proceeding
  713. ; with the install.
  714. OpenRegKey $(!REG_H_LOCAL) "" $(ProductRouterName) $(!MAXIMUM_ALLOWED) KeyRouter
  715. ifstr $(KeyRouter) == $(KeyNull)
  716. Shell subroutn.inf, SetupMessage $(!STF_LANGUAGE) "STATUS" $(RemoveRasFirst)
  717. set CommonStatus = STATUS_USERCANCEL
  718. goto end
  719. endif
  720. GetRegValue $(KeyProduct) "MajorVersion" VersionInfo
  721. set VersionMajor = *($(VersionInfo), 4)
  722. GetRegValue $(KeyProduct) "MinorVersion" VersionInfo
  723. set VersionMinor = *($(VersionInfo), 4)
  724. set InstalledVersion = $(VersionMajor)"."$(VersionMinor)
  725. ; Remove RAS and reinstall it -
  726. ifstr(i) $(ProductVersion) != $(InstalledVersion)
  727. Shell "" QueryRasUpgrade $(ProductRASTitle) $(InstalledVersion) +
  728. $(ProductVersion)
  729. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  730. goto ShellCodeError
  731. endif
  732. Ifstr(i) $($R1) == "OK"
  733. set from = InstallRas
  734. set to = InstallRas1
  735. goto RemoveRas
  736. else
  737. goto end
  738. endif
  739. endif
  740. shell "" QueryComponentsInstalled $(ProductKeyName)
  741. Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  742. Set RasComponentsList = $($R1)
  743. Set InstalledFlags = $($R2)
  744. Set ServerInstalled = *($(InstalledFlags),1)
  745. Set ClientInstalled = *($(InstalledFlags),2)
  746. Set AdminInstalled = *($(InstalledFlags),3)
  747. Endif
  748. Debug-Output "Installed List is "$(RasComponentsList)
  749. Debug-Output "Installed Flags is "$(InstalledFlags)
  750. QueryListSize NumInstalled $(RasComponentsList)
  751. ; the 3 components we install are server, client and admin
  752. ifint $(NumInstalled) != 0
  753. goto PortsConfigure
  754. ; read-syms VerExists$(!STF_LANGUAGE)
  755. ; set Text = $(Product$(Option)Title)$(Ver)$(ProductVersion)+
  756. ; $(Text1)
  757. ; Shell $(subroutninf), SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(Text)
  758. ; Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  759. ; Goto fatal
  760. ; Else-Ifstr(i) $($R0) == STATUS_FAILED
  761. ; Goto fatal
  762. ; Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  763. ; Goto end
  764. ; Endif
  765. ; Set CommonStatus = STATUS_USERCANCEL
  766. ; goto end
  767. endif
  768. CloseRegKey $(KeyProduct)
  769. else
  770. ; fRemoveRas indicates to setup that RAS should be removed on failure
  771. ; during setup. We want this to happen only on first time install.
  772. InstallRas1 =+
  773. set fRemoveRas = TRUE
  774. endif
  775. goto memorycheck
  776. setupabort = +
  777. read-syms SetupAbortDlg$(!STF_LANGUAGE)
  778. ui start "SetupAbort"
  779. ifstr(i) $(DLGEVENT) == "CONTINUE"
  780. ui pop 1
  781. Exit
  782. else
  783. ui pop 1
  784. Exit
  785. endif
  786. memorycheck = +
  787. read-syms AvailableSystemMemory
  788. detect AvailableSystemMemory
  789. Debug-Output "Available Memory is "$(SystemMemory)
  790. IfInt $(SystemMemory) < $(MinSystemMemory)
  791. read-syms FatalErrorMem$(!STF_LANGUAGE)
  792. shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "FATAL" $(Fatal)
  793. goto setupabort
  794. Else
  795. ; goto InstallNetwork
  796. goto CopyResources
  797. EndIf
  798. ; Modified on 10/13/96 - looks like nothing is going on here
  799. ;InstallNetwork =+
  800. ;
  801. ; ; Check if workstation is installed.
  802. ;
  803. ; ifstr(i) $(DoServer) == FALSE
  804. ; ifstr(i) $(DoClient) == FALSE
  805. ; goto CopyResources
  806. ; endif
  807. ; endif
  808. ;
  809. ; goto CopyResources
  810. CopyResources = +
  811. ; if it is a primary install then YES at the end of DoAskSource ensures
  812. ; that the user is not prompted.
  813. ifstr(i) $(!NTN_InstallMode) == "install"
  814. Ifstr(i) $(DoCopy) == "YES"
  815. Shell $(!UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SourceDir) YES
  816. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  817. Goto ShellCodeError
  818. Else-Ifstr(i) $($R0) == STATUS_FAILED
  819. Shell $(!UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  820. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  821. goto ShellCodeError
  822. endif
  823. set Error = $($R0)
  824. goto fatal
  825. Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  826. Goto end
  827. Endif
  828. Set !STF_SRCDIR = $($R1)
  829. Set SourceDir = $($R1)
  830. Debug-Output "SrcDir "$(SourceDir)
  831. endif
  832. ; Check to see if the snmp service is running.
  833. ; tell the user that the service has to be stoped for the files
  834. ; to be copied
  835. ; we need to first make sure that the files we need are present
  836. ; in the system32 directory. We attempt to copy any missing files
  837. ; and then check to make sure these files are present before
  838. ; attempting to load rascfg.dll
  839. forlistdo {"RTRCFG.DLL", "RASMXS.DLL", "RASFIL32.DLL", "IPXADMIN.DLL", "MPRAPI.DLL", "MPRFILTR.DLL"}
  840. LibraryProcedure STATUS, $(!LIBHANDLE), CheckFileExistance $(!STF_WINDOWSSYSPATH)"\"$($)
  841. ifstr(i) $(STATUS) == NO
  842. LibraryProcedure STATUS, $(!NCPA_HANDLE), CopySingleFile $(!STF_HWND) +
  843. $(SourceDir)"\"$($) $(!STF_WINDOWSSYSPATH)"\"$($)
  844. endif
  845. endforlistdo
  846. ; always copy rascfg.dll because CheckSnmpRunning is a new entry point
  847. ; which is not present in the rascfg.dll that is already in the system32
  848. ; directory - copied during textmode setup
  849. LibraryProcedure STATUS, $(!NCPA_HANDLE), CopySingleFile +
  850. $(!STF_HWND) $(SourceDir)"\RASCFG.DLL" $(!STF_WINDOWSSYSPATH)"\RASCFG.DLL"
  851. Shell "" AreRequiredDllsPresent
  852. ifstr(i) $($R0) != STATUS_SUCCESSFUL
  853. set MissingFiles = $($R1)
  854. set ErrorLoadingConfigDll = $(ErrorLoadingConfigDll)" "$(MissingFiles)
  855. shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "STATUS" $(ErrorLoadingConfigDll)
  856. set CommonStatus = STATUS_USERCANCEL
  857. goto end
  858. endif
  859. set PORTSDLGHANDLE = $(HandleNull)
  860. LoadLibrary "x" $(!STF_WINDOWSSYSPATH)"\rascfg.dll" PORTSDLGHANDLE
  861. LibraryProcedure Result, $(PORTSDLGHANDLE), CheckSnmpRunning
  862. Debug-Output "Result of CheckSnmpRunning "$(Result)
  863. ifstr(i) $(PORTSDLGHANDLE) != $(HandleNull)
  864. Debug-Output "Unloading RASCFG.DLL"
  865. FreeLibrary $(PORTSDLGHANDLE)
  866. endif
  867. set PORTSDLGHANDLE = $(HandleNull)
  868. ifstr(i) *($(Result),1) == "RUNNING"
  869. shell $(subroutninf) SetupMessage $(!STF_LANGUAGE) "STATUS" $(ErrorSnmpRunning)
  870. Set CommonStatus = STATUS_USERCANCEL
  871. goto end
  872. endif
  873. ifstr(i) *($(Result),1) == "RUNNING"
  874. shell $(subroutninf) SetupMessage $(!STF_LANGUAGE) "STATUS" $(ErrorSnmpRunning)
  875. Set CommonStatus = STATUS_USERCANCEL
  876. goto end
  877. endif
  878. Debug-Output "OEMNSVRA.INF: Copying files"
  879. Install InstallResources
  880. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  881. goto filecopycancel
  882. endif
  883. install InstallRasFiles
  884. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  885. goto filecopycancel
  886. endif
  887. endif
  888. StartWait
  889. ; AdminOnly corresponds now to Lan routing only and we definitely
  890. ; need to invoke ports configuration to get the proper information
  891. ; ifstr(i) $(DoAdminOnly) == TRUE
  892. ; goto CommonCode
  893. ; endif
  894. goto PortsConfigure
  895. ;;;;;;;;;;;;;;;;;; CONFIGURE RAS BEGINS!!! ;;;;;;;;;;;;;;;;;
  896. ConfigureRas = +
  897. ; indicate that RAS was installed before
  898. set OldVersionExisted = TRUE
  899. ; find out what was originally installed
  900. read-syms StatusDeterminingConfig$(!STF_LANGUAGE)
  901. shell $(subroutninf) PushBillBoard NETSTATUSDLG $(ReadingConfig)
  902. Set BillboardVisible = 1
  903. StartWait
  904. shell "" QueryComponentsInstalled $(ProductKeyName)
  905. Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  906. Set InstalledComps = $($R1)
  907. Set InstalledFlags = $($R2)
  908. Set DoServer = *($(InstalledFlags),1)
  909. Set DoClient = *($(InstalledFlags),2)
  910. Set DoAdmin = *($(InstalledFlags),3)
  911. Set DoServerOnly = *($(InstalledFlags),4)
  912. Set DoClientOnly = *($(InstalledFlags),5)
  913. Set DoAdminOnly = *($(InstalledFlags),6)
  914. Endif
  915. Set ServerInstalled = $(DoServer)
  916. Set ClientInstalled = $(DoClient)
  917. Set AdminInstalled = $(DoAdmin)
  918. Debug-Output "DoServer "$(DoServer)
  919. Debug-Output "DoClient "$(DoClient)
  920. Debug-Output "DoAdmin "$(DoAdmin)
  921. Debug-Output "DoServerOnly "$(DoServerOnly)
  922. Debug-Output "DoClientOnly "$(DoClientOnly)
  923. Debug-Output "DoAdminOnly "$(DoAdminOnly)
  924. ifstr(i) $(DoAdminOnly) == TRUE
  925. read-syms NoConfigLAN$(!STF_LANGUAGE)
  926. shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "STATUS" $(NoConfigLanRouting)
  927. set CommonStatus = STATUS_USERCANCEL
  928. goto end
  929. endif
  930. goto PortsConfigure
  931. PortsConfigure = +
  932. StartWait
  933. Shell "" AreRequiredDllsPresent
  934. ifstr(i) $($R0) != STATUS_SUCCESSFUL
  935. set MissingFiles = $($R1)
  936. set ErrorLoadingConfigDll = $(ErrorLoadingConfigDll)" "$(MissingFiles)
  937. shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "STATUS" $(ErrorLoadingConfigDll)
  938. set CommonStatus = STATUS_USERCANCEL
  939. goto end
  940. endif
  941. LoadLibrary "x" $(!STF_CWDDIR)rascfg.dll PORTSDLGHANDLE
  942. read-syms StatusDeterminingConfig$(!STF_LANGUAGE)
  943. shell $(subroutninf) PushBillBoard NETSTATUSDLG $(ReadingConfig)
  944. Set BillboardVisible = 1
  945. set Result = {}
  946. ; determine if the LanmanWorkstation is bound to any netcard and pass
  947. ; this information to the RasPortsConfig library procedure.
  948. ; This is used for setting the Netbios gateway information and to
  949. ; determine if the network connection restore checkbox should be checked.
  950. set fNetcardInstalled = FALSE
  951. shell "" IsNetcardInstalled
  952. ifstr(i) $($R0) == STATUS_SUCCESSFUL
  953. set fNetcardInstalled = $($R1)
  954. endif
  955. Debug-Output "fNetcardInstalled Option "$(fNetcardInstalled)
  956. CheckProtocolsInstalled =+
  957. ; determine the installed protocols and pass this information to the
  958. ; config dll
  959. shell "" QueryInstalledProtocols
  960. ifstr(i) $($R0) == STATUS_SUCCESSFUL
  961. set fNetbeuiInstalled = $($R1)
  962. set fTcpIpInstalled = $($R2)
  963. set fIpxInstalled = $($R3)
  964. else
  965. read-syms QueryInstalledProtocolsError$(!STF_LANGUAGE)
  966. shell $(subroutninf) SetupMessage $(!STF_LANGUAGE) "FATAL" $(Text)
  967. goto end
  968. endif
  969. ; call the dialog library procedure for port configuration
  970. ; the inputs to the call are
  971. ; Install mode - one of install or configure
  972. ; fNetcardInstalled - TRUE if a netcard is installed in the system, else
  973. ; FALSE
  974. ; ProductPath - SystemRoot\ras
  975. ; fNetbeuiInstalled - TRUE if Netbeui is installed, else FALSE
  976. ; fTcpIpInstalled - TRUE if TcpIp is installed, else FALSE
  977. ; fIpxInstalled - TRUE if Ipx is installed, else FALSE
  978. Ifint $(BillboardVisible) != 0
  979. Shell "subroutn.inf" PopBillboard
  980. Set BillboardVisible = 0
  981. Endif
  982. Debug-Output "!STF_UNATTENDED is "$(!STF_UNATTENDED)
  983. Debug-Output "!STF_GUI_UNATTENDED is "$(!STF_GUI_UNATTENDED)
  984. Debug-Output "!STF_UNATTENDED_SECTION is "$(!STF_UNATTENDED_SECTION)
  985. LibraryProcedure Result, $(PORTSDLGHANDLE), RasPortsConfig $(!STF_HWND) +
  986. $(!NTN_InstallMode) $(fNetcardInstalled) $(ProductPath) +
  987. $(fNetbeuiInstalled) $(fTcpIpInstalled) $(fIpxInstalled) +
  988. $(!STF_GUI_UNATTENDED) $(!STF_UNATTENDED) $(!STF_UNATTENDED_SECTION)
  989. StartWait
  990. ; now that we are back in the inf file figure out what the configuration is
  991. ; from the Result returned by the dll. Result is a list of strings.
  992. ; now that we are back in the inf file figure out what the configuration is
  993. ; from the Result returned by the dll. Result is a list of strings.
  994. set NewNumPorts = 0
  995. set NewNumTapiPorts = 0
  996. set NewNumDialoutNBF = 0
  997. set NewNumDialinNBF = 0
  998. set NewNumDialinIP = 0
  999. set NewNumDialoutIP = 0
  1000. set NewNumDialinoutIPX = 0
  1001. set fSerialInstalled = FALSE
  1002. set fUnimodemInstalled = FALSE
  1003. set fOtherInstalled = FALSE
  1004. ; are the protocols selected for dialin or dialout?
  1005. set fNetbeuiChosen = FALSE
  1006. set fTcpIpChosen = FALSE
  1007. set fIpxChosen = FALSE
  1008. ; are the protocols selected for dialout? (the naming is historical)
  1009. set fNetbeuiSelected = FALSE
  1010. set fTcpIpSelected = FALSE
  1011. set fIpxSelected = FALSE
  1012. ; are the protocols selected for dialin?
  1013. set fNetbeuiAllowed = FALSE
  1014. set fTcpIpAllowed = FALSE
  1015. set fIpxAllowed = FALSE
  1016. ; NewNumPorts is a count of serial and "OTHER" (like ether ras)
  1017. ; ports installed.
  1018. ; NewNumTapiPorts is a count ofisdn and other TAPI ports installed
  1019. set NewNumPorts = *($(Result),1)
  1020. set NewNumTapiPorts = *($(Result),2)
  1021. set NewNumPortsList = {}
  1022. set NullString = ""
  1023. Debug-Output "PortsConfigure returned: "$(Result)
  1024. Debug-Output "PortsConfigure NewNumPorts: "$(NewNumPorts)
  1025. Debug-Output "PortsConfigure NewNumTapiPorts: "$(NewNumTapiPorts)
  1026. ifstr(i) $(NewNumPorts) == "EXITSETUP"
  1027. Debug-Output "PortsConfigre User selected ExitSetup."
  1028. goto RemoveDiskFiles
  1029. else-ifstr(i) $(NewNumPorts) == "NOPORTS"
  1030. Debug-Output "PortsConfigre: No serial ports detected."
  1031. shell $(subroutninf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorNoPorts)
  1032. goto RemoveDiskFiles
  1033. else-ifstr(i) $(NewNumPorts) == "BADARGS"
  1034. Debug-Output "PortsConfigre: bad arguments to dll."
  1035. shell $(subroutninf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorBadArgs)
  1036. goto RemoveDiskFiles
  1037. else-ifstr(i) $(NewNumPorts) == "FAILURE"
  1038. Debug-Output "PortsConfigre: Unknown failure."
  1039. shell $(subroutninf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorUnknown)
  1040. goto RemoveDiskFiles
  1041. endif
  1042. goto PortsConfigure1
  1043. RemoveDiskFiles = +
  1044. ; remove ras files if user selected cancel or if there were errors during
  1045. ; install.
  1046. set CommonStatus = STATUS_USERCANCEL
  1047. ifstr(i) $(!NTN_InstallMode) == "install"
  1048. goto filecopycancel
  1049. endif
  1050. goto end
  1051. PortsConfigure1 = +
  1052. set NewNumDialoutNBF = *($(Result),3)
  1053. Debug-Output "PortsConfigure NewNumDialoutNBF: "$(NewNumDialoutNBF)
  1054. set NewNumDialinNBF = *($(Result),4)
  1055. Debug-Output "PortsConfigure NewNumDialinNBF: "$(NewNumDialinNBF)
  1056. set fSerialInstalled = *($(Result),5)
  1057. Debug-Output "PortsConfigure fSerialInstalled: "$(fSerialInstalled)
  1058. set fUnimodemInstalled = *($(Result),6)
  1059. Debug-Output "PortsConfigure fUnimodemInstalled: "$(fUnimodemInstalled)
  1060. set fOtherInstalled = *($(Result),7)
  1061. Debug-Output "PortsConfigure fOtherInstalled: "$(fOtherInstalled)
  1062. ifstr(i) $(fSerialInstalled) == TRUE
  1063. set NewNumPortsList = >($(NewNumPortsList), $(NullString)$(NewNumPorts)$(NullString))
  1064. else-ifstr(i) $(fOtherInstalled) == TRUE
  1065. set NewNumPortsList = >($(NewNumPortsList), $(NullString)$(NewNumPorts)$(NullString))
  1066. else-ifstr(i) $(fUnimodemInstalled) == TRUE
  1067. set NewNumPortsList = >($(NewNumPortsList), $(NullString)$(NewNumPorts)$(NullString))
  1068. endif
  1069. set fNetbeuiSelected = *($(Result),8)
  1070. Debug-Output "PortsConfigure NetbeuiSelected: "$(fNetbeuiSelected)
  1071. set fTcpIpSelected = *($(Result),9)
  1072. Debug-Output "PortsConfigure TcpIpSelected: "$(fTcpIpSelected)
  1073. set fIpxSelected = *($(Result),10)
  1074. Debug-Output "PortsConfigure IpxSelected: "$(fIpxSelected)
  1075. set fNetbeuiAllowed = *($(Result),11)
  1076. Debug-Output "PortsConfigure NetbeuiAllowed: "$(fNetbeuiAllowed)
  1077. set fTcpIpAllowed = *($(Result),12)
  1078. Debug-Output "PortsConfigure TcpIpAllowed: "$(fTcpIpAllowed)
  1079. set fIpxAllowed = *($(Result),13)
  1080. Debug-Output "PortsConfigure IpxAllowed: "$(fIpxAllowed)
  1081. set InstallRas = *($(Result),14)
  1082. Debug-Output "PortsConfigure InstallRas: "$(InstallRas)
  1083. set InstallDdm = *($(Result),15)
  1084. Debug-Output "PortsConfigure InstallDdm: "$(InstallDdm)
  1085. set InstallLan = *($(Result),16)
  1086. Debug-Output "PortsConfigure InstallLan: "$(InstallLan)
  1087. set dwRouterType = *($(Result),17)
  1088. Debug-Output "PortsConfigure dwRouterType: "$(dwRouterType)
  1089. ifstr(i) $(fNetbeuiSelected) == TRUE
  1090. set fNetbeuiChosen = TRUE
  1091. else
  1092. set fNetbeuiChosen = $(fNetbeuiAllowed)
  1093. endif
  1094. ifstr(i) $(fTcpIpSelected) == TRUE
  1095. set fTcpIpChosen = TRUE
  1096. else
  1097. set fTcpIpChosen = $(fTcpIpAllowed)
  1098. endif
  1099. ifstr(i) $(fIpxSelected) == TRUE
  1100. set fIpxChosen = TRUE
  1101. else
  1102. set fIpxChosen = $(fIpxAllowed)
  1103. endif
  1104. ; compute the adapters needed for TCP/IP
  1105. ifstr(i) $(fTcpIpSelected) == TRUE
  1106. set NewNumDialoutIP = $(NewNumDialoutNBF)
  1107. endif
  1108. ifint $(NewNumDialinNBF) != 0
  1109. ifstr(i) $(fTcpIpAllowed) == TRUE
  1110. set NewNumDialinIP = 1
  1111. endif
  1112. endif
  1113. Debug-Output "NewNumDialinIP: "$(NewNumDialinIP)
  1114. Debug-Output "NewNumDialoutIP: "$(NewNumDialoutIP)
  1115. ; compute the adapters needed for IPX
  1116. ; NOTE for Daytona beta this is equal to number of ports
  1117. ifstr(i) $(fIpxChosen) == TRUE
  1118. ; set-add NewNumDialinoutIPX = $(NewNumPorts), $(NewNumTapiPorts)
  1119. ; Only one IPX binding is required irrespective of how many ports
  1120. set NewNumDialinoutIPX = 1
  1121. Debug-Output "IPX Selected - NewNumDialinoutIPX: "$(NewNumDialinoutIPX)
  1122. endif
  1123. ; enable the IPX router if the user allows dial-in on IPX protocol
  1124. ifstr(i) $(fIpxAllowed) == TRUE
  1125. set EnableIpxRouter = 1
  1126. else
  1127. set EnableIpxRouter = 0
  1128. endif
  1129. ; if nbf is not selected, then reduce the number of bindings accordingly
  1130. ifstr(i) $(fNetbeuiAllowed) == FALSE
  1131. set NewNumDialinNBF = 0
  1132. endif
  1133. ifstr(i) $(fNetbeuiSelected) == FALSE
  1134. set NewNumDialoutNBF = 0
  1135. endif
  1136. Debug-Output "NewNumDialinNbf: "$(NewNumDialinNBF)
  1137. Debug-Output "NewNumDialoutNbf: "$(NewNumDialoutNBF)
  1138. ; if the router type selected is LAN only, then we have to skip installing
  1139. ; all RAS related services
  1140. set LanRoutingOnly = FALSE
  1141. ifstr(i) $(InstallRas) == FALSE
  1142. ifstr(i) $(InstallDdm) == FALSE
  1143. set LanRoutingOnly = TRUE
  1144. endif
  1145. endif
  1146. ; Determine the network access for each protocol. This controls if the
  1147. ; remote client can access the entire network or just the RAS server
  1148. ; when dialed in using the particular protocol.
  1149. set NetBiosGtwyEnabled = 0
  1150. set EnableIpRouter = 0
  1151. set EnableWanRouter = 0
  1152. Shell "" GetNetworkAccess
  1153. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1154. Debug-Output "error shelling GetNetworkAccess."
  1155. goto ShellCodeError
  1156. endif
  1157. set NetBiosGtwyEnabled = $($R1)
  1158. ifstr(i) $(LanRoutingOnly) == TRUE
  1159. ifstr(i) $(fTcpIpAllowed) == TRUE
  1160. set EnableIpRouter = 1
  1161. endif
  1162. ifstr(i) $(fIpxAllowed) == TRUE
  1163. set EnableWanRouter = 1
  1164. endif
  1165. else
  1166. set EnableIpRouter = $($R2)
  1167. set EnableWanRouter = $($R3)
  1168. endif
  1169. ; If the NetBiosGtwyEnabled is 0 (point to point connection), then map
  1170. ; all dialin ports to dialout ports so that the bindings are proper for
  1171. ; a point to point connection for NBF.
  1172. ifint $(NetBiosGtwyEnabled) == 0
  1173. ifstr(i) $(fNetbeuiAllowed) == TRUE
  1174. set-add NewNumDialoutNBF = $(NewNumDialoutNBF), $(NewNumDialinNBF)
  1175. set NewNumDialinNBF = 0
  1176. Debug-Output "Mapped dialin ports to dialout ports "$(NewNumDialoutNBF)
  1177. endif
  1178. endif
  1179. ; compute the total number of dialin and dialout ports here.
  1180. set NewNumDialin = 0
  1181. set NewNumDialout = 0
  1182. set-add NewNumDialin = $(NewNumDialinNBF), $(NewNumDialinIP)
  1183. ; since ipx uses one binding marked for dialin/dialout we need
  1184. ; to make sure that IPX is configured for dialin for this computation
  1185. ifstr(i) $(fIpxAllowed) == TRUE
  1186. set-add NewNumDialin = $(NewNumDialin), $(NewNumDialinoutIPX)
  1187. endif
  1188. set-add NewNumDialout = $(NewNumDialoutNBF), $(NewNumDialoutIP)
  1189. ; since ipx uses one binding marked for dialin/dialout we need
  1190. ; to make sure that IPX is configured for dialout for this computation
  1191. ifstr(i) $(fIpxSelected) == TRUE
  1192. set-add NewNumDialout = $(NewNumDialout), $(NewNumDialinoutIPX)
  1193. endif
  1194. CommonCode = +
  1195. ifstr(i) $(OldVersionExisted) == TRUE
  1196. ; Modified on 10/13/96, for routing related changes
  1197. ; We can get here both in install and configure mode because we allow
  1198. ; multiple installations of different routing components
  1199. ; ifstr(i) $(!NTN_InstallMode) == configure
  1200. goto WriteParameters
  1201. ; endif
  1202. endif
  1203. ; if no Ras component was installed before, this is the first time
  1204. ; installation
  1205. QueryListSize ListCount $(RasComponentsList)
  1206. ifint $(ListCount) == 0
  1207. goto FirstTimeInstall
  1208. else
  1209. ifstr(i) $(DoServer) == TRUE
  1210. ifstr(i) $(ClientInstalled) == FALSE
  1211. ifstr(i) $(AdminInstalled) == FALSE
  1212. set DoRas = TRUE
  1213. endif
  1214. set DoRasSvr = TRUE
  1215. set DoRasMan = TRUE
  1216. set DoRasAutodial = TRUE
  1217. set DoNdisWan = TRUE
  1218. set DoRasAsyMac = TRUE
  1219. else-ifstr(i) $(ServerInstalled) == FALSE
  1220. set DoRasSvr = TRUE
  1221. endif
  1222. set RasComponentsList = >($(RasComponentsList), $(RasServerOption))
  1223. endif
  1224. ifstr(i) $(DoClient) == TRUE
  1225. ifstr(i) $(ServerInstalled) == FALSE
  1226. ifstr(i) $(AdminInstalled) == FALSE
  1227. set DoRas = TRUE
  1228. endif
  1229. set DoRasMan = TRUE
  1230. set DoRasAutodial = TRUE
  1231. set DoNdisWan = TRUE
  1232. set DoRasAsyMac = TRUE
  1233. endif
  1234. set RasComponentsList = >($(RasComponentsList), $(RasClientOption))
  1235. endif
  1236. ifstr(i) $(DoAdmin) == TRUE
  1237. ifstr(i) $(ServerInstalled) == FALSE
  1238. ifstr(i) $(ClientInstalled) == FALSE
  1239. set DoRas = TRUE
  1240. endif
  1241. endif
  1242. set RasComponentsList = >($(RasComponentsList), $(RasAdminOption))
  1243. endif
  1244. ; we need to update the registry with the new component list
  1245. shell "" UpdateComponentsInstalled $(RasComponentsList) $(ProductKeyName)
  1246. goto FirstTimeInstall-1
  1247. endif
  1248. FirstTimeInstall =+
  1249. ifstr(i) $(DoServer) == TRUE
  1250. set DoRas = TRUE
  1251. set DoRouter = TRUE
  1252. ifstr(i) $(LanRoutingOnly) != TRUE
  1253. set DoRasSvr = TRUE
  1254. set DoRasMan = TRUE
  1255. set DoRasAutodial = TRUE
  1256. set DoNdisWan = TRUE
  1257. set DoRasAsyMac = TRUE
  1258. set RasComponentsList = >($(RasComponentsList), $(RasServerOption))
  1259. endif
  1260. endif
  1261. ifstr(i) $(DoClient) == TRUE
  1262. set DoRas = TRUE
  1263. ifstr(i) $(LanRoutingOnly) != TRUE
  1264. set DoRasMan = TRUE
  1265. set DoRasAutodial = TRUE
  1266. set DoNdisWan = TRUE
  1267. set DoRasAsyMac = TRUE
  1268. set RasComponentsList = >($(RasComponentsList), $(RasClientOption))
  1269. endif
  1270. endif
  1271. ifstr(i) $(DoAdmin) == TRUE
  1272. ifstr(i) $(ServerInstalled) == FALSE
  1273. ifstr(i) $(ClientInstalled) == FALSE
  1274. set DoRas = TRUE
  1275. endif
  1276. endif
  1277. set RasComponentsList = >($(RasComponentsList), $(RasAdminOption))
  1278. endif
  1279. FirstTimeInstall-1 = +
  1280. ifstr(i) $(DoRas) == TRUE
  1281. StartWait
  1282. read-syms StatusUpdatingRegistry$(!STF_LANGUAGE)
  1283. shell $(subroutninf) PushBillBoard NETSTATUSDLG $(CreatingRas)
  1284. Set BillboardVisible = 1
  1285. ; Modification done on 9/24/96 by RamC - changed the option from RAS to
  1286. ; Routing for the routing related changes
  1287. set ThisOption = RAS
  1288. Shell $(!UtilityInf), InstallSoftwareProduct, $(!Manufacturer),+
  1289. $(Product$(ThisOption)Name), $(!RasInfName)
  1290. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1291. Debug-Output "InstallSoftware bombed out."
  1292. goto ShellCodeError
  1293. endif
  1294. set RegistryErrorIndex = $($R0)
  1295. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1296. Debug-Output "REGISTRY GOODAL"
  1297. CloseRegKey $($R1)
  1298. CloseRegKey $($R2)
  1299. goto fatalregistry
  1300. endif
  1301. ;
  1302. ; At this point:
  1303. ; $R1 contains the product version key handle;
  1304. ; $R2 contains the NetRules subkey handle;
  1305. Set SoftProductKey = $($R1)
  1306. Set SoftNetRuleKey = $($R2)
  1307. ; set product key information in the registry
  1308. set NewValueList = +
  1309. {{Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)},+
  1310. {SoftwareType,$(NoTitle),$(!REG_VT_SZ),+
  1311. $(Product$(ThisOption)SvcType)},+
  1312. {Title,$(NoTitle),$(!REG_VT_SZ), $(Product$(ThisOption)Title)},+
  1313. {Description,$(NoTitle),$(!REG_VT_SZ),+
  1314. $(Product$(ThisOption)Description)},+
  1315. {PathName,$(NoTitle),$(!REG_VT_SZ),+
  1316. $(Product$(ThisOption)ImagePath)},+
  1317. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMajorVersion)},+
  1318. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMinorVersion)},+
  1319. {RasComponents,$(NoTitle),$(!REG_VT_MULTI_SZ),$(RasComponentsList)},+
  1320. {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}, +
  1321. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)}}
  1322. Shell $(!UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  1323. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1324. CloseRegKey $(SoftProductKey)
  1325. CloseRegKey $(SoftNetRuleKey)
  1326. goto ShellCodeError
  1327. endif
  1328. set RegistryErrorIndex = $($R0)
  1329. CloseRegKey $(SoftProductKey)
  1330. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1331. CloseRegKey $(SoftNetRuleKey)
  1332. goto fatalregistry
  1333. endif
  1334. ; set netrules information in the registry
  1335. set NewValueList = +
  1336. {{class, $(NoTitle), $(!REG_VT_SZ), $(NetRule$(ThisOption)Class)},+
  1337. {type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  1338. {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)}, +
  1339. ;Modified on 9/24/96 - changed ThisOption to ROUTING
  1340. ; {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  1341. {InfOption,$(NoTitle),$(!REG_VT_SZ), "RAS"}, +
  1342. {Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)}}
  1343. Shell $(!UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  1344. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1345. goto ShellCodeError
  1346. endif
  1347. set RegistryErrorIndex = $($R0)
  1348. CloseRegKey $(SoftNetRuleKey)
  1349. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1350. goto fatalregistry
  1351. endif
  1352. endif ; DoRas
  1353. ifstr(i) $(DoRasSvr) == TRUE
  1354. set ThisOption = RASSVR
  1355. set RasSpecificString = $(Product$(ThisOption)Name)
  1356. Shell $(!UtilityInf), AddSoftwareComponent, $(!Manufacturer), +
  1357. $(Product$(ThisOption)Name), $(Product$(ThisOption)Name), +
  1358. $(Product$(ThisOption)DisplayName), +
  1359. $(!RasInfName), $(Product$(ThisOption)ImagePath),+
  1360. "serviceshare", "Network", {"LanmanServer","RasMan"}, "", +
  1361. $(!RouterMsgDll), $(!RasEventTypeSupported)
  1362. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1363. Debug-Output "DoRasSvr: AddSoftware bombed out"
  1364. goto ShellCodeError
  1365. endif
  1366. set RegistryErrorIndex = $($R0)
  1367. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1368. Debug-Output "DoRasSvr: Registry Error "$(RegistryErrorIndex)
  1369. CloseRegKey $($R1)
  1370. CloseRegKey $($R2)
  1371. CloseRegKey $($R3)
  1372. CloseRegKey $($R4)
  1373. CloseRegKey $($R5)
  1374. goto fatalregistry
  1375. endif
  1376. ;
  1377. ; At this point:
  1378. ; $R1 contains the product version key handle;
  1379. ; $R2 contains the NetRules subkey handle;
  1380. ; $R3 contains the new Services key handle; and
  1381. ; $R4 contains the Parameters key
  1382. ; $R5 contains the Linkage key
  1383. ;
  1384. Set SoftProductKey = $($R1)
  1385. Set SoftNetRuleKey = $($R2)
  1386. set SoftServiceKey = $($R3)
  1387. Set SoftParamsKey = $($R4)
  1388. Set SoftLinkageKey = $($R5)
  1389. ; set product key information in the registry
  1390. set NewValueList = +
  1391. {{Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)},+
  1392. {ServiceName,$(NoTitle),$(!REG_VT_SZ),+
  1393. $(Product$(ThisOption)Name)},+
  1394. {SoftwareType,$(NoTitle),$(!REG_VT_SZ),+
  1395. $(Product$(ThisOption)SvcType)},+
  1396. {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  1397. {Description,$(NoTitle),$(!REG_VT_SZ),+
  1398. $(Product$(ThisOption)Description)},+
  1399. {PathName,$(NoTitle),$(!REG_VT_SZ),+
  1400. $(Product$(ThisOption)ImagePath)},+
  1401. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMajorVersion)},+
  1402. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMinorVersion)},+
  1403. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  1404. {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(!HideComponent)}}
  1405. Shell $(!UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  1406. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1407. Debug-Output "DoRasSvr:product: AddValueList bombed out"
  1408. goto ShellCodeError
  1409. endif
  1410. set RegistryErrorIndex = $($R0)
  1411. CloseRegKey $(SoftProductKey)
  1412. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1413. Debug-Output "DoRasSvr: Registry Error "$(RegistryErrorIndex)
  1414. CloseRegKey $(SoftServiceKey)
  1415. CloseRegKey $(SoftNetRuleKey)
  1416. CloseRegKey $(SoftLinkageKey)
  1417. CloseRegKey $(SoftParamsKey)
  1418. goto fatalregistry
  1419. endif
  1420. ; set netrules information in the registry
  1421. set NewValueList = +
  1422. {{class, $(NoTitle), $(!REG_VT_SZ), $(NetRule$(ThisOption)Class)},+
  1423. {type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  1424. {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)}, +
  1425. ;Modified on 9/24/96 - changed ThisOption to ROUTING
  1426. ; {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  1427. {InfOption,$(NoTitle),$(!REG_VT_SZ), "RAS"}, +
  1428. {bindform,$(NoTitle),$(!REG_VT_SZ),+
  1429. $(NetRule$(ThisOption)BindForm)}, +
  1430. {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  1431. $(NetRule$(ThisOption)Bindable)}, +
  1432. {Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)}}
  1433. Shell $(!UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  1434. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1435. Debug-Output "DoRasSvr:netrules: AddValueList bombed out"
  1436. goto ShellCodeError
  1437. endif
  1438. set RegistryErrorIndex = $($R0)
  1439. CloseRegKey $(SoftNetRuleKey)
  1440. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1441. CloseRegKey $(SoftServiceKey)
  1442. CloseRegKey $(SoftLinkageKey)
  1443. CloseRegKey $(SoftParamsKey)
  1444. Debug-Output "DoRasSvr: Registry Error "$(RegistryErrorIndex)
  1445. goto fatalregistry
  1446. endif
  1447. ; Set OtherDependencies so that NCPA will generate the proper
  1448. ; DependOnService value.
  1449. ; Don't set the netlogon dependency, because there is no
  1450. ; netlogon service in NT Cairo
  1451. ;; set Netlogon dependency only for Advanced servers
  1452. ; Also add NetBIOS dependency if, NetBIOS is installed
  1453. set RasDependencies = {"LanmanServer","RasMan"}
  1454. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NetBios" $(!MAXIMUM_ALLOWED) KeyNetBios
  1455. ifstr $(KeyNetBios) != $(KeyNull)
  1456. set RasDependencies = >($(RasDependencies),"NetBios")
  1457. CloseRegKey $(KeyNetBios)
  1458. endif
  1459. Debug-Output "DoRasSvr: Adding RasDependencies "$(RasDependencies)
  1460. set NewValueList = +
  1461. {{OtherDependencies, $(NoTitle), $(!REG_VT_MULTI_SZ),+
  1462. $(RasDependencies)}}
  1463. Shell $(!UtilityInf), AddValueList, $(SoftLinkageKey), $(NewValueList)
  1464. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1465. Debug-Output "DoRasSvr:Linkage: AddValueList bombed out"
  1466. goto ShellCodeError
  1467. endif
  1468. set RegistryErrorIndex = $($R0)
  1469. CloseRegKey $(SoftLinkageKey)
  1470. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1471. CloseRegKey $(SoftServiceKey)
  1472. Debug-Output "DoRasSvr: Registry Error "$(RegistryErrorIndex)
  1473. goto fatalregistry
  1474. endif
  1475. ; create default parameters
  1476. set NewValueList = +
  1477. {{AuthenticateRetries, $(NoTitle), $(!REG_VT_DWORD), 2},+
  1478. {AuthenticateTime, $(NoTitle), $(!REG_VT_DWORD), 120},+
  1479. {Autodisconnect, $(NoTitle), $(!REG_VT_DWORD), 20},+
  1480. {EnableAudit, $(NoTitle), $(!REG_VT_DWORD), 1},+
  1481. {CallbackTime, $(NoTitle), $(!REG_VT_DWORD), 2}}
  1482. Shell $(!UtilityInf), AddValueList, $(SoftParamsKey), $(NewValueList)
  1483. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1484. Debug-Output "AddValueList bombed out"
  1485. goto ShellCodeError
  1486. endif
  1487. set RegistryErrorIndex = $($R0)
  1488. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1489. CloseRegKey $(SoftServiceKey)
  1490. goto fatalregistry
  1491. endif
  1492. OpenRegKey $(SoftParamsKey) "" "NetBiosGateway" $(!MAXIMUM_ALLOWED) KeyNetbiosGtwy
  1493. ifstr $(KeyNtbiosGtwy) == $(KeyNull)
  1494. CreateRegKey $(SoftParamsKey) {"NetBiosGateway",$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyNetbiosGtwy
  1495. OpenRegKey $(SoftParamsKey) "" "NetBiosGateway" $(!MAXIMUM_ALLOWED) KeyNetbiosGtwy
  1496. endif
  1497. set NewValueList = +
  1498. {{EnableBroadcast, $(NoTitle), $(!REG_VT_DWORD), 0},+
  1499. {EnableNetbiosSessionsAuditing, $(NoTitle), $(!REG_VT_DWORD), 0},+
  1500. {MaxDynMem, $(NoTitle), $(!REG_VT_DWORD), 655350},+
  1501. {MaxNames, $(NoTitle), $(!REG_VT_DWORD), 255},+
  1502. {MaxSessions, $(NoTitle), $(!REG_VT_DWORD), 255},+
  1503. {MulticastForwardRate, $(NoTitle), $(!REG_VT_DWORD), 5},+
  1504. {SizWorkbuf, $(NoTitle), $(!REG_VT_DWORD), 4500},+
  1505. {RemoteListen, $(NoTitle), $(!REG_VT_DWORD), 1},+
  1506. {NameUpdateTime, $(NoTitle), $(!REG_VT_DWORD), 120},+
  1507. {MaxDgBufferedPerGroupName, $(NoTitle), $(!REG_VT_DWORD), 10},+
  1508. {RcvDgSubmittedPerGroupName, $(NoTitle), $(!REG_VT_DWORD), 3},+
  1509. {DisableMcastFwdWhenSessionTraffic, $(NoTitle), $(!REG_VT_DWORD), 1},+
  1510. {MaxBcastDgBuffered, $(NoTitle), $(!REG_VT_DWORD), 32},+
  1511. {NumRecvQueryIndications, $(NoTitle), $(!REG_VT_DWORD), 3}}
  1512. Shell $(!UtilityInf), AddValueList, $(KeyNetbiosGtwy), $(NewValueList)
  1513. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1514. Debug-Output "AddValueList bombed out"
  1515. goto ShellCodeError
  1516. endif
  1517. set RegistryErrorIndex = $($R0)
  1518. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1519. CloseRegKey $(SoftServiceKey)
  1520. goto fatalregistry
  1521. endif
  1522. CloseRegKey $(KeyNetbiosGtwy)
  1523. CloseRegKey $(SoftParamsKey)
  1524. ; Add the performance data to the remoteaccess\performance service key
  1525. ; and load the perf counters to the registry.
  1526. Shell "" UpdatePerfmonInfoHelper $(SoftServiceKey)
  1527. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1528. Debug-Output "error shelling UpdatePerfmonInfoHelper."
  1529. goto ShellCodeError
  1530. endif
  1531. Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  1532. Debug-Output "error returned by UpdatePerfmonInfoHelper."
  1533. endif
  1534. CloseRegKey $(SoftServiceKey)
  1535. ;;;;;;;;;;;;;;
  1536. endif ; DoRasSvr
  1537. InstallRouter =+
  1538. ifstr(i) $(DoRouter) == TRUE
  1539. ; Install the router service and create the router manager keys
  1540. ; if LAN or demand dial routing is selected. In the case of a RAS
  1541. ; only install, we create the router manager information without
  1542. ; displaying any UI because the user doesn't expect to see any
  1543. ; UI related to router managers.
  1544. Shell "" InstallRouterService $(InstallDdm) $(InstallRas) $(RoutingKeyList) $(RoutingValueList)
  1545. goto InstallRouterEnd
  1546. endif ; DoRouter
  1547. InstallRouterEnd = +
  1548. ; Add the static dependency on RasMan service only if
  1549. ; demand dial routing is enabled
  1550. ifstr(i) $(LanRoutingOnly) != TRUE
  1551. Shell "" AddServiceDependency "Router" "RasMan"
  1552. endif
  1553. Debug-Output "!PROXY_INSTALLED = "$(!PROXY_INSTALLED)
  1554. ifstr(i) $(!PROXY_INSTALLED) == "TRUE"
  1555. Shell "" AddServiceDependency "Router" "mspadmin"
  1556. endif
  1557. ; this dependency is required for RouterAdmin to show routing info
  1558. Shell "" AddServiceDependency "Router" "LanManServer"
  1559. ; add pptp filters to lan interfaces if they were previously specified
  1560. Debug-Output "AddPPTPFilters entry."
  1561. LibraryProcedure Result, $(PORTSDLGHANDLE), AddPPTPFilters
  1562. Debug-Output "AddPPTPFilters exit result = "$(Result)
  1563. InstallRasMan = +
  1564. ifstr(i) $(DoRasMan) == TRUE
  1565. set ThisOption = RASMAN
  1566. set RasSpecificString = $(Product$(ThisOption)Name)
  1567. Shell $(!UtilityInf), AddSoftwareComponent, $(!Manufacturer), +
  1568. $(Product$(ThisOption)Name), $(Product$(ThisOption)Name), +
  1569. $(Product$(ThisOption)DisplayName), +
  1570. $(!RasInfName), $(Product$(ThisOption)ImagePath), "serviceshare",+
  1571. "Network", {}, "", $(!RouterMsgDll), $(!RasEventTypeSupported)
  1572. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1573. Debug-Output "AddSoftware bombed out"
  1574. goto ShellCodeError
  1575. endif
  1576. set RegistryErrorIndex = $($R0)
  1577. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1578. CloseRegKey $($R1)
  1579. CloseRegKey $($R2)
  1580. CloseRegKey $($R3)
  1581. CloseRegKey $($R4)
  1582. CloseRegKey $($R5)
  1583. goto fatalregistry
  1584. endif
  1585. ;
  1586. ; At this point:
  1587. ; $R1 contains the product version key handle;
  1588. ; $R2 contains the NetRules subkey handle;
  1589. ; $R3 contains the new Services key handle; and
  1590. ; $R4 contains the Parameters key
  1591. ; $R5 contains the Linkage key
  1592. ;
  1593. Set SoftProductKey = $($R1)
  1594. Set SoftNetRuleKey = $($R2)
  1595. CloseRegKey $($R3)
  1596. Set SoftParamsKey = $($R4)
  1597. CloseRegKey $($R5)
  1598. ; set product key information in the registry
  1599. set NewValueList = +
  1600. {{Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)},+
  1601. {ServiceName,$(NoTitle),$(!REG_VT_SZ),+
  1602. $(Product$(ThisOption)Name)},+
  1603. {SoftwareType,$(NoTitle),$(!REG_VT_SZ),+
  1604. $(Product$(ThisOption)SvcType)},+
  1605. {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  1606. {Description,$(NoTitle),$(!REG_VT_SZ),+
  1607. $(Product$(ThisOption)Description)},+
  1608. {PathName,$(NoTitle),$(!REG_VT_SZ),+
  1609. $(Product$(ThisOption)ImagePath)},+
  1610. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMajorVersion)},+
  1611. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMinorVersion)},+
  1612. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  1613. {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(!HideComponent)}}
  1614. Shell $(!UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  1615. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1616. Debug-Output "AddValueList bombed out"
  1617. goto ShellCodeError
  1618. endif
  1619. set RegistryErrorIndex = $($R0)
  1620. CloseRegKey $(SoftProductKey)
  1621. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1622. CloseRegKey $(SoftNetRuleKey)
  1623. CloseRegKey $(SoftParamsKey)
  1624. goto fatalregistry
  1625. endif
  1626. ; set netrules information in the registry
  1627. set NewValueList = +
  1628. {{class, $(NoTitle), $(!REG_VT_SZ), $(NetRule$(ThisOption)Class)},+
  1629. {type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  1630. {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)}, +
  1631. {bindform,$(NoTitle),$(!REG_VT_SZ),+
  1632. $(NetRule$(ThisOption)BindForm)}, +
  1633. {bindable,$(NoTitle),$(!REG_VT_SZ),+
  1634. $(NetRule$(ThisOption)Bindable)}, +
  1635. ;Modified on 9/24/96 - changed ThisOption to ROUTING
  1636. ; {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  1637. {InfOption,$(NoTitle),$(!REG_VT_SZ), "RAS"}, +
  1638. {Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)}}
  1639. Shell $(!UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  1640. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1641. Debug-Output "AddValueList bombed out"
  1642. goto ShellCodeError
  1643. endif
  1644. set RegistryErrorIndex = $($R0)
  1645. CloseRegKey $(SoftNetRuleKey)
  1646. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1647. goto fatalregistry
  1648. endif
  1649. set NewValueList = {{Logging, $(NoTitle), $(!REG_VT_DWORD), 0}}
  1650. Shell $(!UtilityInf), AddValueList, $(SoftParamsKey), $(NewValueList)
  1651. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1652. Debug-Output "AddValueList bombed out"
  1653. goto ShellCodeError
  1654. endif
  1655. set RegistryErrorIndex = $($R0)
  1656. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1657. goto fatalregistry
  1658. endif
  1659. CloseRegKey $(SoftParamsKey)
  1660. Shell "" AddServiceDependency "RasMan" "tapisrv"
  1661. Shell "" AddServiceDependency "RasMan" "rpcss"
  1662. ; this dependency is required for ppp to start up fine
  1663. Shell "" AddServiceDependency "RasMan" "LanManWorkstation"
  1664. endif ; DoRasMan
  1665. ifstr(i) $(DoRasAutodial) == TRUE
  1666. set ThisOption = RASAUTODIAL
  1667. set RasSpecificString = $(!Product$(ThisOption)Name)
  1668. Shell "" InstallSoftwareAndService $(ThisOption)
  1669. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1670. Debug-Output "Error shelling InstallSoftwareAndService for "$(ThisOption)
  1671. goto ShellCodeError
  1672. endif
  1673. ifstr(i) $($R0) != STATUS_SUCCESSFUL
  1674. Debug-Output "Error from InstallSoftwareAndService for"$(ThisOption)
  1675. goto end
  1676. endif
  1677. ; Disable the RasAuto service if this is not a NT Workstation
  1678. ; Also disable the RasAuto service if there is no dialout port configured
  1679. ; RamC 6/13/96 don't disable RasAuto for NT Server any more because
  1680. ; redial-on-link-failure is implemented in autodial service and it should
  1681. ; be enabled if one or more dialout ports are configured.
  1682. set DisableAutoDial = FALSE
  1683. ifint $(NewNumDialout) == 0
  1684. set DisableAutoDial = TRUE
  1685. ; else-ifstr(i) $(!STF_PRODUCT) != "WINNT"
  1686. ; set DisableAutoDial = TRUE
  1687. endif
  1688. ifstr(i) $(DisableAutoDial) == TRUE
  1689. OpenRegKey $(!REG_H_LOCAL) "" $(!RasAutodialKeyName) $(!MAXIMUM_ALLOWED) KeyAutodial
  1690. ifstr $(KeyAutodial) == $(KeyNull)
  1691. Debug-Output "OEMNSVRA.INF: could not open RasAuto key"
  1692. else
  1693. SetRegValue $(KeyAutodial) {Start, $(NoTitle), $(!REG_VT_DWORD), 4}
  1694. CloseRegKey $(KeyAutodial)
  1695. endif
  1696. endif
  1697. ; install the RasAcd service
  1698. Shell "" InstallRasAcdService
  1699. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1700. Debug-Output "Error shelling InstallRasAcdService"
  1701. goto ShellCodeError
  1702. endif
  1703. ifstr(i) $($R0) != STATUS_SUCCESSFUL
  1704. Debug-Output "Error from InstallRasAcdService"
  1705. goto end
  1706. endif
  1707. ; Make RasAuto dependent on TapiSrv, a new service
  1708. Shell "" AddServiceDependency "RasAuto" "RasMan"
  1709. Shell "" AddServiceDependency "RasAuto" "tapisrv"
  1710. endif ; DoRasAutodial
  1711. ifstr(i) $(DoNdisWan) == TRUE
  1712. set ThisOption = NDISWAN
  1713. set RasSpecificString = $(Product$(ThisOption)Name)
  1714. Shell $(!UtilityInf), AddSoftwareComponent, $(!Manufacturer), +
  1715. $(!Product$(ThisOption)Name), $(!Product$(ThisOption)Name), +
  1716. $(!Product$(ThisOption)DisplayName), +
  1717. $(!RasInfName), $(!Product$(ThisOption)ImagePath),+
  1718. "kernelautostart", "NDISWAN", {}, "", +
  1719. $(!RouterMsgDll), $(!RasEventTypeSupported)
  1720. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1721. Debug-Output "AddSoftware bombed out"
  1722. goto ShellCodeError
  1723. endif
  1724. set RegistryErrorIndex = $($R0)
  1725. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1726. CloseRegKey $($R1)
  1727. CloseRegKey $($R2)
  1728. CloseRegKey $($R3)
  1729. CloseRegKey $($R4)
  1730. CloseRegKey $($R5)
  1731. goto fatalregistry
  1732. endif
  1733. ;
  1734. ; At this point:
  1735. ; $R1 contains the product version key handle;
  1736. ; $R2 contains the NetRules subkey handle;
  1737. ; $R3 contains the new Services key handle; and
  1738. ; $R4 contains the Parameters key
  1739. ; $R5 contains the Linkage key
  1740. ;
  1741. Set SoftProductKey = $($R1)
  1742. Set SoftNetRuleKey = $($R2)
  1743. CloseRegKey $($R3)
  1744. CloseRegKey $($R4)
  1745. CloseRegKey $($R5)
  1746. ; set product key information in the registry
  1747. set NewValueList = +
  1748. {{Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)},+
  1749. {ServiceName,$(NoTitle),$(!REG_VT_SZ),+
  1750. $(!Product$(ThisOption)Name)},+
  1751. {SoftwareType,$(NoTitle),$(!REG_VT_SZ),+
  1752. $(Product$(ThisOption)Type)},+
  1753. {Title,$(NoTitle),$(!REG_VT_SZ),$(!Product$(ThisOption)Title)},+
  1754. {Description,$(NoTitle),$(!REG_VT_SZ),+
  1755. $(!Product$(ThisOption)Description)},+
  1756. {PathName,$(NoTitle),$(!REG_VT_SZ),+
  1757. $(!Product$(ThisOption)ImagePath)},+
  1758. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMajorVersion)},+
  1759. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMinorVersion)},+
  1760. {BindControl,$(NoTitle),$(!REG_VT_DWORD),$(HideBindings)},+
  1761. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  1762. {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(!HideComponent)}}
  1763. Shell $(!UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  1764. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1765. Debug-Output "AddValueList bombed out"
  1766. goto ShellCodeError
  1767. endif
  1768. set RegistryErrorIndex = $($R0)
  1769. CloseRegKey $(SoftProductKey)
  1770. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1771. CloseRegKey $(SoftNetRuleKey)
  1772. goto fatalregistry
  1773. endif
  1774. ; set netrules information in the registry
  1775. set NewValueList = +
  1776. {{class, $(NoTitle), $(!REG_VT_MULTI_SZ), $(!NetRule$(ThisOption)Class)},+
  1777. {type,$(NoTitle),$(!REG_VT_SZ),$(!NetRule$(ThisOption)Type)},+
  1778. {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)}, +
  1779. {bindform,$(NoTitle),$(!REG_VT_SZ),+
  1780. $(!NetRule$(ThisOption)BindForm)}, +
  1781. {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  1782. $(!NetRule$(ThisOption)Bindable)}, +
  1783. ;Modified on 9/24/96 - changed ThisOption to ROUTING
  1784. ; {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  1785. {InfOption,$(NoTitle),$(!REG_VT_SZ), "RAS"}, +
  1786. {Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)}}
  1787. Shell $(!UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  1788. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1789. Debug-Output "AddValueList bombed out"
  1790. goto ShellCodeError
  1791. endif
  1792. set RegistryErrorIndex = $($R0)
  1793. CloseRegKey $(SoftNetRuleKey)
  1794. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1795. goto fatalregistry
  1796. endif
  1797. ; Create an adapter to allow Blood Hound (sniffer) to bind to it.
  1798. ; this is always created even if blood hound is not installed.
  1799. Shell "" InstallNdisWanBHAdapter
  1800. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1801. Debug-Output "Cannot add NdisWan Blood hound adapter"
  1802. goto ShellCodeError
  1803. endif
  1804. ifstr(i) $($R0) != STATUS_SUCCESSFUL
  1805. set RegistryErrorIndex = $($R0)
  1806. Debug-Output "Error installing NdisWan Blood hound adapter"
  1807. goto fatalregistry
  1808. endif
  1809. ; Add NDISWAN to the ServiceGroupOrder so that all NDIS components
  1810. ; load before NdisWan driver.
  1811. Shell "" AddNDISWANToServiceGroupOrder
  1812. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1813. Debug-Output "Cannot add NDISWAN to ServiceGroupOrder"
  1814. goto ShellCodeError
  1815. endif
  1816. DoNdisWanEnd = +
  1817. endif ; DoNdisWan
  1818. ifstr(i) $(DoRasAsyMac) == TRUE
  1819. set ThisOption = RASASYMAC
  1820. set RasSpecificString = $(Product$(ThisOption)Name)
  1821. ; If a serial port is configured, enable Asymac service else disable it
  1822. ifstr(i) $(fSerialInstalled) == TRUE
  1823. set AsySoftwareType = "kernelautostart"
  1824. else-ifstr(i) $(fOtherInstalled) == TRUE
  1825. set AsySoftwareType = "kernelautostart"
  1826. else-ifstr(i) $(fUnimodemInstalled) == TRUE
  1827. set AsySoftwareType = "kernelautostart"
  1828. else
  1829. set AsySoftwareType = "kerneldisable"
  1830. endif
  1831. Shell $(!UtilityInf), AddSoftwareComponent, $(!Manufacturer), +
  1832. $(Product$(ThisOption)Name), $(Product$(ThisOption)Name), +
  1833. $(Product$(ThisOption)DisplayName), +
  1834. $(!RasInfName), $(Product$(ThisOption)ImagePath), $(AsySoftwareType),+
  1835. "NDIS", {}, "", $(!RouterMsgDll), $(!RasEventTypeSupported)
  1836. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1837. Debug-Output "AddSoftware bombed out"
  1838. goto ShellCodeError
  1839. endif
  1840. set RegistryErrorIndex = $($R0)
  1841. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1842. CloseRegKey $($R1)
  1843. CloseRegKey $($R2)
  1844. CloseRegKey $($R3)
  1845. CloseRegKey $($R4)
  1846. CloseRegKey $($R5)
  1847. goto fatalregistry
  1848. endif
  1849. ;
  1850. ; At this point:
  1851. ; $R1 contains the product version key handle;
  1852. ; $R2 contains the NetRules subkey handle;
  1853. ; $R3 contains the new Services key handle; and
  1854. ; $R4 contains the Parameters key
  1855. ; $R5 contains the Linkage key
  1856. ;
  1857. Set SoftProductKey = $($R1)
  1858. Set SoftNetRuleKey = $($R2)
  1859. CloseRegKey $($R3)
  1860. CloseRegKey $($R4)
  1861. CloseRegKey $($R5)
  1862. ; set product key information in the registry
  1863. set NewValueList = +
  1864. {{Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)},+
  1865. {ServiceName,$(NoTitle),$(!REG_VT_SZ),+
  1866. $(Product$(ThisOption)Name)},+
  1867. {SoftwareType,$(NoTitle),$(!REG_VT_SZ),+
  1868. $(Product$(ThisOption)Type)},+
  1869. {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  1870. {Description,$(NoTitle),$(!REG_VT_SZ),+
  1871. $(Product$(ThisOption)Description)},+
  1872. {PathName,$(NoTitle),$(!REG_VT_SZ),+
  1873. $(Product$(ThisOption)ImagePath)},+
  1874. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMajorVersion)},+
  1875. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMinorVersion)},+
  1876. {BindControl,$(NoTitle),$(!REG_VT_DWORD),$(HideBindings)},+
  1877. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  1878. {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(!HideComponent)}}
  1879. Shell $(!UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  1880. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1881. Debug-Output "AddValueList bombed out"
  1882. goto ShellCodeError
  1883. endif
  1884. set RegistryErrorIndex = $($R0)
  1885. CloseRegKey $(SoftProductKey)
  1886. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1887. CloseRegKey $(SoftNetRuleKey)
  1888. goto fatalregistry
  1889. endif
  1890. ; set netrules information in the registry
  1891. set NewValueList = +
  1892. {{class, $(NoTitle), $(!REG_VT_MULTI_SZ), $(NetRule$(ThisOption)Class)},+
  1893. {type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  1894. {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)}, +
  1895. {bindform,$(NoTitle),$(!REG_VT_SZ),+
  1896. $(NetRule$(ThisOption)BindForm)}, +
  1897. {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  1898. $(!NetRule$(ThisOption)Bindable)}, +
  1899. ;Modified on 9/24/96 - changed ThisOption to ROUTING
  1900. ; {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  1901. {InfOption,$(NoTitle),$(!REG_VT_SZ), "RAS"}, +
  1902. {Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)}}
  1903. Shell $(!UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  1904. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1905. Debug-Output "AddValueList bombed out"
  1906. goto ShellCodeError
  1907. endif
  1908. set RegistryErrorIndex = $($R0)
  1909. CloseRegKey $(SoftNetRuleKey)
  1910. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1911. goto fatalregistry
  1912. endif
  1913. ; Create the HARDWARE\Netcard region and its corresponding service
  1914. Shell $(!UtilityInf), AddHardwareComponent, +
  1915. $(Product$(ThisOption)Name),$(!RasInfName),+
  1916. $(Product$(ThisOption)KeyName)
  1917. ifint $($R4) != -1
  1918. Set !NETCARD_LIST = >($(!NETCARD_LIST), +
  1919. {$(Product$(ThisOption)Name),+
  1920. $(!NetworkCardKeyName)"\"$($R4)})
  1921. endif
  1922. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1923. Debug-Output "Cannot add hardware component"
  1924. goto ShellCodeError
  1925. endif
  1926. set RegistryErrorIndex = $($R0)
  1927. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1928. Debug-Output "Registry error: add hardware component"
  1929. CloseRegKey $($R1)
  1930. CloseRegKey $($R2)
  1931. CloseRegKey $($R3)
  1932. goto fatalregistry
  1933. endif
  1934. ; At this point:
  1935. ; $R1 Registry key variable for HARDWARE\Netcard\(n)
  1936. ; $R2 Registry key variable for HARDWARE\Netcard\(n)\\NetRules
  1937. ; $R3 Registry key handle for <service>\Parameters key
  1938. ; $R4 Adapter number assigned to adapter
  1939. ; $R5 Service name generated by combining svc name with adapter
  1940. ; number
  1941. set KeyNetcard = $($R1)
  1942. set KeyParameters = $($R3)
  1943. set KeyAdapterRules = $($R2)
  1944. set AdapterNumber = $($R4)
  1945. set NewValueList = +
  1946. {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(!Manufacturer)},+
  1947. {Title,$(NoTitle),$(!REG_VT_SZ),+
  1948. "["$($R4)"] "$(Product$(ThisOption)Title)},+
  1949. {Description,$(NoTitle),$(!REG_VT_SZ),+
  1950. $(Product$(ThisOption)Description)},+
  1951. {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  1952. $(Product$(ThisOption)Name)},+
  1953. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  1954. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  1955. {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(!HideComponent)}}
  1956. Shell $(!UtilityInf), AddValueList, $(KeyNetcard), $(NewValueList)
  1957. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1958. Debug-Output "ShellCode error"
  1959. goto ShellCodeError
  1960. endif
  1961. CloseRegKey $(KeyNetcard)
  1962. set TempProdName = """"$(Product$(ThisOption)Name)$(AdapterNumber)""""
  1963. set TempBindForm = $(TempProdName)$(NetRuleHardware$(ThisOption)BindForm)
  1964. set NewValueList = +
  1965. {{type,$(NoTitle),$(!REG_VT_SZ),+
  1966. $(NetRuleHardware$(ThisOption)Type)},+
  1967. {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  1968. {class,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  1969. $(NetRuleHardware$(ThisOption)Class)}, +
  1970. ;Modified on 9/24/96 - changed ThisOption to ROUTING
  1971. ; {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  1972. {InfOption,$(NoTitle),$(!REG_VT_SZ), "RAS"}, +
  1973. {Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)}}
  1974. Shell $(!UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  1975. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1976. Debug-Output "ShellCode error."
  1977. goto ShellCodeError
  1978. endif
  1979. set RegistryErrorIndex = $($R0)
  1980. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1981. Debug-Output "Resgitry error: add value list."
  1982. CloseRegKey $(KeyParameters)
  1983. CloseRegKey $(KeyAdapterRules)
  1984. goto fatalregistry
  1985. endif
  1986. CloseRegKey $(KeyAdapterRules)
  1987. CloseRegKey $(KeyParameters)
  1988. endif ; DoRasAsyMac
  1989. ; install the connection wrapper if RAS or demand dial routing
  1990. ; installed
  1991. ifstr(i) $(LanRoutingOnly) != TRUE
  1992. Shell "" InstallNdisTapiService
  1993. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1994. Debug-Output "Error shelling InstallNdisTapiService "
  1995. goto ShellCodeError
  1996. endif
  1997. ifstr(i) $($R0) != STATUS_SUCCESSFUL
  1998. set RegistryErrorIndex = $($R0)
  1999. Debug-Output "Error installing NdisTapi Service"
  2000. goto fatalregistry
  2001. endif
  2002. endif
  2003. ; add the Radius service and create the perf counters reg keys as well
  2004. shell "" InstallRasRad
  2005. ;EndCommonCode
  2006. goto WriteParameters
  2007. WriteParameters = +
  2008. ; The various parameters for the RAS components are written to the
  2009. ; registry in this section.
  2010. ; ifstr(i) $(DoAdminOnly) == TRUE
  2011. ; goto WriteParametersOver
  2012. ; endif
  2013. StartWait
  2014. read-syms StatusUpdatingRegistry$(!STF_LANGUAGE)
  2015. shell $(subroutninf) PushBillBoard NETSTATUSDLG $(WritingRasParams)
  2016. Set BillboardVisible = 1
  2017. Debug-Output "Writing Registry Parameters."
  2018. ; Now run ipsetup.exe and/or ipxsetup.exe depending on selected protocols
  2019. set InstallRouting = FALSE
  2020. ifstr(i) $(InstallDdm) == TRUE
  2021. set InstallRouting = TRUE
  2022. else-ifstr(i) $(InstallLan) == TRUE
  2023. set InstallRouting = TRUE
  2024. endif
  2025. ; Don't show the user any UI, just silently add the required interfaces
  2026. ; and let the user add/remove routing protocols from RTRADMIN.
  2027. Debug-Output "AddRtrMgrAndLanInterfaces entry."
  2028. LibraryProcedure Result, $(PORTSDLGHANDLE), AddRtrMgrAndLanInterfaces $(fTcpIpChosen) $(fIpxChosen)
  2029. ifstr(i) $(Result) == ERROR
  2030. Shell subroutn.inf, SetupMessage $(!STF_LANGUAGE) "STATUS" $(ErrorAddingRtrMgr)
  2031. else
  2032. Debug-Output "AddRtrMgrAndLanInterfaces exit."
  2033. endif
  2034. ; Write Ras Server parameters
  2035. ; check if server is installed
  2036. ifstr(i) $(DoServer) != TRUE
  2037. goto WriteRasMan
  2038. endif
  2039. ; ; Router Service should be set to autostart only if there is
  2040. ; ; at least one dialin port and the server is Advanced.
  2041. ;
  2042. Debug-Output "OEMNSVRA.INF: Product type "$(!STF_PRODUCT)
  2043. Debug-Output "OEMNSVRA.INF: Total dialin ports "$(NewNumDialin)
  2044. Debug-Output "OEMNSVRA.INF: Total dialout ports "$(NewNumDialout)
  2045. ; default RemoteAccess start type to Demand Start
  2046. set RasStartValue = 3
  2047. ifstr(i) $(!STF_PRODUCT) != "WINNT"
  2048. ifint $(NewNumDialin) != 0
  2049. ; if this is an advanced server and there is at least one
  2050. ; dialin port, set start type to Auto Start
  2051. set RasStartValue = 2
  2052. endif
  2053. endif
  2054. set KeySvr = $(KeyNull)
  2055. OpenRegKey $(!REG_H_LOCAL) "" $(!RouterKeyName) $(!MAXIMUM_ALLOWED) KeySvr
  2056. ifstr $(KeySvr) == $(KeyNull)
  2057. Debug-Output "OEMNSVRA.INF: could not open Services\Router key"
  2058. else
  2059. ; if the user previously set the start type, then use that value
  2060. ; otherwise, set to our defaults
  2061. ifstr(i) $(!NTN_InstallMode) != install
  2062. GetRegValue $(KeySvr) "Start" StartList
  2063. ifint $(RegLastError) == 0
  2064. set RasStartValue = *($(StartList), 4)
  2065. endif
  2066. endif
  2067. ; if there are no dialin ports configured then change the start type
  2068. ; to Demand only if the service is not currently disabled.
  2069. ifint $(NewNumDialin) == 0
  2070. ifint $(RasStartValue) != 4
  2071. set RasStartValue = 3
  2072. endif
  2073. endif
  2074. Debug-Output "OEMNSVRA.INF: Setting Router start type to "$(RasStartValue)
  2075. SetRegValue $(KeySvr) {Start,$(NoTitle),$(!REG_VT_DWORD),$(RasStartValue)}
  2076. CloseRegKey $(KeySvr)
  2077. endif
  2078. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2079. ;; LAN Routing only, so no need to the following. instead go to WriteProtocolInfo
  2080. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2081. Debug-Output "WriteParameters LanRoutingOnly= "$(LanRoutingOnly)
  2082. ; If Lan routing only is chosen
  2083. ifstr(i) $(LanRoutingOnly) == TRUE
  2084. Debug-Output "WriteParameters: to WriteProtocolInfo because LanRoutingOnly enabled"
  2085. goto WriteProtocolInfo
  2086. endif
  2087. OpenRegKey $(!REG_H_LOCAL) "" $(RasSvrParamKeyName) $(!MAXIMUM_ALLOWED) KeySrvParams
  2088. ifstr $(KeySrvParams) == $(KeyNull)
  2089. Debug-Output "OEMNSVRA.INF: could not open RasSvr Params key"
  2090. set RegistryErrorIndex = UNABLE_OPEN_SERVICE_PARAMETERS
  2091. goto fatalregistry
  2092. endif
  2093. set NewValueList = +
  2094. {{NetBiosGatewayEnabled, $(NoTitle), $(!REG_VT_DWORD), $(NetBiosGtwyEnabled)}}
  2095. Shell $(!UtilityInf), AddValueList, $(KeySrvParams), $(NewValueList)
  2096. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2097. Debug-Output "AddValueList bombed out"
  2098. goto ShellCodeError
  2099. endif
  2100. set RegistryErrorIndex = $($R0)
  2101. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  2102. goto fatalregistry
  2103. endif
  2104. CloseRegKey $(KeySrvParams)
  2105. ; enable/disable RasAuto depending on whether dialout ports are configured or not
  2106. ifint $(NewNumDialout) == 0
  2107. ; no dialout ports configured, set start type to disabled
  2108. set RasAutoStartValue = 4
  2109. else
  2110. ; Modified by RamC on 10/11/96 - routing related changes
  2111. ; no need for RasAuto to be autostartable any more
  2112. ; set RasAutoStartValue = 2
  2113. set RasAutoStartValue = 3
  2114. endif
  2115. OpenRegKey $(!REG_H_LOCAL) "" $(!RasAutodialKeyName) $(!MAXIMUM_ALLOWED) KeyAuto
  2116. ifstr $(KeyAuto) == $(KeyNull)
  2117. Debug-Output "OEMNSVRA.INF: could not open RasAuto key"
  2118. else
  2119. Debug-Output "OEMNSVRA.INF: Setting RasAuto start type to "$(RasAutoStartValue)
  2120. SetRegValue $(KeyAuto) {Start,$(NoTitle),$(!REG_VT_DWORD),$(RasAutoStartValue)}
  2121. CloseRegKey $(KeyAuto)
  2122. endif
  2123. WriteRasMan = +
  2124. ; Write RasMan parameters
  2125. OpenRegKey $(!REG_H_LOCAL) "" $(RasManParamKeyName) $(!MAXIMUM_ALLOWED) KeyRasManParams
  2126. ifstr $(KeyRasManParams) == $(KeyNull)
  2127. Debug-Output "OEMNSVRA.INF: could not open RasMan Params key"
  2128. set RegistryErrorIndex = UNABLE_OPEN_SERVICE_PARAMETERS
  2129. goto fatalregistry
  2130. endif
  2131. ; set the appropriate media dll name based on what media type is installed
  2132. ; on the system.
  2133. ; rasser is the name of the media DLL - rasser.dll
  2134. set MediaValue = {"rastapi"}
  2135. ifstr(i) $(fSerialInstalled) == TRUE
  2136. set MediaValue = >($(MediaValue), "rasser")
  2137. endif
  2138. ; now determine if any other devices are configured for RAS and add
  2139. ; those medias as well to the RasMan Medias parameter.
  2140. set OtherConfigKey = $(!NTN_SoftwareBase)"\"$(!Manufacturer)"\"$(ProductRASName)"\OTHER DEVICES\CONFIGURED"
  2141. set KeyOtherMedia = $(KeyNull)
  2142. OpenRegKey $(!REG_H_LOCAL) "" $(OtherConfigKey) $(!MAXIMUM_ALLOWED) +
  2143. KeyOtherMedia
  2144. ifstr $(KeyOtherMedia) != $(KeyNull)
  2145. EnumRegKey $(KeyOtherMedia) OtherList
  2146. Debug-Output "OEMNSVRA.INF: Other Media list "$(OtherList)
  2147. ForListDo $(OtherList)
  2148. set MediaName = *($($),1)
  2149. set KeyMedia = $(KeyNull)
  2150. OpenRegKey $(KeyOtherMedia) "" $(MediaName) $(!MAXIMUM_ALLOWED) +
  2151. KeyMedia
  2152. ifstr $(KeyMedia) != $(KeyNull)
  2153. GetRegValue $(KeyMedia), "MediaType" MediaType
  2154. Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  2155. set MediaTypeValue = *($(MediaType),4)
  2156. set MediaValue = >($(MediaValue), $(MediaTypeValue))
  2157. endif
  2158. CloseRegKey $(KeyMedia)
  2159. endif
  2160. EndForListDo
  2161. CloseRegKey $(KeyOtherMedia)
  2162. else
  2163. Debug-Output "OEMNSVRA.INF: Other Media not configured"
  2164. endif
  2165. Debug-Output "Adding Medias as "$(MediaValue)
  2166. set NewValueList = {{Medias,$(NoTitle),$(!REG_VT_MULTI_SZ),$(MediaValue)}}
  2167. Shell $(!UtilityInf), AddValueList, $(KeyRasManParams), $(NewValueList)
  2168. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2169. Debug-Output "AddValueList bombed out"
  2170. goto ShellCodeError
  2171. endif
  2172. set RegistryErrorIndex = $($R0)
  2173. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  2174. goto fatalregistry
  2175. endif
  2176. CloseRegKey $(KeyRasManParams)
  2177. WriteNdisWan = +
  2178. set PrevNumPorts = 0
  2179. set PrevNumDialin = 0
  2180. set PrevNumDialout = 0
  2181. ; determine the number of ports currently configured
  2182. OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacParamKeyName) $(!MAXIMUM_ALLOWED) KeyMacParams
  2183. ifstr $(KeyMacParams) == $(KeyNull)
  2184. ifstr(i) $(!NTN_InstallMode) == configure
  2185. Debug-Output "OEMNSVRA.INF: could not open AsyncMac Params key"
  2186. set RegistryErrorIndex = UNABLE_OPEN_SERVICE_PARAMETERS
  2187. goto fatalregistry
  2188. endif
  2189. goto WriteNdisWan1
  2190. endif
  2191. GetRegValue $(KeyMacParams), "Ports" PortsInfo
  2192. GetRegValue $(KeyMacParams), "DialinNBF" DialinNBFInfo
  2193. GetRegValue $(KeyMacParams), "DialoutNBF" DialoutNBFInfo
  2194. GetRegValue $(KeyMacParams), "DialinIP" DialinIPInfo
  2195. GetRegValue $(KeyMacParams), "DialoutIP" DialoutIPInfo
  2196. GetRegValue $(KeyMacParams), "DialinoutIPX" DialinoutIPXInfo
  2197. set PrevNumPorts = *($(PortsInfo), 4)
  2198. set PrevNumDialinNBF = *($(DialinNBFInfo), 4)
  2199. set PrevNumDialoutNBF = *($(DialoutNBFInfo), 4)
  2200. set PrevNumDialinIP = *($(DialinIPInfo), 4)
  2201. set PrevNumDialoutIP = *($(DialoutIPInfo), 4)
  2202. set PrevNumDialinoutIPX = *($(DialinoutIPXInfo), 4)
  2203. Debug-Output "Ports currently configured "$(PrevNumPorts)
  2204. Debug-Output "Ports currently dialin NBF "$(PrevNumDialinNBF)
  2205. Debug-Output "Ports currently dialout NBF "$(PrevNumDialoutNBF)
  2206. Debug-Output "Ports currently dialin IP "$(PrevNumDialinIP)
  2207. Debug-Output "Ports currently diaout IP "$(PrevNumDialoutIP)
  2208. Debug-Output "Ports currently diainout IPX "$(PrevNumDialinoutIPX)
  2209. CloseRegKey $(KeyMacParams)
  2210. WriteNdisWan1 =+
  2211. ; Write NdisWan parameters and add/delete netcards
  2212. set ThisOption = NDISWAN
  2213. set RasSpecificString = $(!Product$(ThisOption)Name)
  2214. ; Always update the EndPoints
  2215. OpenRegKey $(!REG_H_LOCAL) "" $(NdisWanParamKeyName) $(!MAXIMUM_ALLOWED) KeyHubParams
  2216. ifstr $(KeyHubParams) == $(KeyNull)
  2217. Debug-Output "OEMNSVRA.INF: could not open NdisWan Params key"
  2218. set RegistryErrorIndex = UNABLE_OPEN_SERVICE_PARAMETERS
  2219. goto fatalregistry
  2220. endif
  2221. set NewValueList = +
  2222. {{EndPoints, $(NoTitle), $(!REG_VT_MULTI_SZ), $(NewNumPortsList)}}
  2223. Shell $(!UtilityInf), AddValueList, $(KeyHubParams), $(NewValueList)
  2224. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2225. Debug-Output "AddValueList bombed out"
  2226. goto ShellCodeError
  2227. endif
  2228. set RegistryErrorIndex = $($R0)
  2229. CloseRegKey $(KeyHubParams)
  2230. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  2231. goto fatalregistry
  2232. endif
  2233. ; if there is no change in the number of dialin/dialout ports
  2234. ; just update the RasMac section
  2235. ifint $(PrevNumDialinNBF) == $(NewNumDialinNBF)
  2236. ifint $(PrevNumDialoutNBF) == $(NewNumDialoutNBF)
  2237. ifint $(PrevNumDialinIP) == $(NewNumDialinIP)
  2238. ifint $(PrevNumDialoutIP) == $(NewNumDialoutIP)
  2239. ifint $(PrevNumDialinoutIPX) == $(NewNumDialinoutIPX)
  2240. set CommonStatus = STATUS_USERCANCEL
  2241. goto WriteRasAsyMac
  2242. endif
  2243. endif
  2244. endif
  2245. endif
  2246. endif
  2247. set NumAddDialinNBF = 0
  2248. set NumAddDialoutNBF = 0
  2249. set NumRemoveDialinNBF = 0
  2250. set NumRemoveDialoutNBF = 0
  2251. set NumAddDialinIP = 0
  2252. set NumAddDialoutIP = 0
  2253. set NumRemoveDialinIP = 0
  2254. set NumRemoveDialoutIP = 0
  2255. ; now calculate the total number of adapters to add and remove for
  2256. ; each protocol
  2257. ifint $(PrevNumDialinNBF) > $(NewNumDialinNBF)
  2258. set-sub NumRemoveDialinNBF = $(PrevNumDialinNBF), $(NewNumDialinNBF)
  2259. else
  2260. set-sub NumAddDialinNBF = $(NewNumDialinNBF), $(PrevNumDialinNBF)
  2261. endif
  2262. ifint $(PrevNumDialoutNBF) > $(NewNumDialoutNBF)
  2263. set-sub NumRemoveDialoutNBF = $(PrevNumDialoutNBF), $(NewNumDialoutNBF)
  2264. else
  2265. set-sub NumAddDialoutNBF = $(NewNumDialoutNBF), $(PrevNumDialoutNBF)
  2266. endif
  2267. ; we need to determine the #dialout IP adapters to add/remove, because
  2268. ; these are not shared between nbf and IP.
  2269. ifint $(PrevNumDialinIP) > $(NewNumDialinIP)
  2270. set-sub NumRemoveDialinIP = $(PrevNumDialinIP), $(NewNumDialinIP)
  2271. else
  2272. set-sub NumAddDialinIP = $(NewNumDialinIP), $(PrevNumDialinIP)
  2273. endif
  2274. ifint $(PrevNumDialoutIP) > $(NewNumDialoutIP)
  2275. set-sub NumRemoveDialoutIP = $(PrevNumDialoutIP), $(NewNumDialoutIP)
  2276. else
  2277. set-sub NumAddDialoutIP = $(NewNumDialoutIP), $(PrevNumDialoutIP)
  2278. endif
  2279. ; we need to determine the IPX adapter to remove/add
  2280. ifint $(PrevNumDialinoutIPX) > $(NewNumDialinoutIPX)
  2281. set-sub NumRemoveDialinoutIPX = $(PrevNumDialinoutIPX), $(NewNumDialinoutIPX)
  2282. else
  2283. set-sub NumAddDialinoutIPX = $(NewNumDialinoutIPX), $(PrevNumDialinoutIPX)
  2284. endif
  2285. set NumAddTotal = 0
  2286. set NumRemoveTotal = 0
  2287. set-add NumAddTotal = $(NumAddDialinNBF), $(NumAddDialoutNBF)
  2288. set-add NumAddTotal = $(NumAddTotal), $(NumAddDialinIP)
  2289. set-add NumAddTotal = $(NumAddTotal), $(NumAddDialoutIP)
  2290. set-add NumAddTotal = $(NumAddTotal), $(NumAddDialinoutIPX)
  2291. set-add NumRemoveTotal = $(NumRemoveDialinNBF), $(NumRemoveDialoutNBF)
  2292. set-add NumRemoveTotal = $(NumRemoveTotal), $(NumRemoveDialinIP)
  2293. set-add NumRemoveTotal = $(NumRemoveTotal), $(NumRemoveDialoutIP)
  2294. set-add NumRemoveTotal = $(NumRemoveTotal), $(NumRemoveDialinoutIPX)
  2295. Debug-Output "NumAddDialinNBF = "$(NumAddDialinNBF)
  2296. Debug-Output "NumAddDialoutNBF = "$(NumAddDialoutNBF)
  2297. Debug-Output "NumAddDialinIP = "$(NumAddDialinIP)
  2298. Debug-Output "NumAddDialoutIP = "$(NumAddDialoutIP)
  2299. Debug-Output "NumAddDialinoutIPX = "$(NumAddDialinoutIPX)
  2300. Debug-Output "NumAddTotal = "$(NumAddTotal)
  2301. Debug-Output "NumRemoveDialinNBF = "$(NumRemoveDialinNBF)
  2302. Debug-Output "NumRemoveDialinIP = "$(NumRemoveDialinIP)
  2303. Debug-Output "NumRemoveDialinoutIPX = "$(NumRemoveDialinoutIPX)
  2304. Debug-Output "NumRemoveTotal = "$(NumRemoveTotal)
  2305. ; Open the root of the services area and the root of the networkcards
  2306. ; registry key and pass these keys to the AddHardwareComponent call.
  2307. ; this should reduce the number of opens/closes made to the sam
  2308. ; registry area and speed up the adapter creation.
  2309. Shell "utility.inf" BaseServiceKey
  2310. set RegistryErrorIndex = $($R0)
  2311. Ifstr(i) $(RegistryErrorIndex) == NO_ERROR
  2312. Debug-Output "OEMNSVRA.INF: Opened the services base key"
  2313. set ServicesBaseKey = $($R1)
  2314. else
  2315. set ServicesBaseKey = $(KeyNull)
  2316. endif
  2317. OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) KeyNetcards
  2318. Ifstr(i) $(RegistryErrorIndex) == NO_ERROR
  2319. Debug-Output "OEMNSVRA.INF: Opened the networkcardkey "
  2320. endif
  2321. ; start with 1
  2322. set RasAdapterNumber = 1
  2323. ; Create the HARDWARE\Netcard region and its corresponding service
  2324. AddNdisWanNetCard = +
  2325. IfInt $(NumAddTotal) == 0
  2326. goto RemoveNdisWanNetCard
  2327. else
  2328. Debug-Output "In the Add if loop. NumAddTotal = "$(NumAddTotal)
  2329. ; display the adapter number we are adding so that the user
  2330. ; knows what is going on
  2331. shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  2332. $(WritingRasParamsAdd)" "$(NumAddTotal)
  2333. set-sub NumAddTotal = $(NumAddTotal),1
  2334. Shell $(!UtilityInf), AddHardwareComponent, +
  2335. $(!Product$(ThisOption)Name),$(!RasInfName),+
  2336. $(!Product$(ThisOption)KeyName), +
  2337. $(ServicesBaseKey), $(KeyNetcards), $(RasAdapterNumber)
  2338. ifint $($R4) != -1
  2339. Set !NETCARD_LIST = >($(!NETCARD_LIST), +
  2340. {$(!Product$(ThisOption)Name),+
  2341. $(!NetworkCardKeyName)"\"$($R4)})
  2342. ; save the adapter number for the next call to AddHardwareComponent
  2343. set RasAdapterNumber = $($R4)
  2344. endif
  2345. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2346. Debug-Output "Cannot add hardware component"
  2347. goto ShellCodeError
  2348. endif
  2349. set RegistryErrorIndex = $($R0)
  2350. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  2351. Debug-Output "Registry error: add hardware component"
  2352. CloseRegKey $($R1)
  2353. CloseRegKey $($R2)
  2354. CloseRegKey $($R3)
  2355. goto fatalregistry
  2356. endif
  2357. ; At this point:
  2358. ; $R1 Registry key variable for HARDWARE\Netcard\(n)
  2359. ; $R2 Registry key variable for HARDWARE\Netcard\(n)\\NetRules
  2360. ; $R3 Registry key handle for <service>\Parameters key
  2361. ; $R4 Adapter number assigned to adapter
  2362. ; $R5 Service name generated by combining svc name with adapter
  2363. ; number
  2364. set KeyNetcard = $($R1)
  2365. set KeyParameters = $($R3)
  2366. set KeyAdapterRules = $($R2)
  2367. set AdapterNumber = $($R4)
  2368. set NetcardInfoList = +
  2369. {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(!Manufacturer)},+
  2370. {Title,$(NoTitle),$(!REG_VT_SZ),+
  2371. "["$($R4)"] "$(!Product$(ThisOption)Title)},+
  2372. {Description,$(NoTitle),$(!REG_VT_SZ),+
  2373. $(!Product$(ThisOption)Description)},+
  2374. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  2375. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  2376. {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(!HideComponent)}}
  2377. Shell $(!UtilityInf), GetBusTypeNum
  2378. set BusTypeNum = $($R1)
  2379. ifint $(NumAddDialinNBF) > 0
  2380. set-sub NumAddDialinNBF = $(NumAddDialinNBF), 1
  2381. set NetcardInfoList = >($(NetcardInfoList), +
  2382. {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  2383. $(!Product$(ThisOption)DIALINName)})
  2384. set ServiceParamList = +
  2385. {{EnumExportPref,$(NoTitle),$(!REG_VT_DWORD),0},+
  2386. {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeNum)}}
  2387. set AdapterType = $(!NetRuleHardwareDIALINType)
  2388. set AdapterClass = $(!NetRuleHardwareDIALINClass)
  2389. set AdapterBlock = $(!NetRuleHardwareDIALINBlock)
  2390. else-ifint $(NumAddDialoutNBF) > 0
  2391. set-sub NumAddDialoutNBF = $(NumAddDialoutNBF), 1
  2392. set NetcardInfoList = >($(NetcardInfoList), +
  2393. {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  2394. $(!Product$(ThisOption)DIALOUTName)})
  2395. set ServiceParamList = +
  2396. {{EnumExportPref,$(NoTitle),$(!REG_VT_DWORD),1},+
  2397. {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeNum)}}
  2398. set AdapterType = $(!NetRuleHardwareDIALOUTType)
  2399. set AdapterClass = $(!NetRuleHardwareDIALOUTClass)
  2400. set AdapterBlock = $(!NetRuleHardwareDIALOUTBlock)
  2401. else-ifint $(NumAddDialinIP) > 0
  2402. set-sub NumAddDialinIP = $(NumAddDialinIP), 1
  2403. set NetcardInfoList = >($(NetcardInfoList), +
  2404. {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  2405. $(!Product$(ThisOption)DIALINIPName)})
  2406. ; we need to identify if we are a server ip binding so that
  2407. ; we can special case some parameters
  2408. set ServiceParamList = +
  2409. {{EnumExportPref,$(NoTitle),$(!REG_VT_DWORD),0},+
  2410. {AutoIPAddress,$(NoTitle),$(!REG_VT_DWORD),1},+
  2411. {ServerAdapter,$(NoTitle),$(!REG_VT_DWORD),1},+
  2412. {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeNum)}}
  2413. set AdapterType = $(!NetRuleHardwareDIALINIPType)
  2414. set AdapterClass = $(!NetRuleHardwareDIALINIPClass)
  2415. set AdapterBlock = $(!NetRuleHardwareDIALINIPBlock)
  2416. else-ifint $(NumAddDialoutIP) > 0
  2417. set-sub NumAddDialoutIP = $(NumAddDialoutIP), 1
  2418. set NetcardInfoList = >($(NetcardInfoList), +
  2419. {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  2420. $(!Product$(ThisOption)DIALOUTIPName)})
  2421. set ServiceParamList = +
  2422. {{EnumExportPref,$(NoTitle),$(!REG_VT_DWORD),1},+
  2423. {AutoIPAddress,$(NoTitle),$(!REG_VT_DWORD),1},+
  2424. {ServerAdapter,$(NoTitle),$(!REG_VT_DWORD),0},+
  2425. {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeNum)}}
  2426. set AdapterType = $(!NetRuleHardwareDIALOUTIPType)
  2427. set AdapterClass = $(!NetRuleHardwareDIALOUTIPClass)
  2428. set AdapterBlock = $(!NetRuleHardwareDIALOUTIPBlock)
  2429. else-ifint $(NumAddDialinoutIPX) > 0
  2430. set-sub NumAddDialinoutIPX = $(NumAddDialinoutIPX), 1
  2431. set NetcardInfoList = >($(NetcardInfoList), +
  2432. {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  2433. $(!Product$(ThisOption)DIALINOUTIPXName)})
  2434. set ServiceParamList = +
  2435. {{EnumExportPref,$(NoTitle),$(!REG_VT_DWORD),0},+
  2436. {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeNum)}}
  2437. set AdapterType = $(!NetRuleHardwareDIALINOUTIPXType)
  2438. set AdapterClass = $(!NetRuleHardwareDIALINOUTIPXClass)
  2439. set AdapterBlock = $(!NetRuleHardwareDIALINOUTIPXBlock)
  2440. endif
  2441. Shell $(!UtilityInf), AddValueList, $(KeyNetcard), $(NetcardInfoList)
  2442. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2443. Debug-Output "ShellCode error"
  2444. goto ShellCodeError
  2445. endif
  2446. CloseRegKey $(KeyNetcard)
  2447. set TempProdName = """"$(!Product$(ThisOption)Name)$(AdapterNumber)""""
  2448. set TempBindForm = $(TempProdName)$(!NetRuleHardware$(ThisOption)BindForm)
  2449. set AdapterRulesList = +
  2450. {{type,$(NoTitle),$(!REG_VT_SZ),+
  2451. $(AdapterType)},+
  2452. {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)},+
  2453. {class,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  2454. $(AdapterClass)},+
  2455. {block,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  2456. $(AdapterBlock)},+
  2457. ;Modified on 9/24/96 by Ramc - changed ThisOption to ROUTING
  2458. ; {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)},+
  2459. {InfOption,$(NoTitle),$(!REG_VT_SZ), "RAS"},+
  2460. {Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)}}
  2461. Shell $(!UtilityInf), AddValueList, $(KeyAdapterRules), $(AdapterRulesList)
  2462. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2463. Debug-Output "ShellCode error."
  2464. goto ShellCodeError
  2465. endif
  2466. set RegistryErrorIndex = $($R0)
  2467. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  2468. Debug-Output "Resgitry error: add value list."
  2469. CloseRegKey $(KeyParameters)
  2470. CloseRegKey $(KeyAdapterRules)
  2471. goto fatalregistry
  2472. endif
  2473. CloseRegKey $(KeyAdapterRules)
  2474. Shell $(!UtilityInf), AddValueList, $(KeyParameters), $(ServiceParamList)
  2475. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2476. Debug-Output "ShellCode error."
  2477. goto ShellCodeError
  2478. endif
  2479. CloseRegKey $(KeyParameters)
  2480. goto AddNdisWanNetCard
  2481. endif ; IfInt NumAddTotal == 0
  2482. RemoveNdisWanNetCard = +
  2483. ifstr(i) $(ServicesBaseKey) != $(KeyNull)
  2484. CloseRegKey $(ServicesBaseKey)
  2485. endif
  2486. ifstr(i) $(KeyNetcards) != $(KeyNull)
  2487. CloseRegKey $(KeyNetcards)
  2488. endif
  2489. ; set the flags to make sure that the tcp and ipx adapters are
  2490. ; removed
  2491. Ifint $(NumRemoveTotal) == 0
  2492. goto WriteRasAsyMac
  2493. endif
  2494. Debug-Output "Removing NdisWan netcard entry..."
  2495. ; The user removed some ports during configuration, so
  2496. ; we need to delete the extra ports previously configured
  2497. OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) KeyNetcards
  2498. ifstr $(KeyNetcards) == $(KeyNull)
  2499. Debug-Output "OEMNSVRA.INF: could not open Netcards key"
  2500. set RegistryErrorIndex = UNABLE_OPEN_NETWORKCARD_SECTION
  2501. goto fatalregistry
  2502. endif
  2503. EnumRegKey $(KeyNetcards) NetcardsList
  2504. set RemoveDialinList = {}
  2505. set RemoveDialinIpList = {}
  2506. set RemoveDialoutList = {}
  2507. set RemoveDialoutIpList = {}
  2508. set RemoveDialinoutIpxList = {}
  2509. ForListDo $(NetcardsList)
  2510. set KeyName = *($($),1)
  2511. OpenRegKey $(KeyNetcards) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  2512. ifstr $(Card) == $(KeyNull)
  2513. Debug-Output "OEMNSVRA.INF: could not open netcard key"
  2514. set RegistryErrorIndex = UNABLE_OPEN_NETWORKCARD_SECTION
  2515. goto fatalregistry
  2516. endif
  2517. GetRegValue $(Card), "ProductName" ProductNameInfo
  2518. set CardProductName = *($(ProductNameInfo), 4)
  2519. ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINName)
  2520. set RemoveDialinList = >($(RemoveDialinList), +
  2521. {$(!ProductNDISWANName),+
  2522. $(!NetworkCardKeyName)"\"$(KeyName)})
  2523. else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINIPName)
  2524. set RemoveDialinIpList = >($(RemoveDialinIpList), +
  2525. {$(!ProductNDISWANName),+
  2526. $(!NetworkCardKeyName)"\"$(KeyName)})
  2527. else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTName)
  2528. set RemoveDialoutList = >($(RemoveDialoutList), +
  2529. {$(!ProductNDISWANName),+
  2530. $(!NetworkCardKeyName)"\"$(KeyName)})
  2531. else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTIPName)
  2532. set RemoveDialoutIpList = >($(RemoveDialoutIpList), +
  2533. {$(!ProductNDISWANName),+
  2534. $(!NetworkCardKeyName)"\"$(KeyName)})
  2535. else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINOUTIPXName)
  2536. set RemoveDialinoutIpxList = >($(RemoveDialinoutIpxList), +
  2537. {$(!ProductNDISWANName),+
  2538. $(!NetworkCardKeyName)"\"$(KeyName)})
  2539. endif
  2540. CloseRegKey $(Card)
  2541. EndForListDo
  2542. CloseRegKey $(KeyNetcards)
  2543. ; first remove the IP adapter if needed
  2544. QueryListSize IpNetCards $(RemoveDialinIpList)
  2545. ifint $(IpNetCards) != 0
  2546. ForListDo $(RemoveDialinIpList)
  2547. ifint $(NumRemoveDialinIP) == 0
  2548. goto RemoveDialinIPX
  2549. endif
  2550. set-sub NumRemoveDialinIP = $(NumRemoveDialinIP), 1
  2551. ; display the adapter number we are adding so that the user
  2552. ; knows what is going on
  2553. shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  2554. $(WritingRasParamsRemove)" "$(NumRemoveTotal)
  2555. set-sub NumRemoveTotal = $(NumRemoveTotal), 1
  2556. debug-output "Removing hardware component: "$($)
  2557. Shell $(!UtilityInf), RemoveHardwareComponent, +
  2558. $(!Manufacturer), *($($),1), *($($),2)
  2559. EndForListDo
  2560. endif
  2561. RemoveDialinIPX =+
  2562. ; then remove the IPX adapter if needed
  2563. QueryListSize IpxNetCards $(RemoveDialinoutIpxList)
  2564. ifint $(IpxNetCards) != 0
  2565. ForListDo $(RemoveDialinoutIpxList)
  2566. ifint $(NumRemoveDialinoutIPX) == 0
  2567. goto RemoveDialinNBF
  2568. endif
  2569. set-sub NumRemoveDialinoutIPX = $(NumRemoveDialinoutIPX), 1
  2570. debug-output "Removing hardware component: "$($)
  2571. ; display the adapter number we are adding so that the user
  2572. ; knows what is going on
  2573. shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  2574. $(WritingRasParamsRemove)" "$(NumRemoveTotal)
  2575. set-sub NumRemoveTotal = $(NumRemoveTotal), 1
  2576. Shell $(!UtilityInf), RemoveHardwareComponent, +
  2577. $(!Manufacturer), *($($),1), *($($),2)
  2578. EndForListDo
  2579. endif
  2580. RemoveDialinNBF =+
  2581. ForListDo $(RemoveDialinList)
  2582. ifint $(NumRemoveDialinNBF) == 0
  2583. goto RemoveDialout
  2584. endif
  2585. set-sub NumRemoveDialinNBF = $(NumRemoveDialinNBF), 1
  2586. ; display the adapter number we are adding so that the user
  2587. ; knows what is going on
  2588. shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  2589. $(WritingRasParamsRemove)" "$(NumRemoveTotal)
  2590. set-sub NumRemoveTotal = $(NumRemoveTotal), 1
  2591. debug-output "Removing hardware component: "$($)
  2592. Shell $(!UtilityInf), RemoveHardwareComponent, $(!Manufacturer),+
  2593. *($($),1), *($($),2)
  2594. EndForListDo
  2595. RemoveDialout = +
  2596. ; first remove the IP adapter if needed
  2597. QueryListSize IpNetCards $(RemoveDialoutIpList)
  2598. ifint $(IpNetCards) != 0
  2599. ForListDo $(RemoveDialoutIpList)
  2600. ifint $(NumRemoveDialoutIP) == 0
  2601. goto RemoveDialoutNBF
  2602. endif
  2603. set-sub NumRemoveDialoutIP = $(NumRemoveDialoutIP), 1
  2604. ; display the adapter number we are adding so that the user
  2605. ; knows what is going on
  2606. shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  2607. $(WritingRasParamsRemove)" "$(NumRemoveTotal)
  2608. set-sub NumRemoveTotal = $(NumRemoveTotal), 1
  2609. debug-output "Removing hardware component: "$($)
  2610. Shell $(!UtilityInf), RemoveHardwareComponent, +
  2611. $(!Manufacturer), *($($),1), *($($),2)
  2612. EndForListDo
  2613. endif
  2614. RemoveDialoutNBF =+
  2615. ForListDo $(RemoveDialoutList)
  2616. ifint $(NumRemoveDialoutNBF) == 0
  2617. goto WriteRasAsyMac
  2618. endif
  2619. set-sub NumRemoveDialoutNBF = $(NumRemoveDialoutNBF), 1
  2620. ; display the adapter number we are adding so that the user
  2621. ; knows what is going on
  2622. shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  2623. $(WritingRasParamsRemove)" "$(NumRemoveTotal)
  2624. set-sub NumRemoveTotal = $(NumRemoveTotal), 1
  2625. debug-output "Removing hardware component: "$($)
  2626. Shell $(!UtilityInf), RemoveHardwareComponent, $(!Manufacturer),+
  2627. *($($),1), *($($),2)
  2628. EndForListDo
  2629. ; Write RasAsyMac parameters
  2630. WriteRasAsyMac = +
  2631. ; enable AsyncMac service
  2632. ; if
  2633. ; One or more serial ports is configured
  2634. ; OR one or more rasether ports is configured
  2635. ; OR one or more unimodem devices is configured
  2636. ;
  2637. ifstr(i) $(fSerialInstalled) == TRUE
  2638. set AsyStartValue = 2
  2639. else-ifstr(i) $(fOtherInstalled) == TRUE
  2640. set AsyStartValue = 2
  2641. else-ifstr(i) $(fUnimodemInstalled) == TRUE
  2642. set AsyStartValue = 2
  2643. else
  2644. set AsyStartValue = 4
  2645. endif
  2646. OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacKeyName) $(!MAXIMUM_ALLOWED) KeyMac
  2647. ifstr $(KeyMac) == $(KeyNull)
  2648. Debug-Output "OEMNSVRA.INF: could not open AsyncMac key"
  2649. else
  2650. SetRegValue $(KeyMac) {Start,$(NoTitle),$(!REG_VT_DWORD),$(AsyStartValue)}
  2651. CloseRegKey $(KeyMac)
  2652. endif
  2653. ifint $(PrevNumPorts) == $(NewNumPorts)
  2654. ifint $(PrevNumDialinNBF) == $(NewNumDialinNBF)
  2655. ifint $(PrevNumDialoutNBF) == $(NewNumDialoutNBF)
  2656. ifint $(PrevNumDialinIP) == $(NewNumDialinIP)
  2657. ifint $(PrevNumDialoutIP) == $(NewNumDialoutIP)
  2658. ifint $(PrevNumDialinoutIPX) == $(NewNumDialinoutIPX)
  2659. EndWait
  2660. Ifint $(BillboardVisible) != 0
  2661. Shell "subroutn.inf" PopBillboard
  2662. Set BillboardVisible = 0
  2663. Endif
  2664. goto WriteProtocolInfo
  2665. endif
  2666. endif
  2667. endif
  2668. endif
  2669. endif
  2670. endif
  2671. OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacParamKeyName) $(!MAXIMUM_ALLOWED) KeyMacParams
  2672. ifstr $(KeyMacParams) == $(KeyNull)
  2673. Debug-Output "OEMNSVRA.INF: could not open AsyncMac Params key"
  2674. set RegistryErrorIndex = UNABLE_OPEN_SERVICE_PARAMETERS
  2675. goto fatalregistry
  2676. endif
  2677. set NewValueList = +
  2678. {{Ports, $(NoTitle), $(!REG_VT_DWORD), $(NewNumPorts)},+
  2679. {DialinNBF, $(NoTitle), $(!REG_VT_DWORD), $(NewNumDialinNBF)},+
  2680. {DialoutNBF, $(NoTitle), $(!REG_VT_DWORD), $(NewNumDialoutNBF)},+
  2681. {DialinIP, $(NoTitle), $(!REG_VT_DWORD), $(NewNumDialinIP)},+
  2682. {DialoutIP, $(NoTitle), $(!REG_VT_DWORD), $(NewNumDialoutIP)},+
  2683. {DialinoutIPX, $(NoTitle), $(!REG_VT_DWORD), $(NewNumDialinoutIPX)}}
  2684. Shell $(!UtilityInf), AddValueList, $(KeyMacParams), $(NewValueList)
  2685. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2686. Debug-Output "AddValueList bombed out"
  2687. goto ShellCodeError
  2688. endif
  2689. set RegistryErrorIndex = $($R0)
  2690. CloseRegKey $(KeyMacParams)
  2691. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  2692. goto fatalregistry
  2693. endif
  2694. OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) KeyNetcards
  2695. ifstr $(KeyNetcards) == $(KeyNull)
  2696. Debug-Output "OEMNSVRA.INF: could not open Netcards key"
  2697. set RegistryErrorIndex = UNABLE_OPEN_NETWORKCARD_SECTION
  2698. goto fatalregistry
  2699. endif
  2700. EnumRegKey $(KeyNetcards) NetcardsList
  2701. ForListDo $(NetcardsList)
  2702. set KeyName = *($($),1)
  2703. OpenRegKey $(KeyNetcards) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  2704. ifstr $(Card) == $(KeyNull)
  2705. Debug-Output "OEMNSVRA.INF: could not open netcard key"
  2706. set RegistryErrorIndex = UNABLE_OPEN_NETWORKCARD_SECTION
  2707. goto fatalregistry
  2708. endif
  2709. GetRegValue $(Card), "ProductName" ProductNameInfo
  2710. set CardProductName = *($(ProductNameInfo), 4)
  2711. ifstr(i) $(CardProductName) == $(ProductRASASYMACName)
  2712. goto RasMacCardFound
  2713. endif
  2714. CloseRegKey $(Card)
  2715. EndForListDo
  2716. CloseRegKey $(KeyNetcards)
  2717. RasMacCardFound = +
  2718. Debug-Output "Shelling to find AsyncMac Service."
  2719. Shell $(!UtilityInf) FindService, $(Card)
  2720. CloseRegKey $(Card)
  2721. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2722. Debug-Output "OEMNSVRA.INF: shell Findservice failed"
  2723. goto ShellCodeError
  2724. endif
  2725. ifstr(i) $($R0) != NO_ERROR
  2726. Debug-Output "OEMNSVRA.INF: findservice failed."
  2727. goto fatalregistry
  2728. endif
  2729. set KeyParameters = $($R2)
  2730. CloseRegKey $($R1)
  2731. Shell $(!UtilityInf), GetBusTypeNum
  2732. set BusTypeNum = $($R1)
  2733. set NewValueList = +
  2734. {{Ports, $(NoTitle), $(!REG_VT_DWORD), $(NewNumPorts)}, +
  2735. {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeNum)}}
  2736. Shell $(!UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  2737. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2738. Debug-Output "AddValueList bombed out"
  2739. goto ShellCodeError
  2740. endif
  2741. set RegistryErrorIndex = $($R0)
  2742. CloseRegKey $(KeyParameters)
  2743. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  2744. goto fatalregistry
  2745. endif
  2746. WriteProtocolInfo =+
  2747. ifstr(i) $(LanRoutingOnly) == TRUE
  2748. shell "" SetLanOnlyMode 1
  2749. else
  2750. shell "" SetLanOnlyMode 0
  2751. endif
  2752. Shell "" SaveSelectedProtocols $(fNetbeuiSelected) $(fTcpIpSelected) +
  2753. $(fIpxSelected) $(fNetbeuiAllowed) +
  2754. $(fTcpIpAllowed) $(fIpxAllowed) $(dwRouterType)
  2755. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2756. Debug-Output "Error shelling SaveSelectedProtocols"
  2757. goto ShellCodeError
  2758. endif
  2759. ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2760. Debug-Output "Error Saving selected protocols"
  2761. goto end
  2762. endif
  2763. ; the PPP information only applies to RAS configuration
  2764. ifstr(i) $(LanRoutingOnly) != TRUE
  2765. ; Write the PPP parameters which will also ensure that the PPP key
  2766. ; is deleted and recreated.
  2767. Shell "" WritePPPParameters
  2768. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2769. Debug-Output "Error shelling WritePPPParameters"
  2770. goto ShellCodeError
  2771. endif
  2772. ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2773. Debug-Output "Error from WritePPPParameters"
  2774. goto end
  2775. endif
  2776. endif
  2777. ifstr(i) $(fNetbeuiChosen) == TRUE
  2778. ifstr(i) $(fNetbeuiInstalled) == FALSE
  2779. Shell "" InstallProtocol "NETBEUI"
  2780. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2781. Debug-Output "Error shelling InstallProtocol NETBEUI"
  2782. goto ShellCodeError
  2783. endif
  2784. ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2785. Debug-Output "Error installing NETBEUI"
  2786. goto end
  2787. endif
  2788. endif
  2789. endif
  2790. ifstr(i) $(fTcpIpChosen) == TRUE
  2791. ifstr(i) $(fTcpIpInstalled) == FALSE
  2792. Shell "" InstallProtocol "TCPIP"
  2793. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2794. Debug-Output "Error shelling InstallProtocol TCPIP"
  2795. goto ShellCodeError
  2796. endif
  2797. ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2798. Debug-Output "Error installing TCPIP"
  2799. goto end
  2800. endif
  2801. endif
  2802. ; ; install the rasarp service if previously not installed
  2803. ; Modified on 9/19 by RamC for routing related changes
  2804. ; WanArp takes over the place of RasArp, so we don't install RasArp any more
  2805. ; Shell "" InstallRasArpService
  2806. ; ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2807. ; Debug-Output "Error shelling InstallRasArpService"
  2808. ; goto ShellCodeError
  2809. ; endif
  2810. ; ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2811. ; Debug-Output "Error from InstallRasArpService"
  2812. ; goto end
  2813. ; endif
  2814. ; we don't install snmp service anymore. The snmp agents will
  2815. ; be added if snmp is installed - BUGBUG if we discover that
  2816. ; snmp is not installed should we warn the user to install it?
  2817. ; ; install snmp service if previously not installed
  2818. ; Shell "" InstallSnmpService
  2819. ; ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2820. ; Debug-Output "Error shelling InstallSnmpService"
  2821. ; goto ShellCodeError
  2822. ; endif
  2823. ; ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2824. ; Debug-Output "Error from InstallSnmpService"
  2825. ; goto end
  2826. ; endif
  2827. Shell "" UpdateIPRouterInfo $(EnableIpRouter)
  2828. ifstr(i) $(LanRoutingOnly) != TRUE
  2829. Shell "" SaveTcpipInfo $(fTcpIpAllowed)
  2830. endif
  2831. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2832. Debug-Output "Error shelling SaveTcpipInfo"
  2833. goto ShellCodeError
  2834. endif
  2835. ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2836. Debug-Output "Error saving Tcpip info"
  2837. goto end
  2838. endif
  2839. ifstr(i) $(LanRoutingOnly) != TRUE
  2840. Shell "" InstallWanArpService
  2841. endif
  2842. ; If PPTP filter driver is installed, we disable it because it is
  2843. ; not compatible with the Router IP filter driver
  2844. ; We will reenable it when the router service is removed
  2845. Shell "" DisablePPTPFilterDriver
  2846. Shell "" InstallIPFilterDriver
  2847. Shell "" InstallIPRtrMgr
  2848. Shell "" InstallIPEventlogDlls
  2849. Shell "" InstallIPSnmpAgents
  2850. ; force the user to reboot the system for this change
  2851. set CommonStatus = STATUS_SUCCESSFUL
  2852. else
  2853. ifstr(i) $(LanRoutingOnly) != TRUE
  2854. ; remove ip info from remoteaccess\parameters
  2855. Shell "" SaveTcpipInfo $(fTcpIpAllowed)
  2856. Shell "" RemoveWanArpService
  2857. endif
  2858. ; force the user to reboot the system for this change
  2859. set CommonStatus = STATUS_SUCCESSFUL
  2860. endif
  2861. ifstr(i) $(fIpxChosen) == TRUE
  2862. ifstr(i) $(fIpxInstalled) == FALSE
  2863. Shell "" InstallProtocol "IPX"
  2864. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2865. Debug-Output "Error shelling InstallProtocol IPX"
  2866. goto ShellCodeError
  2867. endif
  2868. ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2869. Debug-Output "Error installing IPX"
  2870. goto end
  2871. endif
  2872. endif
  2873. ; set some parameters in the NWLNKIPX\Parameters area
  2874. OpenRegKey $(!REG_H_LOCAL) "" +
  2875. $(!NTN_ServiceBase)"\NWLNKIPX\Parameters" +
  2876. $(!MAXIMUM_ALLOWED) KeyIpxParameters
  2877. ifstr $(KeyIpxParameters) != $(KeyNull)
  2878. ; add the parameters only if they don't already exist
  2879. GetRegValue $(KeyIpxParameters), "SingleNetworkActive" +
  2880. SingleNetworkActive
  2881. ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  2882. SetRegValue $(KeyIpxParameters) +
  2883. {SingleNetworkActive, 0, $(!REG_VT_DWORD), 1}
  2884. endif
  2885. GetRegValue $(KeyIpxParameters), "DisableDialoutSap" +
  2886. DisableDialoutSap
  2887. ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  2888. SetRegValue $(KeyIpxParameters) +
  2889. {DisableDialoutSap, 0, $(!REG_VT_DWORD), 1}
  2890. endif
  2891. GetRegValue $(KeyIpxParameters), "DisableDialinNetbios" +
  2892. DisableDialinNetbios
  2893. ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  2894. SetRegValue $(KeyIpxParameters) +
  2895. {DisableDialinNetbios, 0, $(!REG_VT_DWORD), 1}
  2896. endif
  2897. CloseRegKey $(KeyIpxParameters)
  2898. Endif
  2899. else
  2900. Debug-Output "OEMNSVRA.INF: error opening NWLNKIPX\Parameters key"
  2901. endif
  2902. ifstr(i) $(LanRoutingOnly) != TRUE
  2903. Shell "" SaveIpxInfo $(EnableIpxRouter) $(fIpxAllowed)
  2904. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2905. Debug-Output "Error shelling SaveIpxInfo"
  2906. goto ShellCodeError
  2907. endif
  2908. ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2909. Debug-Output "Error saving Ipx info"
  2910. goto end
  2911. endif
  2912. endif
  2913. ifint $(EnableIpxRouter) == 1
  2914. ; Modifed on 9/27/96 by RamC for routing related changes
  2915. ; we don't have to install NWLNKRIP and NWSAPAGENT any more
  2916. ; these services run as part of mprouter.exe now.
  2917. ;
  2918. ; Shell "" InstallNwlnkRipService
  2919. ; ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2920. ; Debug-Output "Error shelling InstallNwlnkRipService"
  2921. ; goto ShellCodeError
  2922. ; endif
  2923. ; ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2924. ; Debug-Output "Error from InstallNwlnkRipService"
  2925. ; goto end
  2926. ; endif
  2927. ; ; force the user to reboot the system for this change
  2928. ; set CommonStatus = STATUS_SUCCESSFUL
  2929. ; Shell "" InstallIsnSapService
  2930. ; ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2931. ; Debug-Output "Error shelling InstallIsnSapService"
  2932. ; goto ShellCodeError
  2933. ; endif
  2934. ; ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2935. ; Debug-Output "Error from InstallIsnSapService"
  2936. ; goto end
  2937. ; endif
  2938. Shell "" InstallIPXRtrMgr
  2939. Shell "" InstallIPXEventlogDlls
  2940. Shell "" InstallIPXSnmpAgents
  2941. Shell "" InstallIpxPingService
  2942. shell "" InstallNwlnkFwdService
  2943. shell "" InstallNwlnkFltService
  2944. ; force the user to reboot the system for this change
  2945. set CommonStatus = STATUS_SUCCESSFUL
  2946. endif
  2947. Shell "" UpdateIPXRouterInfo $(EnableWanRouter)
  2948. ; we should not pop the billboard that ncpa put up during primary install
  2949. Ifstr(i) $(!NTN_InstallPhase) != primary
  2950. shell $(subroutninf) PopBillBoard
  2951. Set BillboardVisible = 0
  2952. Endif
  2953. else
  2954. ifstr(i) $(LanRoutingOnly) != TRUE
  2955. ; remove ipx info from remoteaccess\parameters
  2956. Shell "" SaveIpxInfo $(EnableIpxRouter) $(fIpxAllowed)
  2957. endif
  2958. endif
  2959. WriteParametersOver = +
  2960. EndWait
  2961. goto successful
  2962. ;;;;;;;;;;;;;;;;; REMOVE RAS BEGINS ;;;;;;;;;;;;;;;;;;;;;;
  2963. RemoveRas = +
  2964. StartWait
  2965. set REMOVE_SOFTWARE = {}
  2966. Shell "" AreRequiredDllsPresent
  2967. ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2968. set MissingFiles = $($R1)
  2969. set ErrorLoadingConfigDll = $(ErrorLoadingConfigDll)" "$(MissingFiles)
  2970. shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "STATUS" $(ErrorLoadingConfigDll)
  2971. set CommonStatus = STATUS_USERCANCEL
  2972. goto end
  2973. endif
  2974. LoadLibrary "x" $(!STF_CWDDIR)rascfg.dll PORTSDLGHANDLE
  2975. shell "" QueryComponentsInstalled $(ProductKeyName)
  2976. Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  2977. Set InstalledComps = $($R1)
  2978. Set InstalledFlags = $($R2)
  2979. Set DoServer = *($(InstalledFlags),1)
  2980. Set DoClient = *($(InstalledFlags),2)
  2981. Set DoAdmin = *($(InstalledFlags),3)
  2982. Set DoServerOnly = *($(InstalledFlags),4)
  2983. Set DoClientOnly = *($(InstalledFlags),5)
  2984. Set DoAdminOnly = *($(InstalledFlags),6)
  2985. Endif
  2986. Debug-Output "Installed List is "$(InstalledComps)
  2987. Debug-Output "Installed Flags is "$(InstalledFlags)
  2988. ; ; if admin only is installed no need to attempt to remove
  2989. ; ; the hardware components NdisWan and RasMac
  2990. ; not true any more
  2991. ; ifstr(i) $(DoAdminOnly) == TRUE
  2992. ; set REMOVE_SOFTWARE = {$(ProductRASName)}
  2993. ; goto RemoveSoftware
  2994. ; endif
  2995. set REMOVE_SOFTWARE = >($(REMOVE_SOFTWARE), $(ProductRASName))
  2996. set REMOVE_SOFTWARE = >($(REMOVE_SOFTWARE), $(ProductROUTINGName))
  2997. set REMOVE_SOFTWARE = >($(REMOVE_SOFTWARE), $(ProductRASSVRName))
  2998. set REMOVE_SOFTWARE = >($(REMOVE_SOFTWARE), $(ProductRASMANName))
  2999. set REMOVE_SOFTWARE = >($(REMOVE_SOFTWARE), $(!ProductRASAUTODIALName))
  3000. ; get the network card numbers corresponding to NdisWan and RasAsyMac
  3001. ; from the registry
  3002. OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) KeyNetcards
  3003. ifstr $(KeyNetcards) == $(KeyNull)
  3004. Debug-Output "OEMNSVRA.INF: could not open Netcards key"
  3005. goto RemoveSoftware
  3006. endif
  3007. EnumRegKey $(KeyNetcards) NetcardsList
  3008. ForListDo $(NetcardsList)
  3009. set KeyName = *($($),1)
  3010. OpenRegKey $(KeyNetcards) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  3011. ifstr $(Card) == $(KeyNull)
  3012. Debug-Output "OEMNSVRA.INF: could not open netcard key"
  3013. goto RemoveSoftware
  3014. endif
  3015. GetRegValue $(Card), "ProductName" ProductNameInfo
  3016. set CardProductName = *($(ProductNameInfo), 4)
  3017. ifstr(i) $(CardProductName) == $(!ProductNDISWANName)
  3018. set !NETCARD_LIST = >($(!NETCARD_LIST), +
  3019. {$(!ProductNDISWANName),+
  3020. $(!NetworkCardKeyName)"\"$(KeyName)})
  3021. else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINName)
  3022. set !NETCARD_LIST = >($(!NETCARD_LIST), +
  3023. {$(!ProductNDISWANName),+
  3024. $(!NetworkCardKeyName)"\"$(KeyName)})
  3025. else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTName)
  3026. set !NETCARD_LIST = >($(!NETCARD_LIST), +
  3027. {$(!ProductNDISWANName),+
  3028. $(!NetworkCardKeyName)"\"$(KeyName)})
  3029. else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINIPName)
  3030. set !NETCARD_LIST = >($(!NETCARD_LIST), +
  3031. {$(!ProductNDISWANName),+
  3032. $(!NetworkCardKeyName)"\"$(KeyName)})
  3033. else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTIPName)
  3034. set !NETCARD_LIST = >($(!NETCARD_LIST), +
  3035. {$(!ProductNDISWANName),+
  3036. $(!NetworkCardKeyName)"\"$(KeyName)})
  3037. else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINOUTIPXName)
  3038. set !NETCARD_LIST = >($(!NETCARD_LIST), +
  3039. {$(!ProductNDISWANName),+
  3040. $(!NetworkCardKeyName)"\"$(KeyName)})
  3041. else-ifstr(i) $(CardProductName) == $(ProductRASASYMACName)
  3042. set !NETCARD_LIST = >($(!NETCARD_LIST),+
  3043. {$(ProductRASASYMACName),+
  3044. $(!NetworkCardKeyName)"\"$(KeyName)})
  3045. endif
  3046. CloseRegKey $(Card)
  3047. EndForListDo
  3048. CloseRegKey $(KeyNetcards)
  3049. read-syms StatusUpdatingRegistry$(!STF_LANGUAGE)
  3050. QueryListSize NumRemove $(!NETCARD_LIST)
  3051. ForListDo $(!NETCARD_LIST)
  3052. ; display the adapter number we are adding so that the user
  3053. ; knows what is going on
  3054. shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  3055. $(RemovingAdapters)" "$(NumRemove)
  3056. Set BillboardVisible = 1
  3057. debug-output "Removing hardware component: "$($)
  3058. Shell $(!UtilityInf), RemoveHardwareComponent, $(!Manufacturer),+
  3059. *($($),1), *($($),2)
  3060. set-sub NumRemove = $(NumRemove), 1
  3061. EndForListDo
  3062. RemoveSoftware = +
  3063. ; Remove any additional services we added for IP and IPX
  3064. ; we do this before we remove the RAS software components because
  3065. ; there are dependencies to take care of.
  3066. shell $(subroutninf) PushBillBoard NETSTATUSDLG $(RemovingServices)
  3067. set BillboardVisible = 1
  3068. ; Shell "" RemoveRasArpService
  3069. Shell "" RemoveNdisTapiService
  3070. Shell "" RemoveRasAcdService
  3071. Shell "" RemoveWanArpService
  3072. ; remove IP filter driver only if proxy is not installed
  3073. ifstr(i) $(!PROXY_INSTALLED) == FALSE
  3074. Shell "" RemoveIPFilterDriver
  3075. endif
  3076. Shell "" RemoveIPRtrMgr
  3077. Shell "" RemoveIPEventlogDlls
  3078. Shell "" RemoveIPSnmpAgents
  3079. Shell "" RemoveRasRadService
  3080. ; If PPTP filter driver is installed, we enable it because
  3081. ; we had disabled it when Routing service was installed
  3082. Shell "" EnablePPTPFilterDriver
  3083. Shell "" RemoveIPXRtrMgr
  3084. Shell "" RemoveIpxPingService
  3085. Shell "" RemoveIPXEventlogDlls
  3086. Shell "" RemoveIPXSnmpAgents
  3087. Shell "" RemoveNwlnkFwdService
  3088. Shell "" RemoveNwlnkFltService
  3089. ; Remove any dependencies we added to external components
  3090. ; specifically remove WAN minport's dependency on NdisTapi
  3091. set RasTapiDevicesKey = $(KeyNull)
  3092. OpenRegKey $(!REG_H_LOCAL) "" $(RasTapiDevicesKeyName) $(!MAXIMUM_ALLOWED) RasTapiDevicesKey
  3093. ifstr $(RasTapiDevicesKey) != $(KeyNull)
  3094. set TapiProviderList = {}
  3095. EnumRegKey $(RasTapiDevicesKey) TapiProviderList
  3096. ForListDo $(TapiProviderList)
  3097. set ProviderName = *($($),1)
  3098. Debug-Output "OEMNSVRA.INF: Removing "$(ProviderName)" dependency on NdisTapi."
  3099. Shell "" RemoveServiceDependency $(ProviderName) "NdisTapi"
  3100. EndForListDo
  3101. EndIf
  3102. ; Remove the ipxrip and sap services only if a dialin port was configured
  3103. ; with IPX
  3104. ; Note that for the following QuerySelectedProtocols call to work, we need
  3105. ; to make sure that SOFTWARE\MICROSOFT\RAS registry key is not removed yet,
  3106. ; so don't move this code beyond the point where we remove the software key.
  3107. set fIpxAllowed = FALSE
  3108. Shell "" QuerySelectedProtocols
  3109. ifstr(i) $($R0) == STATUS_SUCCESSFUL
  3110. set fIpxAllowed = $($R6)
  3111. else
  3112. Debug-Output "RemoveRas: error QuerySelectedProtocols"
  3113. endif
  3114. ; Modified on 10/11/96 by RamC
  3115. ; we don't need to remove these services any more because
  3116. ; we don't install them with the router service.
  3117. ;
  3118. ; ifstr(i) $(fIpxAllowed) == TRUE
  3119. ; Shell "" RemoveNwlnkRipService
  3120. ; Shell "" RemoveIsnSapService
  3121. ; endif
  3122. ; added on 9/19/96 by RamC
  3123. ; When the router service is installed, we modify the ImagePath of nwsapagent to point to mprouter.exe
  3124. ; we also disable nwlnkrip service.
  3125. ; When the router service is removed, we restore the services to their original state
  3126. ifstr(i) $(fIpxAllowed) == TRUE
  3127. OpenRegKey $(!REG_H_LOCAL) "" $(!RasIsnSapKeyName) $(!MAXIMUM_ALLOWED) KeyService
  3128. ifstr $(KeyService) != ""
  3129. SetRegValue $(KeyService) {ImagePath, 0, $(!REG_VT_EXPAND_SZ), "%SystemRoot%\system32\services.exe"}
  3130. CloseRegKey $(KeyService)
  3131. endif
  3132. ; if the NwlnkRip service is currently installed, reenable it
  3133. OpenRegKey $(!REG_H_LOCAL) "" $(!RasIsnRipKeyName) $(!MAXIMUM_ALLOWED) KeyService
  3134. ifstr $(KeyService) != ""
  3135. SetRegValue $(KeyService) {Start, 0, $(!REG_VT_DWORD), 2}
  3136. CloseRegKey $(KeyService)
  3137. endif
  3138. endif
  3139. Debug-Output "Remove Software List "$(REMOVE_SOFTWARE)
  3140. ForListDo $(REMOVE_SOFTWARE)
  3141. Debug-Output "Removing software component: "$($)
  3142. ifstr(i) $($) == RAS
  3143. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyBase) +
  3144. $(!MAXIMUM_ALLOWED) ProductKey
  3145. Ifstr $(ProductKey) == $(KeyNull)
  3146. Debug-Output "OEMNSVRA.INF: could not open Software product key"
  3147. goto RemoveFiles
  3148. endif
  3149. DeleteRegTree $(ProductKey) $(Product$($)Name)
  3150. CloseRegKey $(ProductKey)
  3151. else
  3152. Shell $(!UtilityInf), RemoveSoftwareComponent, $(!Manufacturer), $($)
  3153. endif
  3154. EndForListDo
  3155. RemoveFiles = +
  3156. ; now remove the files on disk
  3157. shell $(subroutninf) PushBillBoard NETSTATUSDLG $(RemovingFiles)
  3158. set BillboardVisible = 1
  3159. Install RemoveRasFiles
  3160. ; Now it is time to restore the files saved away in the
  3161. ; system32\~~RB$$~~ directory to their respective locations
  3162. Install RestoreSavedFiles
  3163. ; Remove the Remote Access Service program group and icons from
  3164. ; the program manager.
  3165. ifstr(i) $(DoServerOnly) == FALSE
  3166. Install RemoveRasGroup
  3167. endif
  3168. ; remove OEMNSVRA.INF from the ReviewPrograms list in ncpa
  3169. Shell "" RemoveInfFromReviewPrograms
  3170. shell "" RemoveNetGroupDependency
  3171. RemoveRasOver = +
  3172. ; Now go through the registry and clean up all RAS keys to ensure
  3173. ; that the removal is complete.
  3174. Debug-Output "OEMNSVRA.INF: Doing a forcible cleanup..."
  3175. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_SoftwareBase)"\Microsoft" +
  3176. $(!MAXIMUM_ALLOWED) KeySoftware
  3177. ifstr $(KeySoftware) != $(KeyNull)
  3178. ; blow away all the software keys
  3179. set SoftList = {"ASYNCMAC", "NDISWAN", "RAS", "RASMAN", +
  3180. "RASAUTO", "REMOTEACCESS"}
  3181. ForListDo $(SoftList)
  3182. DeleteRegTree $(KeySoftware) $($)
  3183. EndForListDo
  3184. ; blow away any RAS netcards
  3185. set NetworkCardKey = $(KeyNull)
  3186. OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) +
  3187. $(!MAXIMUM_ALLOWED) NetworkCardKey
  3188. Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  3189. set NetcardsList = {}
  3190. EnumRegKey $(NetworkCardKey) NetcardsList
  3191. Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  3192. ForListDo $(NetcardsList)
  3193. set KeyName = *($($),1)
  3194. set Card = $(KeyNull)
  3195. OpenRegKey $(NetworkCardKey) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  3196. ifstr $(Card) == $(KeyNull)
  3197. Debug-Output "RemoveRas: could not open netcard key "$(KeyName)
  3198. else
  3199. GetRegValue $(Card), "ProductName" ProductNameInfo
  3200. Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  3201. Debug-Output "RemoveRas: ProductName not found."
  3202. else
  3203. set CardProductName = *($(ProductNameInfo), 4)
  3204. Debug-Output "RemoveRas: ProductName. "$(CardProductName)
  3205. ifstr(i) $(CardProductName) == $(!ProductNDISWANName)
  3206. DeleteRegTree $(NetworkCardKey) $(KeyName)
  3207. endif
  3208. ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINName)
  3209. DeleteRegTree $(NetworkCardKey) $(KeyName)
  3210. endif
  3211. ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTName)
  3212. DeleteRegTree $(NetworkCardKey) $(KeyName)
  3213. endif
  3214. ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINIPName)
  3215. DeleteRegTree $(NetworkCardKey) $(KeyName)
  3216. endif
  3217. ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTIPName)
  3218. DeleteRegTree $(NetworkCardKey) $(KeyName)
  3219. endif
  3220. ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINOUTIPXName)
  3221. DeleteRegTree $(NetworkCardKey) $(KeyName)
  3222. endif
  3223. ifstr(i) $(CardProductName) == $(ProductRASASYMACName)
  3224. DeleteRegTree $(NetworkCardKey) $(KeyName)
  3225. endif
  3226. endif
  3227. EndForListDo
  3228. else
  3229. Debug-Output "RemoveRas: EnumRegKey failed."
  3230. endif
  3231. else
  3232. Debug-Output "RemoveRas: failed to open "$(!NetworkCardKeyName)
  3233. endif
  3234. CloseRegKey $(KeySoftware)
  3235. else
  3236. Debug-Output "RemoveRas: failed to open software key"
  3237. endif
  3238. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase) +
  3239. $(!MAXIMUM_ALLOWED) KeyServices
  3240. ifstr $(KeyServices) != $(KeyNull)
  3241. set ServiceList = {"ASYNCMAC", "NDISWAN", "RASARP", "RASMAN", +
  3242. "REMOTEACCESS", "RASACD", "RASAUTO"}
  3243. ForListDo $(ServiceList)
  3244. DeleteRegTree $(KeyServices) $($)
  3245. EndForListDo
  3246. ; now walk the services tree and blow away all AsyncMacX and
  3247. ; NdisWanX keys
  3248. EnumRegKey $(KeyServices) ServiceList
  3249. Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  3250. ForListDo $(ServiceList)
  3251. set ServiceName = *($($),1)
  3252. set Result = 1
  3253. LibraryProcedure Result $(!LIBHANDLE) SetupStrncmp +
  3254. $(ServiceName) "NdisWan" 7
  3255. ifint $(Result) == 0
  3256. Debug-Output "RemoveRas: Removing "$(ServiceName)
  3257. DeleteRegTree $(KeyServices) $(ServiceName)
  3258. else
  3259. LibraryProcedure Result $(!LIBHANDLE) SetupStrncmp +
  3260. $(ServiceName) "AsyncMac" 8
  3261. ifint $(Result) == 0
  3262. Debug-Output "RemoveRas: Removing "$(ServiceName)
  3263. DeleteRegTree $(KeyServices) $(ServiceName)
  3264. endif
  3265. endif
  3266. EndForListDo
  3267. endif
  3268. CloseRegKey $(KeyServices)
  3269. endif
  3270. ifint $(BillboardVisible) != 0
  3271. Shell "subroutn.inf" PopBillboard
  3272. Set BillboardVisible = 0
  3273. Endif
  3274. EndWait
  3275. goto $(to)
  3276. ;;;;;;;;;;;;;;;;;;;;; BINDINGS RAS BEGINS ;;;;;;;;;;;;;;
  3277. BindingsRas = +
  3278. ; TODO OSPF bindings review - show ospf dialog with new IP addresses - IFF we can
  3279. ; detect that the IP addresses have changed - the question is can we?
  3280. ; This gets called if review is specified as 1
  3281. Shell "" AreRequiredDllsPresent
  3282. ifstr(i) $($R0) != STATUS_SUCCESSFUL
  3283. set MissingFiles = $($R1)
  3284. set ErrorLoadingConfigDll = $(ErrorLoadingConfigDll)" "$(MissingFiles)
  3285. shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "STATUS" $(ErrorLoadingConfigDll)
  3286. set CommonStatus = STATUS_USERCANCEL
  3287. goto end
  3288. endif
  3289. LoadLibrary "x" $(!STF_CWDDIR)rascfg.dll PORTSDLGHANDLE
  3290. Debug-Output "OEMNSVRA.INF:Review bindings is being called!!!."
  3291. ; Check if one of Nbf, TcpIp or Ipx protocol stacks have been removed.
  3292. ; Accordingly change our list of selected protocols in
  3293. ; SOFTWARE\Microsoft\RAS\Protocols. Also, remove the corresponding
  3294. ; netcards and update the list of Dialin/Dialout ports in
  3295. ; Services\Asyncmac\Parameters
  3296. Shell "" UpdateSelectedProtocols
  3297. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3298. Debug-Output "error shelling UpdateSelectedProtocols."
  3299. goto ShellCodeError
  3300. endif
  3301. Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  3302. Debug-Output "error returned by UpdateSelectedProtocols."
  3303. endif
  3304. set fNetbeuiChosen = $($R1)
  3305. set fTcpIpChosen = $($R2)
  3306. set fIpxChosen = $($R3)
  3307. set dwRouterType = $($R4)
  3308. ; If there are no protocols selected for RAS,
  3309. ; then display a message to warn the user.
  3310. ifstr(i) $(fNetbeuiChosen) == FALSE
  3311. ifstr(i) $(fTcpIpChosen) == FALSE
  3312. ifstr(i) $(fIpxChosen) == FALSE
  3313. read-syms NoProtocolsDlg$(!STF_LANGUAGE)
  3314. Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "STATUS", $(NoProtocolsWarning)
  3315. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3316. goto ShellCodeError
  3317. endif
  3318. goto end
  3319. endif
  3320. endif
  3321. endif
  3322. ; If we were called through the normal review bindings, then reset
  3323. ; the review bindings flag in rasman to 0 and add ourselves to the
  3324. ; ReviewProgramsList of NCPA. This will ensure that we will be called
  3325. ; last for review bindings.
  3326. ; Add our inf file name to the Review Programs list of NCPA
  3327. OpenRegKey $(!REG_H_LOCAL) "" $(!RouterKeyName) $(!MAXIMUM_ALLOWED) KeyRouter
  3328. ifstr $(KeyRouter) != $(KeyNull)
  3329. GetRegValue $(KeyRouter), "Review" ReviewInfo
  3330. set ReviewValue = *($(ReviewInfo), 4)
  3331. ifint $(ReviewValue) == 1
  3332. Debug-Output "BindingsRas: resetting Review to 0 in SOFTWARE\Router\CurrentVersion key"
  3333. SetRegValue $(KeyRouter) {Review,$(NoTitle),$(!REG_VT_DWORD), 0}
  3334. Shell "" AddInfToReviewProgramsList
  3335. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3336. Debug-Output "error shelling AddInfToReviewProgramsList."
  3337. goto ShellCodeError
  3338. endif
  3339. ifstr(i) $($R0) != STATUS_SUCCESSFUL
  3340. Debug-Output "error returned by AddInfToReviewProgramsList."
  3341. endif
  3342. endif
  3343. CloseRegKey $(KeyRouter)
  3344. else
  3345. Debug-Output "OEMNSVRA.INF: error opening SOFTWARE\Router\CurrentVersion key."
  3346. endif
  3347. ifstr(i) $(fIpxChosen) == TRUE
  3348. ; added on 9/19/96 by RamC
  3349. ; if the NwSapAgent service is installed, change the ImagePath to point to mprouter.exe
  3350. OpenRegKey $(!REG_H_LOCAL) "" $(!RasIsnSapKeyName) $(!MAXIMUM_ALLOWED) KeyService
  3351. ifstr $(KeyService) != ""
  3352. SetRegValue $(KeyService) {ImagePath, 0, $(!REG_VT_EXPAND_SZ), "%SystemRoot%\System32\mprouter.exe"}
  3353. CloseRegKey $(KeyService)
  3354. endif
  3355. ; if the NwlnkRip service is currently installed, disable it
  3356. OpenRegKey $(!REG_H_LOCAL) "" $(!RasIsnRipKeyName) $(!MAXIMUM_ALLOWED) KeyService
  3357. ifstr $(KeyService) != ""
  3358. SetRegValue $(KeyService) {Start, 0, $(!REG_VT_DWORD), 4}
  3359. CloseRegKey $(KeyService)
  3360. endif
  3361. endif
  3362. ; now do the magic with adding lan interfaces and setting global information for IP and IPX configuration
  3363. Debug-Output "AddRtrMgrAndLanInterfaces entry."
  3364. LibraryProcedure Result, $(PORTSDLGHANDLE), AddRtrMgrAndLanInterfaces $(fTcpIpChosen) $(fIpxChosen)
  3365. ifstr(i) $(Result) == ERROR
  3366. Shell subroutn.inf, SetupMessage $(!STF_LANGUAGE) "STATUS" $(ErrorConfigInterfaces)
  3367. Debug-Output "AddRtrMgrAndLanInterfaces ERROR exit."
  3368. else
  3369. Debug-Output "AddRtrMgrAndLanInterfaces exit."
  3370. endif
  3371. RemoveRtrMgrsBegin =+
  3372. Debug-Output "BindingsRas: RemoveRtrMgrsBegin..."
  3373. ; Remove a router manager and all corresponding interface information if it is not configured any more
  3374. ; BUGBUG - we should actually notify the running router service
  3375. ; that the router manager has been removed. However this
  3376. ; is OK for now because we force a reboot anyway.
  3377. ; remove services\Router\RouterManagers\{IP |IPX}
  3378. ; Also enumerate services\Router\Interfaces
  3379. ; Remove each interfaces {IP | IPX} information
  3380. set RemoveRtrMgrList = {}
  3381. ifstr(i) $(fTcpIpChosen) == FALSE
  3382. set RemoveRtrMgrList = >($(RemoveRtrMgrList), "IP")
  3383. endif
  3384. ifstr(i) $(fIpxChosen) == FALSE
  3385. set RemoveRtrMgrList = >($(RemoveRtrMgrList), "IPX")
  3386. endif
  3387. Debug-Output "BindingsRas: RemoveRtrMgrList == "$(RemoveRtrMgrList)
  3388. set NumRtrMgrs = 0
  3389. QueryListSize NumRtrMgrs $(RemoveRtrMgrList)
  3390. ifint $(NumRtrMgrs) != 0
  3391. OpenRegKey $(!REG_H_LOCAL) "" $(!RouterKeyName)"\RouterManagers" $(!MAXIMUM_ALLOWED) KeyRtrMgrs
  3392. Ifstr $(KeyRtrMgrs) == ""
  3393. Debug-Output "BindingsRas: error opening Router\RouterManagers key"
  3394. goto RemoveRtrMgrsEnd
  3395. endif
  3396. OpenRegKey $(!REG_H_LOCAL) "" $(!RouterKeyName)"\Interfaces" $(!MAXIMUM_ALLOWED) KeyInterfaces
  3397. Ifstr $(KeyInterfaces) == ""
  3398. CloseRegKey $(KeyRtrMgrs)
  3399. Debug-Output "BindingsRas: error opening Router\Interfaces key"
  3400. goto RemoveRtrMgrsEnd
  3401. endif
  3402. Debug-Output "BindingsRas: InterfacesList == "$(InterfacesList)
  3403. forlistdo $(RemoveRtrMgrList)
  3404. set RemoveRtrMgr = $($)
  3405. Debug-Output "BindingsRas: Removing RouterManager "$(RemoveRtrMgr)
  3406. DeleteRegTree $(KeyRtrMgrs) $(RemoveRtrMgr)
  3407. ; now remove the interfaces\$($) tree
  3408. ; if as a result of removing an interface, the interface has no
  3409. ; router manager associated with it, then remove the interface
  3410. set InterfacesList = {}
  3411. EnumRegKey $(KeyInterfaces) InterfacesList
  3412. forlistdo $(InterfacesList)
  3413. set InterfaceName = *($($),1)
  3414. OpenRegKey $(KeyInterfaces) "" $(InterfaceName) $(!MAXIMUM_ALLOWED) KeyInterface
  3415. ifstr $(KeyInterface) == ""
  3416. Debug-Output "BindingsRas: error opening interface "$(InterfaceName)
  3417. CloseRegKey $(KeyRtrMgrs)
  3418. CloseRegKey $(KeyInterfaces)
  3419. goto RemoveRtrMgrsEnd
  3420. endif
  3421. EnumRegKey $(KeyInterface) InterfaceRtrMgrList
  3422. forlistdo $(InterfaceRtrMgrList)
  3423. set InterfaceRtrMgrName = *($($),1)
  3424. ifstr(i) $(InterfaceRtrMgrName) == $(RemoveRtrMgr)
  3425. Debug-Output "BindingsRas: Removing RouterManager "$(InterfaceRtrMgrName)"for interface "$(InterfaceName)
  3426. DeleteRegTree $(KeyInterface) $(InterfaceRtrMgrName)
  3427. endif
  3428. endforlistdo
  3429. ; now find out if the interface has any router managers
  3430. ; if not delete the interface itself
  3431. set InterfaceRtrMgrList = {}
  3432. EnumRegKey $(KeyInterface) InterfaceRtrMgrList
  3433. set NumInterfaceRtrMgrs = 0
  3434. QueryListSize NumInterfaceRtrMgrs $(InterfaceRtrMgrList)
  3435. ifint $(NumInterfaceRtrMgrs) == 0
  3436. Debug-Output "BindingsRas: Removing Interface "$(InterfaceName)
  3437. DeleteRegTree $(KeyInterfaces) $(InterfaceName)
  3438. else
  3439. CloseRegKey $(KeyInterface)
  3440. endif
  3441. endforlistdo
  3442. endforlistdo
  3443. CloseRegKey $(KeyRtrMgrs)
  3444. CloseRegKey $(KeyInterfaces)
  3445. endif
  3446. RemoveRtrMgrsEnd =+
  3447. ; mark the router service to interact with the desktop
  3448. LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, "Router" +
  3449. $(!SERVICE_SHARE_INTERACT), $(!SERVICE_NO_CHANGE), +
  3450. $(!SERVICE_NO_CHANGE), "", "", $(newGroupList), +
  3451. "", "", ""
  3452. Debug-Output "Result of setting service Router to interact with desktop=> "$(Result)
  3453. ; set the SC_MANAGER_ALL_ACCESS for the router service to enable all
  3454. ; users to start the router service
  3455. LibraryProcedure Result, $(PORTSDLGHANDLE), ChangeRouterServiceConfig
  3456. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  3457. ;;; NOTE NOTE NOTE
  3458. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  3459. ; if Lan routing only chosen then we are done!!
  3460. ifint $(dwRouterType) == $(ROUTER_TYPE_LAN)
  3461. Debug-Output "LanRouting only enabled, so nothing to do"
  3462. goto BindingsRasEnd
  3463. endif
  3464. set WkstaConfigured = FALSE
  3465. set SrvrConfigured = FALSE
  3466. shell "" IsNetworkConfigured
  3467. Debug-Output "IsNetworkConfigured returned R0 "$($R0)
  3468. Debug-Output "IsNetworkConfigured returned R1 "$($R1)
  3469. Debug-Output "IsNetworkConfigured returned R2 "$($R2)
  3470. ifstr(i) $($R0) == STATUS_SUCCESSFUL
  3471. set WkstaConfigured = $($R1)
  3472. set SrvrConfigured = $($R2)
  3473. else
  3474. read-syms NetworkConfigError$(!STF_LANGUAGE)
  3475. set Text = $(Text1)
  3476. shell $(subroutninf) SetupMessage $(!STF_LANGUAGE) "FATAL" $(Text)
  3477. goto end
  3478. endif
  3479. ifstr(i) $(WkstaConfigured) == TRUE
  3480. ifstr(i) $(SrvrConfigured) == TRUE
  3481. goto InstallNetworkEnd
  3482. else
  3483. goto InstallNetworkError
  3484. endif
  3485. else
  3486. goto InstallNetworkError
  3487. endif
  3488. InstallNetworkError =+
  3489. set CommonStatus = STATUS_USERCANCEL
  3490. read-syms NetworkConfigError$(!STF_LANGUAGE)
  3491. set Text = $(Text2)
  3492. shell $(subroutninf) SetupMessage $(!STF_LANGUAGE) "STATUS" $(Text)
  3493. InstallNetworkEnd =+
  3494. shell "" QueryComponentsInstalled $(ProductKeyName)
  3495. Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  3496. Set InstalledComps = $($R1)
  3497. Set InstalledFlags = $($R2)
  3498. Set DoServer = *($(InstalledFlags),1)
  3499. Set DoClient = *($(InstalledFlags),2)
  3500. Set DoAdmin = *($(InstalledFlags),3)
  3501. Set DoServerOnly = *($(InstalledFlags),4)
  3502. Set DoClientOnly = *($(InstalledFlags),5)
  3503. Set DoAdminOnly = *($(InstalledFlags),6)
  3504. Endif
  3505. Debug-Output "Installed List is "$(InstalledComps)
  3506. Debug-Output "Installed Flags is "$(InstalledFlags)
  3507. ; Check if AsyncMac service is enabled - meaning serial ports are configured
  3508. ; initialize start value to disabled
  3509. set AsyStartValue = 4
  3510. OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacKeyName) $(!MAXIMUM_ALLOWED) KeyMac
  3511. ifstr $(KeyMac) == $(KeyNull)
  3512. Debug-Output "OEMNSVRA.INF: could not open AsyncMac key"
  3513. else
  3514. GetRegValue $(KeyMac), "Start" AsyStartInfo
  3515. ifint $(RegLastError) == 0
  3516. set AsyStartValue = *($(AsyStartInfo), 4)
  3517. endif
  3518. Debug-Output "OEMNSVRA.INF: AsyncMac start value "$(AsyStartValue)
  3519. CloseRegKey $(KeyMac)
  3520. endif
  3521. ; Read the Linkage Value of AsyncMac only if AsyncMac is enabled
  3522. ; Initialize EndPoints only if AsyncMac is enabled
  3523. set NdisWanParam = {}
  3524. set NdisWanEndPointsLst = {}
  3525. ifint $(AsyStartValue) != 4
  3526. set RasMacLinkageKey = $(KeyNull)
  3527. OpenRegKey $(!REG_H_LOCAL) "" $(RasMacLinkageKeyName) $(!MAXIMUM_ALLOWED) RasMacLinkageKey
  3528. ifstr $(RasMacLinkageKey) == $(KeyNull)
  3529. Debug-Output "OEMNSVRA.INF: could not open AsyncMac linkage key"
  3530. set RegistryErrorIndex = UNABLE_ACCESS_CONFIGURE_SERVICE
  3531. goto fatalregistry
  3532. endif
  3533. GetRegValue $(RasMacLinkageKey), "Bind" BindInfo
  3534. set NdisWanParam = *($(BindInfo), 4)
  3535. CloseRegKey $(RasMacLinkageKey)
  3536. ; Obtain the Endpoint information
  3537. set NdisWanParamKey = $(KeyNull)
  3538. OpenRegKey $(!REG_H_LOCAL) "" $(NdisWanParamKeyName) $(!MAXIMUM_ALLOWED) NdisWanParamKey
  3539. ifstr $(NdisWanParamKey) == $(KeyNull)
  3540. Debug-Output "OEMNSVRA.INF: could not open NdisWanParamKey"
  3541. else
  3542. GetRegValue $(NdisWanParamKey), "EndPoints" EndPointsInfo
  3543. set EndPointsLst = *($(EndPointsInfo), 4)
  3544. set NdisWanEndPointsLst = >($(NdisWanEndPointsLst),*($(EndPointsLst), 1))
  3545. CloseRegKey $(NdisWanParamKey)
  3546. endif
  3547. endif
  3548. ; Read the Linkage value of the TAPI drivers to get the EndPoints info
  3549. ; we need to make sure that if a TAPi driver has been removed, it is
  3550. ; not added to the NDISWAN service dependency
  3551. set ProviderList = {}
  3552. set RasTapiDevicesKey = $(KeyNull)
  3553. OpenRegKey $(!REG_H_LOCAL) "" $(RasTapiDevicesKeyName) $(!MAXIMUM_ALLOWED) RasTapiDevicesKey
  3554. ifstr $(RasTapiDevicesKey) != $(KeyNull)
  3555. set TapiProviderList = {}
  3556. EnumRegKey $(RasTapiDevicesKey) TapiProviderList
  3557. ForListDo $(TapiProviderList)
  3558. set TapiAddress = {}
  3559. set NumEndPoints = 0
  3560. set ProviderName = *($($),1)
  3561. Debug-Output "OEMNSVRA.INF: TAPI provider name = "$(ProviderName)
  3562. OpenRegKey $(RasTapiDevicesKey) "" $(ProviderName) $(!MAXIMUM_ALLOWED) Provider
  3563. ifstr $(Provider) != $(KeyNull)
  3564. GetRegValue $(Provider), "Address" TapiAddress
  3565. set AdapterNum = ""
  3566. set EndPointCount = 0
  3567. set tmpNdisWanParam = {}
  3568. set tmpNdisWanEndPointsLst = {}
  3569. set DeviceName = ""
  3570. ForListDo *($(TapiAddress),4)
  3571. Split-String $($) "- " Address
  3572. set NewAdapterNum = *($(Address), 1)
  3573. ; if we come across a new adapter number
  3574. ifstr(i) $(AdapterNum) != $(NewAdapterNum)
  3575. ; and if we have accumulated some information
  3576. ifstr(i) $(AdapterNum) != ""
  3577. ; write it to temp list
  3578. set tmpNdisWanParam = >($(tmpNdisWanParam), $(DeviceName))
  3579. set tmpNdisWanEndPointsLst = >($(tmpNdisWanEndPointsLst), $(EndPointCount))
  3580. ; reset the end point count for the next adapter
  3581. set EndPointCount = 0
  3582. endif
  3583. ; save new adapter number
  3584. set AdapterNum = $(NewAdapterNum)
  3585. ; make new device name
  3586. set DeviceName = "\Device\"$(ProviderName)$(AdapterNum)
  3587. endif
  3588. ;increment endpoint count for the new device
  3589. set-add EndPointCount = $(EndPointCount), 1
  3590. EndForListDo
  3591. ; append the information for the last set of addresses to the
  3592. ; tmp list
  3593. ifstr $(DeviceName) != ""
  3594. set tmpNdisWanParam = >($(tmpNdisWanParam), $(DeviceName))
  3595. set tmpNdisWanEndPointsLst = >($(tmpNdisWanEndPointsLst), $(EndPointCount))
  3596. endif
  3597. CloseRegKey $(Provider)
  3598. else
  3599. Debug-Output "OEMNSVRA.INF: could not open RAS\TAPI DEVICES\"$(DriverName)" key."
  3600. endif
  3601. set ProviderKeyName = $(!NTN_ServiceBase)"\"$(ProviderName)
  3602. set ProviderLinkageKeyName = $(!NTN_ServiceBase)"\"$(ProviderName)"\Linkage"
  3603. Debug-Output "TAPI provider key name "$(ProviderKeyName)
  3604. set ProviderKey = $(KeyNull)
  3605. set ProviderLinkageKey = $(KeyNull)
  3606. OpenRegKey $(!REG_H_LOCAL) "" $(ProviderKeyName) $(!MAXIMUM_ALLOWED) ProviderKey
  3607. ifstr $(ProviderKey) == $(KeyNull)
  3608. Debug-Output "OEMNSVRA.INF: could not open key "$(ProviderKeyName)
  3609. else
  3610. set DeleteFlag = 0
  3611. set DeleteFlagInfo = {}
  3612. ; check whether service is marked for deletion
  3613. GetRegValue $(ProviderKey),"DeleteFlag", DeleteFlagInfo
  3614. set DeleteFlag = *($(DeleteFlagInfo), 4)
  3615. ifint $(DeleteFlag) != 1
  3616. ; add service to provider list only if the service exists.
  3617. set ProviderList = >($(ProviderList), $(ProviderName))
  3618. ; make the tapi-aware miniport dependent on NdisTapi
  3619. ; driver so that the driver loads before the miniports.
  3620. Shell "" AddServiceDependency $(ProviderName) "NdisTapi"
  3621. ForListDo $(tmpNdisWanParam)
  3622. set NdisWanParam = >($(NdisWanParam), $($))
  3623. set NdisWanEndPointsLst = >($(NdisWanEndPointsLst), *($(tmpNdisWanEndPointsLst), $(#)))
  3624. EndForListDo
  3625. endif
  3626. CloseRegKey $(ProviderKey)
  3627. endif
  3628. EndForListDo
  3629. CloseRegKey $(RasTapiDevicesKey)
  3630. else
  3631. Debug-Output "OEMNSVRA.INF: could not open RAS\TAPI DEVICES key"
  3632. endif
  3633. ; Check to make sure at least one port is configured for RAS
  3634. ; else, warn the user that this is an invalid configuration.
  3635. set NumBindings = 0
  3636. Debug-Output "NdisWan param Bind value = "$(NdisWanParam)
  3637. QueryListSize NumBindings $(NdisWanParam)
  3638. Debug-Output "Number of Ndiswan bindings = "$(NumBindings)
  3639. ifint $(NumBindings) == 0
  3640. Debug-Output "OEMNSVRA.INF: No ports are configured"
  3641. read-syms NoPortsConfigured$(!STF_LANGUAGE)
  3642. Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "STATUS", $(NoPortsError)
  3643. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3644. goto ShellCodeError
  3645. endif
  3646. goto end
  3647. endif
  3648. ; and write this information as a parameter in the NdisWan section
  3649. OpenRegKey $(!REG_H_LOCAL) "" $(NdisWanParamKeyName) $(!MAXIMUM_ALLOWED) NdisWanParamKey
  3650. ifstr $(NdisWanParamKey) == $(KeyNull)
  3651. Debug-Output "OEMNSVRA.INF: could not open NdisWanParamKey"
  3652. set RegistryErrorIndex = UNABLE_ACCESS_CONFIGURE_SERVICE
  3653. goto fatalregistry
  3654. endif
  3655. Debug-Output "Setting NdisWan param Bind to "$(NdisWanParam)
  3656. set NewValueList = {{Bind, $(NoTitle), $(!REG_VT_MULTI_SZ), $(NdisWanParam)}}
  3657. Shell $(!UtilityInf), AddValueList, $(NdisWanParamKey), $(NewValueList)
  3658. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3659. CloseRegKey $(NdisWanParamKey)
  3660. goto ShellCodeError
  3661. endif
  3662. Debug-Output "Setting NdisWan param EndPoints to "$(NdisWanEndPointsLst)
  3663. set NewValueList = {{EndPoints, $(NoTitle), $(!REG_VT_MULTI_SZ), $(NdisWanEndPointsLst)}}
  3664. Shell $(!UtilityInf), AddValueList, $(NdisWanParamKey), $(NewValueList)
  3665. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3666. CloseRegKey $(NdisWanParamKey)
  3667. goto ShellCodeError
  3668. endif
  3669. CloseRegKey $(NdisWanParamKey)
  3670. ; change the security descriptor so that non-admin users can start the client
  3671. LibraryProcedure Result, $(PORTSDLGHANDLE), InitRasmanSecurityDescriptor
  3672. Debug-Output "Result of setting Rasman security descriptor "$(Result)
  3673. LibraryProcedure Result, $(PORTSDLGHANDLE), InitRemoteSecurityDescriptor
  3674. Debug-Output "Result of setting Remote security descriptor "$(Result)
  3675. ; set the following service to share & interact with desktop
  3676. forlistdo { RasAuto, RasMan, RemoteAccess, Router }
  3677. LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, $($) +
  3678. $(!SERVICE_SHARE_INTERACT), $(!SERVICE_NO_CHANGE), +
  3679. $(!SERVICE_NO_CHANGE), "", "", $(newGroupList), +
  3680. "", "", ""
  3681. Debug-Output "Result of setting service "$($)" to interact with desktop=> "$(Result)
  3682. endforlistdo
  3683. ; Update the supported CP list based on what protocols are currently installed
  3684. Shell "" UpdateCPList
  3685. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3686. Debug-Output "error shelling UpdateCPList."
  3687. goto ShellCodeError
  3688. endif
  3689. Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  3690. Debug-Output "error returned by UpdateCPList."
  3691. endif
  3692. ; If TcpIp is selected, then update the NdisWanX\Parameters\TCPIP\LLInterface
  3693. ; with WanArp
  3694. ifstr(i) $(fTcpIpChosen) == TRUE
  3695. shell "" UpdateLLInterface
  3696. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3697. Debug-Output "error shelling UpdateLLInterface."
  3698. goto ShellCodeError
  3699. endif
  3700. Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  3701. Debug-Output "error returned by UpdateLLInterface."
  3702. endif
  3703. endif
  3704. ;; add the group dependency on NDIS and NDISWAN to ensure that RAS drivers load
  3705. ;We don't do this any more because of no-net changes being made to
  3706. ;transports and drivers - 2/11/96 RamC
  3707. ; shell "" UpdateNetGroupDependency $(fNetbeuiChosen) $(fTcpIpChosen) $(fIpxChosen)
  3708. ; ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3709. ; Debug-Output "error shelling UpdateNetGroupDependency."
  3710. ; goto ShellCodeError
  3711. ; endif
  3712. ; Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  3713. ; Debug-Output "error returned by UpdateNetGroupDependency."
  3714. ; endif
  3715. ; ; Set RasArp\Linkage\Bind to the NdisWan bindings from TCP/IP
  3716. ; ;
  3717. ;
  3718. ; Shell "" SetRasArpBindValueFromTcpIP
  3719. ; ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3720. ; Debug-Output "error shelling SetRasArpBindValueFromTcpIP."
  3721. ; goto ShellCodeError
  3722. ; endif
  3723. ; Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  3724. ; Debug-Output "error returned by SetRasArpBindValueFromTcpIP."
  3725. ; endif
  3726. ; We don't force NetBEUI any more on NT 4.0 RamC 3/25/96
  3727. ;
  3728. ; ; if NetBeui was not selected - meaning that NetBEUI was removed, and if
  3729. ; ; the SOFTWARE\Microsoft\RAS\PROTOCOLS\fNoNetbeuiWarning is either missing
  3730. ; ; or set to zero, then modify this value to 1 and put up a warning popup
  3731. ; ; so that the user is aware.
  3732. ;
  3733. ; set fNoNetbeuiWarning = 0
  3734. ; ifstr(i) $(fNetbeuiChosen) == FALSE
  3735. ; OpenRegKey $(!REG_H_LOCAL) "" $(RasProtocolsKeyName) $(!MAXIMUM_ALLOWED) KeyRasProtocols
  3736. ; ifstr $(KeyRasProtocols) != $(KeyNull)
  3737. ; GetRegValue $(KeyRasProtocols), "fNoNetbeuiWarning" NetbeuiInfo
  3738. ; set fNoNetbeuiWarning = *($(NetbeuiInfo), 4)
  3739. ; ifint $(fNoNetbeuiWarning) != 1
  3740. ; read-syms NoNetbeuiDlg$(!STF_LANGUAGE)
  3741. ; Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "STATUS", $(NoNetbeuiWarning)
  3742. ; ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3743. ; goto ShellCodeError
  3744. ; endif
  3745. ; endif
  3746. ; SetRegValue $(KeyRasProtocols) {fNoNetbeuiWarning,$(NoTitle),$(!REG_VT_DWORD), 1}
  3747. ; CloseRegKey $(KeyRasProtocols)
  3748. ; else
  3749. ; Debug-Output "Bindings: unable to open RasProtocolKeyName"
  3750. ; endif
  3751. ; endif
  3752. BindingsRasEnd = +
  3753. Debug-Output "Review bindings done."
  3754. goto end
  3755. ;;;;;;;;;;;;;;;;; UPGRADE RAS BEGINS ;;;;;;;;;;;;;;;;;;;;;;
  3756. UpgradeRas = +
  3757. ; DON't see a reason for checking this option type here. RamC 12/3/96
  3758. ; ; if the upgrade is not for RAS, then silently return
  3759. ; Debug-Output "OEMNSVRA.INF: Upgrade with Option type "$(Option)
  3760. ;; Modified on 9/24/96 by RamC - changed option from RAS to ROUTING
  3761. ;; for routing related changes
  3762. ; ifstr(i) $(Option) != "ROUTING"
  3763. ; Debug-Output "OEMNSVRA.INF: not upgrading due to nonras option"
  3764. ; set CommonStatus = STATUS_NOEFFECT
  3765. ; goto end
  3766. ; endif
  3767. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(!MAXIMUM_ALLOWED) KeyProduct
  3768. Ifstr $(KeyProduct) != $(KeyNull)
  3769. Shell $(!UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  3770. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3771. Debug-Output "ShellCode error"
  3772. goto ShellCodeError
  3773. endif
  3774. set !UG_Filename = $($R0)
  3775. ifstr(i) $(!UG_Filename) != ""
  3776. Debug-Output "File Name is "$(!UG_Filename)
  3777. StartWait
  3778. read-syms UpgradeErrors$(!STF_LANGUAGE)
  3779. read-syms StatusUpdatingRegistry$(!STF_LANGUAGE)
  3780. Shell "subroutn.inf" PushBillboard NETSTATUSDLG $(UpdatingRas)
  3781. Set BillboardVisible = 1
  3782. ; Change title and product description to Routing
  3783. SetRegValue $(KeyProduct) {Title, $(NoTitle), $(!REG_VT_SZ), $(!ProductROUTINGTitle)}
  3784. SetRegValue $(KeyProduct) {Description, $(NoTitle), $(!REG_VT_SZ), $(!ProductROUTINGDescription)}
  3785. ; determine the installed components. This info is used
  3786. ; by InstallRasFiles to determine the files to copy.
  3787. shell "" QueryComponentsInstalled $(ProductKeyName)
  3788. Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  3789. Set InstalledComps = $($R1)
  3790. Set InstalledFlags = $($R2)
  3791. Set DoServer = *($(InstalledFlags),1)
  3792. Set DoClient = *($(InstalledFlags),2)
  3793. Set DoAdmin = *($(InstalledFlags),3)
  3794. Set DoServerOnly = *($(InstalledFlags),4)
  3795. Set DoClientOnly = *($(InstalledFlags),5)
  3796. Set DoAdminOnly = *($(InstalledFlags),6)
  3797. Endif
  3798. Debug-Output "Installed List is "$(InstalledComps)
  3799. Debug-Output "Installed Flags is "$(InstalledFlags)
  3800. Set ServerInstalled = $(DoServer)
  3801. Set ClientInstalled = $(DoClient)
  3802. Set AdminInstalled = $(DoAdmin)
  3803. Install InstallResources
  3804. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  3805. goto filecopycancel
  3806. endif
  3807. Install InstallRasFiles
  3808. ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  3809. goto filecopycancel
  3810. endif
  3811. Shell "" AreRequiredDllsPresent
  3812. ifstr(i) $($R0) != STATUS_SUCCESSFUL
  3813. set MissingFiles = $($R1)
  3814. set ErrorLoadingConfigDll = $(ErrorLoadingConfigDll)" "$(MissingFiles)
  3815. shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "STATUS" $(ErrorLoadingConfigDll)
  3816. set CommonStatus = STATUS_USERCANCEL
  3817. goto end
  3818. endif
  3819. LoadLibrary "x" $(!STF_CWDDIR)rascfg.dll PORTSDLGHANDLE
  3820. ; add pptp filters to lan interfaces if they were previously specified
  3821. Debug-Output "AddPPTPFilters entry."
  3822. LibraryProcedure Result, $(PORTSDLGHANDLE), AddPPTPFilters
  3823. Debug-Output "AddPPTPFilters exit result = "$(Result)
  3824. ; set the RouterType value in RAS\Protocols to indicate
  3825. ; what is currently installed if RouterType is not already
  3826. ; present in RAS\Protocols
  3827. set RasInstalled = FALSE
  3828. set LanInstalled = FALSE
  3829. set DdmInstalled = FALSE
  3830. OpenRegKey $(!REG_H_LOCAL) "" $(RasProtocolsKeyName) $(!MAXIMUM_ALLOWED) KeyProtocol
  3831. ifstr $(KeyProtocol) != $(KeyNull)
  3832. GetRegValue $(KeyProtocol), "RouterType" RouterType
  3833. Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  3834. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(!MAXIMUM_ALLOWED) KeyRas
  3835. ifstr $(KeyRas) != $(KeyNull)
  3836. set RasInstalled = TRUE
  3837. CloseRegKey $(KeyRas)
  3838. endif
  3839. ; check if any of the following services are installed
  3840. ; to determine if Lan routing is enabled.
  3841. ForListDo { NwlnkRip, NwSapAgent, IpRip, RelayAgent }
  3842. set ServiceName = $(!NTN_ServiceBase)"\"$($)
  3843. OpenRegKey $(!REG_H_LOCAL) "" $(ServiceName) $(!MAXIMUM_ALLOWED) KeyService
  3844. ifstr $(KeyService) != $(KeyNull)
  3845. set LanInstalled = TRUE
  3846. CloseRegKey $(KeyService)
  3847. endif
  3848. EndForListDo
  3849. ; if the set-or command worked as it is supposed to, then
  3850. ; i wouldn't have to hack around like this!!
  3851. set RouterType = 1 ; default to RAS installed
  3852. ifstr(i) $(RasInstalled) == TRUE
  3853. ifstr(i) $(LanInstalled) == TRUE
  3854. set RouterType = 3
  3855. else
  3856. set RouterType = 1
  3857. endif
  3858. else-ifstr(i) $(LanInstalled) == TRUE
  3859. ifstr(i) $(RasInstalled) == TRUE
  3860. set RouterType = 3
  3861. else
  3862. set RouterType = 2
  3863. endif
  3864. endif
  3865. SetRegValue $(KeyProtocol) {RouterType, $(NoTitle), $(!REG_VT_DWORD), $(RouterType)}
  3866. EndIf
  3867. CloseRegKey $(KeyProtocol)
  3868. endif
  3869. ; remove NWLNKRIP, NWSAPAGENT, IPRIP, RELAYAGENT services
  3870. ; because they are part of the Router service now.
  3871. ; BUGBUG we should actually warn the user
  3872. Shell "" RemoveIpRipService
  3873. Shell "" RemoveRelayAgentService
  3874. Shell "" RemoveNwlnkRipService
  3875. Shell "" RemoveIsnSapService
  3876. set fTcpIpChosen = FALSE
  3877. set fIpxChosen = FALSE
  3878. ; find out what protocols are currently selected
  3879. Shell "" QuerySelectedProtocols
  3880. Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  3881. Debug-Output "error returned by QuerySelectedProtocols."
  3882. endif
  3883. set fNetbeuiSelected = $($R1)
  3884. set fTcpIpSelected = $($R2)
  3885. set fIpxSelected = $($R3)
  3886. set fNetbeuiAllowed = $($R4)
  3887. set fTcpIpAllowed = $($R5)
  3888. set fIpxAllowed = $($R6)
  3889. set dwRouterType = $($R7)
  3890. ifstr(i) $(fTcpIpSelected) == TRUE
  3891. set fTcpIpChosen = TRUE
  3892. else
  3893. set fTcpIpChosen = $(fTcpIpAllowed)
  3894. endif
  3895. ifstr(i) $(fIpxSelected) == TRUE
  3896. set fIpxChosen = TRUE
  3897. else
  3898. set fIpxChosen = $(fIpxAllowed)
  3899. endif
  3900. set LanRoutingOnly = FALSE
  3901. ifint $(dwRouterType) == 1
  3902. set RasInstalled = TRUE
  3903. else-ifint $(dwRouterType) == 2
  3904. set LanRoutingOnly = TRUE
  3905. set LanInstalled = TRUE
  3906. else-ifint $(dwRouterType) == 3
  3907. set RasInstalled = TRUE
  3908. set LanInstalled = TRUE
  3909. else-ifint $(dwRouterType) == 4
  3910. set DdmInstalled = TRUE
  3911. else-ifint $(dwRouterType) == 5
  3912. set RasInstalled = TRUE
  3913. set DdmInstalled = TRUE
  3914. else-ifint $(dwRouterType) == 6
  3915. set DdmInstalled = TRUE
  3916. set LanInstalled = TRUE
  3917. else-ifint $(dwRouterType) == 7
  3918. set RasInstalled = TRUE
  3919. set DdmInstalled = TRUE
  3920. set LanInstalled = TRUE
  3921. else
  3922. Debug-Output "upgraderas:invalid RouterType "$(dwRouterType)
  3923. endif
  3924. Shell "" InstallRouterService $(DdmInstalled) $(RasInstalled) $(RoutingKeyList) $(RoutingValueList)
  3925. ; Add the static dependency on RasMan service only if
  3926. ; demand dial routing is enabled
  3927. ifstr(i) $(LanRoutingOnly) != TRUE
  3928. Shell "" AddServiceDependency "Router" "RasMan"
  3929. endif
  3930. Debug-Output "!PROXY_INSTALLED = "$(!PROXY_INSTALLED)
  3931. ifstr(i) $(!PROXY_INSTALLED) == "TRUE"
  3932. Shell "" AddServiceDependency "Router" "mspadmin"
  3933. endif
  3934. ; this dependency is required for RouterAdmin to show routing info
  3935. Shell "" AddServiceDependency "Router" "LanManServer"
  3936. Debug-Output "UpgradeRas: dwRouterType= "$(dwRouterType)
  3937. ; if lan routing only is installed, then we are done
  3938. ifstr(i) $(dwRouterType) == $(ROUTER_TYPE_LAN)
  3939. Debug-Output "UpgradeRas: done because lanroutingonly"
  3940. goto UpgradeRasEnd
  3941. endif
  3942. ; Change the EventMessageFile value for the following services
  3943. ; from rasmsg.dll to mprmsg.dll.
  3944. ForListDo {AsyncMac, NdisWan, RasAuto, RasMan, RemoteAccess}
  3945. set ServiceName = $(!NTN_ServiceBase)"\EventLog\System\"$($)
  3946. OpenRegKey $(!REG_H_LOCAL) "" $(ServiceName) $(!MAXIMUM_ALLOWED) KeyService
  3947. ifstr $(KeyService) != $(KeyNull)
  3948. SetRegValue $(KeyService) {EventMessageFile, $(NoTitle), $(!REG_VT_EXPAND_SZ), $(!RouterMsgDll)}
  3949. CloseRegKey $(KeyService)
  3950. endif
  3951. EndForListDo
  3952. ifstr(i) $(fTcpIpChosen) == TRUE
  3953. ; Remove TCP/IP dependency on RASARP
  3954. ; this change is part of the no-net changes in RAS 2/15/96 RamC
  3955. Shell "" RemoveServiceDependency "TCPIP" "RASARP"
  3956. ; make rasarp belong to PNP_TDI group, make it autostart and
  3957. ; make rasarp depend on TCP/IP
  3958. ; Modified on 9/24/96 by RamC for Routing related changes
  3959. ; RasArp is not required any more - this service is replaced by WanArp now
  3960. Shell "" RemoveRasArpService
  3961. Shell "" InstallWanArpService
  3962. Shell "" DisablePPTPFilterDriver
  3963. Shell "" InstallIPFilterDriver
  3964. Shell "" InstallIPEventlogDlls
  3965. Shell "" InstallIPSnmpAgents
  3966. endif
  3967. ifstr(i) $(fIpxChosen) == TRUE
  3968. Shell "" InstallIpxPingService
  3969. shell "" InstallNwlnkFwdService
  3970. shell "" InstallNwlnkFltService
  3971. Shell "" InstallIPXEventlogDlls
  3972. Shell "" InstallIPXSnmpAgents
  3973. endif
  3974. ; install the IP/IPX router managers and add LAN interfaces
  3975. ; for installed net cards
  3976. LibraryProcedure Result, $(PORTSDLGHANDLE), AddRtrMgrAndLanInterfaces $(fTcpIpChosen) $(fIpxChosen)
  3977. ifstr(i) $(Result) == ERROR
  3978. Shell subroutn.inf, SetupMessage $(!STF_LANGUAGE) "STATUS" $(ErrorAddingRtrMgr)
  3979. else
  3980. Debug-Output "AddRtrMgrAndLanInterfaces exit."
  3981. endif
  3982. ; Now change the ImagePath value of the following services to
  3983. ; the new imagepath - mprouter.exe
  3984. ; also set the appropriate type value
  3985. ForListDo {remoteaccess, rasman, rasauto, router}
  3986. set ServiceName = $(!NTN_ServiceBase)"\"$($)
  3987. set ImagePath = "%SystemRoot%\System32\mprouter.exe"
  3988. set KeyService = $(KeyNull)
  3989. OpenRegKey $(!REG_H_LOCAL) "" $(ServiceName) $(!MAXIMUM_ALLOWED) KeyService
  3990. ifstr $(KeyService) != $(KeyNull)
  3991. SetRegValue $(KeyService) {ImagePath,$(NoTitle),$(!REG_VT_EXPAND_SZ),$(ImagePath)}
  3992. SetRegValue $(KeyService) {Type,$(NoTitle),$(!REG_VT_DWORD),288}
  3993. CloseRegKey $(KeyService)
  3994. endif
  3995. EndForListDo
  3996. ; Set RestoreConnections to 1 - this is because RAS setup
  3997. ; doesn't provide the UI any more to disable netconnections
  3998. ; due to changes in the NT redirector which restores connections
  3999. ; in a deferred state.
  4000. Shell "" SetRestoreConnectionTo1
  4001. ; Remove RemoteAccess dependency on NetLogon service because
  4002. ; NT Cairo doesn't have netlogon service any more.
  4003. Shell "" RemoveServiceDependency "RemoteAccess" "NetLogon"
  4004. ; Add RasMan dependency on TapiSrv, a new service
  4005. Shell "" AddServiceDependency "RasMan" "tapisrv"
  4006. Shell "" AddServiceDependency "RasMan" "rpcss"
  4007. ; this dependency is required for ppp to start up fine
  4008. Shell "" AddServiceDependency "RasMan" "LanManWorkstation"
  4009. ; this dependency is required for RouterAdmin to show routing info
  4010. Shell "" AddServiceDependency "Router" "LanManServer"
  4011. ; install the all new AutoDial service
  4012. Shell "" InstallSoftwareAndService RASAUTODIAL
  4013. ; Disable the RasAuto service if this is not a NT Workstation
  4014. ; RamC 6/13/96 don't disable RasAuto for NT Server any more because
  4015. ; redial-on-link-failure is implemented in autodial service and it should
  4016. ; be enabled if one or more dialout ports are configured.
  4017. ; Instead set the RasAuto start type to manual. 12/3/96
  4018. ifstr(i) $(!STF_PRODUCT) != "WINNT"
  4019. OpenRegKey $(!REG_H_LOCAL) "" $(!RasAutodialKeyName) $(!MAXIMUM_ALLOWED) KeyAutodial
  4020. ifstr $(KeyAutodial) == $(KeyNull)
  4021. Debug-Output "OEMNSVRA.INF: could not open RasAuto key"
  4022. else
  4023. SetRegValue $(KeyAutodial) {Start, $(NoTitle), $(!REG_VT_DWORD), 3}
  4024. CloseRegKey $(KeyAutodial)
  4025. endif
  4026. endif
  4027. Shell "" AddServiceDependency "RasAuto" "RasMan"
  4028. ; change the RasMan sevice type to "serviceshare" (32) from "service" (16)
  4029. ; this is needed because RasAutoDial shares rasman.exe,
  4030. OpenRegKey $(!REG_H_LOCAL) "" $(!RasManSvcKeyName) $(!MAXIMUM_ALLOWED) KeyRasMan
  4031. ifstr $(KeyRasMan) == $(KeyNull)
  4032. Debug-Output "OEMNSVRA.INF: could not open RasMan key"
  4033. else
  4034. SetRegValue $(KeyRasMan) {Type, $(NoTitle), $(!REG_VT_DWORD), 32}
  4035. CloseRegKey $(KeyRasMan)
  4036. endif
  4037. ;
  4038. ; Commented out by RamC on 10/15/96 - This is not relevant any more
  4039. ; since we shipped two versions of NT with NdisWan
  4040. ; ;Rename the software and services RasHub keys to NdisWan
  4041. ; LoadLibrary "x" $(!STF_CWDDIR)rascfg.dll PORTSDLGHANDLE
  4042. ; LibraryProcedure Result, $(PORTSDLGHANDLE), RenameRasHubToNdisWan
  4043. ;
  4044. ; ; now rename all occurences of RasHub to NdisWan (including the
  4045. ; ; net rules in the NetworkCards area
  4046. ;
  4047. ; Shell "" RenameRasHubToNdisWan
  4048. ; ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4049. ; Debug-Output "OEMNSVRA.INF:error shelling RenameRasHubToNdisWan."
  4050. ; goto ShellCodeError
  4051. ; endif
  4052. ; Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  4053. ; Debug-Output "OEMNSVRA.INF:error returned by RenameRasHubToNdisWan."
  4054. ; goto end
  4055. ; endif
  4056. ; Install the NdisWan Adapter for Blood Hound service to bind to
  4057. ; This should be done only if the adapter is not already installed.
  4058. Shell "" IsNdisWanBHAdapterInstalled
  4059. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4060. Debug-Output "OEMNSVRA.INF:error shelling IsNdisWanBHAdapterInstalled"
  4061. goto ShellCodeError
  4062. endif
  4063. ifstr(i) $($R0) != STATUS_SUCCESSFUL
  4064. ; the adpater is not installed, so install it now
  4065. Shell "" InstallNdisWanBHAdapter
  4066. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4067. Debug-Output "OEMNSVRA.INF:error shelling InstallNdisWanBHAdapter"
  4068. goto ShellCodeError
  4069. endif
  4070. ifstr(i) $($R0) != STATUS_SUCCESSFUL
  4071. set RegistryErrorIndex = $($R0)
  4072. Debug-Output "Error installing NdisWan Blood hound adapter"
  4073. goto fatalregistry
  4074. endif
  4075. endif
  4076. ; Install the connection wrapper
  4077. Shell "" InstallNdisTapiService
  4078. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4079. Debug-Output "Error shelling InstallNdisTapiService "
  4080. goto ShellCodeError
  4081. endif
  4082. ifstr(i) $($R0) != STATUS_SUCCESSFUL
  4083. set RegistryErrorIndex = $($R0)
  4084. Debug-Output "Error installing NdisTapi Service"
  4085. goto fatalregistry
  4086. endif
  4087. ; update asyncmac bind rules to prevent blood hound binding to it
  4088. Shell "" UpdateAsyncMacNetRules
  4089. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4090. Debug-Output "OEMNSVRA.INF:error shelling UpdateAsyncMacNetRules."
  4091. goto ShellCodeError
  4092. endif
  4093. Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  4094. Debug-Output "OEMNSVRA.INF:error returned by UpdateAsyncMacNetRules."
  4095. goto end
  4096. endif
  4097. ; modify ndiswan netrules to reflect the new protocol support
  4098. Shell "" UpdateNdisWanInfo
  4099. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4100. Debug-Output "OEMNSVRA.INF:error shelling UpdateNdisWanInfo."
  4101. goto ShellCodeError
  4102. endif
  4103. Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  4104. Debug-Output "OEMNSVRA.INF:error returned by UpdateNdisWanInfo."
  4105. goto end
  4106. endif
  4107. ; Add NDISWAN to the ServiceGroupOrder so that all NDIS components
  4108. ; load before NdisWan driver.
  4109. Shell "" AddNDISWANToServiceGroupOrder
  4110. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4111. Debug-Output "Cannot add NDISWAN to ServiceGroupOrder"
  4112. goto ShellCodeError
  4113. endif
  4114. Shell "" UpdateAsyncMacParameters
  4115. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4116. Debug-Output "OEMNSVRA.INF:error shelling UpdateAsyncMacParameters."
  4117. goto ShellCodeError
  4118. endif
  4119. Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  4120. Debug-Output "OEMNSVRA.INF:error returned by UpdateAsyncMacParameters."
  4121. goto end
  4122. endif
  4123. Shell "" UpdateAsyncMacStartType
  4124. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4125. Debug-Output "OEMNSVRA.INF:error shelling UpdateAsyncMacStartType."
  4126. goto ShellCodeError
  4127. endif
  4128. Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  4129. Debug-Output "OEMNSVRA.INF:error returned by UpdateAsyncMacStartType."
  4130. goto end
  4131. endif
  4132. ; update SOFTWARE\RAS\PROTOCOLS with the list of selected
  4133. ; protocols.
  4134. Shell "" UpgradeSelectedProtocols
  4135. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4136. Debug-Output "OEMNSVRA.INF:error shelling UpgradeSelectedProtocols."
  4137. goto ShellCodeError
  4138. endif
  4139. Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  4140. Debug-Output "OEMNSVRA.INF:error returned by UpgradeSelectedProtocols."
  4141. goto end
  4142. endif
  4143. ; Set the remoteaccess service start type to manual because
  4144. ; this service functionality is now in Router service.
  4145. OpenRegKey $(!REG_H_LOCAL) "" $(RasSvrKeyName) +
  4146. $(!MAXIMUM_ALLOWED) KeySvr
  4147. ifstr $(KeySvr) != $(KeyNull)
  4148. Debug-Output "OEMNSVRA.INF: Changing Router Start value to 3"
  4149. SetRegValue $(KeySvr) {Start,$(NoTitle),$(!REG_VT_DWORD), 3}
  4150. CloseRegKey $(KeySvr)
  4151. else
  4152. Debug-Output "OEMNSVRA.INF: error opening RemoteAccess service key"
  4153. endif
  4154. ; if the user is upgrading a WinNt system to a ServerNt system,
  4155. ; and if there is at least one dialin port, then change the
  4156. ; router service start type to auto if the service is not
  4157. ; currently disabled.
  4158. ; also change the ndistapi parameter value.
  4159. ; The software\Microsoft\Ras\Protocols key has the variables
  4160. ; fNetbeuiAllowed, fTcpIpAllowed and fIpxAllowed which indicate
  4161. ; if there is any dialin port configured. If one of these is
  4162. ; set to 1, then the ras server start type is set to AutoStart - 2
  4163. ifstr(i) $(!STF_STANDARDSERVERUPGRADE) == "YES"
  4164. OpenRegKey $(!REG_H_LOCAL) "" $(RasProtocolsKeyName) +
  4165. $(!MAXIMUM_ALLOWED) KeyProtocols
  4166. ifstr $(KeyProtocols) != $(KeyNull)
  4167. set fDialin = FALSE
  4168. set TmpList = {}
  4169. GetRegValue $(KeyProtocols) "fNetbeuiAllowed" TmpList
  4170. ifint $(RegLastError) == 0
  4171. ifstr *($(TmpList), 4) == 1
  4172. set fDialin = TRUE
  4173. endif
  4174. endif
  4175. set TmpList = {}
  4176. ifstr(i) $(fDialin) == FALSE
  4177. GetRegValue $(KeyProtocols) "fTcpIpAllowed" TmpList
  4178. ifint $(RegLastError) == 0
  4179. ifstr *($(TmpList), 4) == 1
  4180. set fDialin = TRUE
  4181. endif
  4182. endif
  4183. endif
  4184. set TmpList = {}
  4185. ifstr(i) $(fDialin) == FALSE
  4186. GetRegValue $(KeyProtocols) "fIpxAllowed" TmpList
  4187. ifint $(RegLastError) == 0
  4188. ifstr *($(TmpList), 4) == 1
  4189. set fDialin = TRUE
  4190. endif
  4191. endif
  4192. endif
  4193. Debug-Output "OEMNSVRA.INF: Upgrade => Are dialin ports configured? "$(fDialin)
  4194. ifstr(i) $(fDialin) == TRUE
  4195. OpenRegKey $(!REG_H_LOCAL) "" $(!RouterKeyName) +
  4196. $(!MAXIMUM_ALLOWED) KeySvr
  4197. ifstr $(KeySvr) != $(KeyNull)
  4198. set RasStartValue = 2
  4199. GetRegValue $(KeySvr) "Start" StartList
  4200. ifint $(RegLastError) == 0
  4201. set RasStartValue = *($(StartList), 4)
  4202. endif
  4203. ; check if the service is currently disabled
  4204. ifint $(RasStartValue) != 4
  4205. Debug-Output "OEMNSVRA.INF: Changing Router Start value to 2"
  4206. SetRegValue $(KeySvr) {Start,$(NoTitle),$(!REG_VT_DWORD), 2}
  4207. endif
  4208. CloseRegKey $(KeySvr)
  4209. else
  4210. Debug-Output "OEMNSVRA.INF: error opening Router service key"
  4211. endif
  4212. endif
  4213. CloseRegKey $(KeyProtocols)
  4214. else
  4215. Debug-Output "OEMNSVRA.INF: could not open RAS\Protocols key"
  4216. endif
  4217. ; set the NdisTapi parameter for a wksta to server upgrade
  4218. OpenRegKey $(!REG_H_LOCAL) "" $(!NdisTapiKeyName)"\Parameters" $(!MAXIMUM_ALLOWED) ParamKey
  4219. Ifstr(i) $(ParamKey) != $(KeyNull)
  4220. SetRegValue $(ParamKey) {AsyncEventQueueSize, 0, $(!REG_VT_DWORD), 3072}
  4221. CloseRegKey $(ParamKey)
  4222. EndIf
  4223. endif
  4224. ; If RAS is configured for NWLNKIPX, then rename the IPXROUTER
  4225. ; key to NWLNKRIP and rename occurances of isnrip.sys to
  4226. ; nwlnkrip.sys.
  4227. ; Change the RemoteAccess service dependency to depend on
  4228. ; NWLNKRIP service.
  4229. ; Add the NwlnkRip\UseRef key to indicate RAS is
  4230. ; using the service.
  4231. ; Also, if SAP agent was installed by RAS, remove and install
  4232. ; the service by shelling the OEMNSVSA.INF file so that SAP
  4233. ; agent can be shared by NCP server.
  4234. Shell "" UpgradeIpxInfo $(PORTSDLGHANDLE)
  4235. ; map the NT3.1 ISDN info (if present) to the TAPI DEVICES format
  4236. Shell "" UpgradeIsdnInfo
  4237. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4238. Debug-Output "OEMNSVRA.INF:error shelling UpgradeIsdnInfo."
  4239. goto ShellCodeError
  4240. endif
  4241. Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  4242. Debug-Output "OEMNSVRA.INF:error returned by UpgradeIsdnInfo."
  4243. set Error = $(UpgradeIsdnInfoError)
  4244. goto fatal
  4245. endif
  4246. ; Add Perfmon data to the registry and load ras perf counters
  4247. Shell "" UpdatePerfmonInfo
  4248. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4249. Debug-Output "OEMNSVRA.INF:error shelling UpdatePerfmonInfo."
  4250. goto ShellCodeError
  4251. endif
  4252. Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  4253. Debug-Output "OEMNSVRA.INF:error returned by UpdatePerfmonInfo."
  4254. goto end
  4255. endif
  4256. Shell "" UpdateCPList
  4257. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4258. Debug-Output "OEMNSVRA.INF:error shelling UpdateCPList."
  4259. goto ShellCodeError
  4260. endif
  4261. Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  4262. Debug-Output "OEMNSVRA.INF:error returned by UpdateCPList."
  4263. goto end
  4264. endif
  4265. ; if this is not a workstation, then bump up the NdisTapi
  4266. ; parameter to 4 times its original value
  4267. ifstr(i) $(!STF_PRODUCT) != "WINNT"
  4268. OpenRegKey $(!REG_H_LOCAL) "" $(!NdisTapiKeyName)"\Parameters" $(!MAXIMUM_ALLOWED) ParamKey
  4269. Ifstr(i) $(ParamKey) != $(KeyNull)
  4270. SetRegValue $(ParamKey) {AsyncEventQueueSize, 0, $(!REG_VT_DWORD), 3072}
  4271. CloseRegKey $(ParamKey)
  4272. EndIf
  4273. EndIf
  4274. ; Remove and create the program manager group to make sure
  4275. ; that the new readme icons are created. If setup supported
  4276. ; querying the program manager to determine if an item exists,
  4277. ; we could have done this better.
  4278. ; remove the group and add the RouterAdmin icon
  4279. Install RemoveRasGroup
  4280. Install CreateRtrAdminIcon
  4281. ; 3/22/96 Remote Access Program Group is not created any more
  4282. ; instead the Remote Access Admin icon will appear in Administrative Tools folder
  4283. ; and Dial-Up Networking icon (previously Remote Access) will appear in Accessories
  4284. ; and My Computer folder. The help icons will be absorbed in the main NT help.
  4285. ; the old Remote Access Monitor icon appears in the Control Panel as Dial-Up Monitor.
  4286. ; Install CreateRasGroup
  4287. UpgradeRasEnd =+
  4288. EndWait
  4289. Ifint $(BillboardVisible) != 0
  4290. Shell "subroutn.inf" PopBillboard
  4291. Set BillboardVisible = 0
  4292. Endif
  4293. endif
  4294. ; fix the RAS SoftwareType to correctly be listed as a Servive
  4295. ; so that then new NCPA will display it.
  4296. Shell "" UpdateSoftwareType
  4297. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4298. Debug-Output "OEMNSVRA.INF:error shelling UpdateSoftwareType."
  4299. goto ShellCodeError
  4300. endif
  4301. Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  4302. Debug-Output "OEMNSVRA.INF:error returned by UpdateSoftwareType."
  4303. goto end
  4304. endif
  4305. SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMajorVersion)}
  4306. SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMinorVersion)}
  4307. ;
  4308. ; Update description and op support
  4309. ;
  4310. SetRegValue $(KeyProduct) {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductRASDescription)}
  4311. SetRegValue $(KeyProduct) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  4312. CloseRegKey $(KeyProduct)
  4313. else
  4314. Set RegistryErrorIndex = $($R0)
  4315. goto fatalregistry
  4316. endif
  4317. goto end
  4318. ;----------------------------------------------------------------------------
  4319. successful = +
  4320. ; 3/22/96 Remote Access Program Group is not created any more
  4321. ; instead the Remote Access Admin icon will appear in Administrative Tools folder
  4322. ; and Dial-Up Networking icon (previously Remote Access) will appear in Accessories
  4323. ; and My Computer folder. The help icons will be absorbed in the main NT help.
  4324. ; the old Remote Access Monitor icon appears in the Control Panel as Dial-Up Monitor.
  4325. ;
  4326. ; Ifstr(i) $(!NTN_InstallMode) == "install"
  4327. ; Debug-Output "OEMNSVRA.INF: Creating Ras Group and Icons"
  4328. ; ifstr(i) $(DoServerOnly) == FALSE
  4329. ; install CreateRasGroup
  4330. ; endif
  4331. ; EndIf
  4332. Ifstr(i) $(!NTN_InstallMode) == "install"
  4333. Debug-Output "OEMNSVRA.INF: Creating RTRADMIN icon in Administrative Tools program group"
  4334. install CreateRtrAdminIcon
  4335. EndIf
  4336. Ifstr(i) $(!NTN_InstallPhase) == primary
  4337. goto installstep1
  4338. else-ifstr(i) $(!NTN_InstallMode) == configure
  4339. goto installstep1
  4340. endif
  4341. ifint $(NewNumDialin) != 0
  4342. ; display success message only in attended mode of setup
  4343. ifstr(i) $(!STF_GUI_UNATTENDED) != YES
  4344. read-syms SuccessfulInstall$(!STF_LANGUAGE)
  4345. ifstr(i) $(LanRoutingOnly) != TRUE
  4346. shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "STATUS" $(Success)
  4347. endif
  4348. endif
  4349. endif
  4350. installstep1 = +
  4351. goto end
  4352. ;;;;;;;;;;;;;;;;;;; Warning messages ;;;;;;;;;;;;;
  4353. ; warning display
  4354. ;
  4355. warning = +
  4356. Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  4357. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4358. goto ShellCodeError
  4359. endif
  4360. ifstr(i) $($R1) == "OK"
  4361. goto $(to)
  4362. else-ifstr(i) $($R1) == "CANCEL"
  4363. goto $(from)
  4364. else
  4365. Debug-Msg "Error Error Bad DLGEVENT"
  4366. goto "end"
  4367. endif
  4368. ;
  4369. ; non fatal error display
  4370. ;
  4371. nonfatal = +
  4372. Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(Error)
  4373. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4374. goto ShellCodeError
  4375. endif
  4376. ifstr(i) $($R1) == "OK"
  4377. goto $(from)
  4378. else
  4379. goto "end"
  4380. endif
  4381. ;
  4382. ; Registry is broken
  4383. ;
  4384. fatalregistry = +
  4385. Shell $(!UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  4386. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4387. Debug-Output "fatalregistry: shell to find RegistryErrorString failed."
  4388. goto ShellCodeError
  4389. endif
  4390. ifstr(i) $(RasSpecificString) != ""
  4391. set Error = $($R0)" - service "$(RasSpecificString)"."
  4392. else
  4393. set Error = $($R0)
  4394. endif
  4395. read-syms AbortMessage$(!STF_LANGUAGE)
  4396. set Error = $(Error)$(!LF)$(!LF)$(AbortText)
  4397. goto fatal
  4398. ; fatal error display
  4399. ;
  4400. fatal = +
  4401. Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  4402. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4403. Debug-Output "fatal: shell to SetupMessage failed."
  4404. goto ShellCodeError
  4405. endif
  4406. goto setfailed
  4407. ;
  4408. ; Shelling error
  4409. ;
  4410. ShellCodeError = +
  4411. read-syms ShellCodeErrorMsg$(!STF_LANGUAGE)
  4412. ui start "Error Message"
  4413. goto setfailed
  4414. setfailed = +
  4415. set CommonStatus = STATUS_FAILED
  4416. ;
  4417. ; If OEM_ABANDON_ON, we need to clean up the registry
  4418. ;
  4419. ifstr(i) $(fRemoveRas) == TRUE
  4420. set fRemoveRas = FALSE
  4421. set from = setfailed
  4422. set to = end
  4423. goto RemoveRas
  4424. endif
  4425. goto end
  4426. filecopycancel =+
  4427. set CommonStatus = STATUS_USERCANCEL
  4428. ifstr(i) $(fRemoveRas) == TRUE
  4429. set fRemoveRas = FALSE
  4430. set from = setfailed
  4431. set to = end
  4432. goto RemoveRas
  4433. endif
  4434. ;
  4435. end = +
  4436. ifstr(i) $(PORTSDLGHANDLE) != $(HandleNull)
  4437. Debug-Output "Unloading RASCFG.DLL"
  4438. FreeLibrary $(PORTSDLGHANDLE)
  4439. endif
  4440. Debug-Output "ending at last!!"
  4441. goto term
  4442. term = +
  4443. Debug-Output "OEMNSVRA.INF:term: CommonStatus "$(CommonStatus)
  4444. Return $(CommonStatus)
  4445. [BindingsReview]
  4446. ; This routine is invoked by NCPA when we list OEMNSVRA.INF in the
  4447. ; ReviewPrograms list in SOFTWARE\Microsoft\NCPA registry key
  4448. ; we do this to ensure that we are the last to be called for review
  4449. ; bindings.
  4450. ;
  4451. ; extract parameters
  4452. ;
  4453. set Option = $($1)
  4454. set SrcDir = $($2)
  4455. set AddCopy = $($3)
  4456. set DoCopy = $($4)
  4457. set DoConfig = $($5)
  4458. set Language = $(!STF_LANGUAGE)
  4459. set SaveInstallMode = $(!NTN_InstallMode)
  4460. ; force the bind mode
  4461. set !NTN_InstallMode = bind
  4462. Shell "" InstallOption $(Language) $(Option) $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig)
  4463. ; restore install mode
  4464. set !NTN_InstallMode = $(SaveInstallMode)
  4465. set Status = $($R0)
  4466. Return $(Status)
  4467. ;*************************************
  4468. ;
  4469. ;
  4470. ; Installation Support Routines
  4471. ;
  4472. ;
  4473. ;************************************
  4474. [AreRequiredDllsPresent]
  4475. ; determine if the required dll's are present for rascfg.dll to load
  4476. ; the dll's rascfg.dll pulls in are rasfil32.dll, rasmxs.dll, rtrcfg.dll, ipxadmin.dll and mprapi.dll
  4477. ;
  4478. Debug-Output "AreRequiredDllsPresent entry.."
  4479. set Sys32Dir = $(!STF_WINDOWSSYSPATH)
  4480. set FilesList = { "RASCFG.DLL", "RASFIL32.DLL", "RASMXS.DLL", "RTRCFG.DLL", "IPXADMIN.DLL", "MPRAPI.DLL", "MPRFILTR.DLL" }
  4481. set MissingFiles = {}
  4482. forlistdo $(FilesList)
  4483. set STATUS = NO
  4484. LibraryProcedure STATUS, $(!LIBHANDLE), CheckFileExistance $(Sys32Dir)"\"$($)
  4485. ifstr(i) $(STATUS) == NO
  4486. set MissingFiles = >($(MissingFiles), $($)" ")
  4487. endif
  4488. endforlistdo
  4489. QueryListSize NumberOfFiles $(MissingFiles)
  4490. ifint $(NumberOfFiles) != 0
  4491. Debug-Output "AreRequiredDllsPresent: missing files=> "$(MissingFiles)
  4492. set Status = STATUS_FAILED
  4493. else
  4494. set Status = STATUS_SUCCESSFUL
  4495. endif
  4496. Debug-Output "AreRequiredDllsPresent exit."
  4497. return $(Status) $(MissingFiles)
  4498. [SetRestoreConnectionTo1]
  4499. ; Set the system\currentcontrolset\control\networkprovider\restoreconnection value to 1
  4500. Debug-Output "SetRestoreConnectionTo1 entry.."
  4501. set KeyNull = ""
  4502. set RestoreKeyName = "SYSTEM\CurrentControlSet\Control\networkprovider"
  4503. OpenRegKey $(!REG_H_LOCAL) "" $(RestoreKeyName) $(!MAXIMUM_ALLOWED) KeyRestore
  4504. Ifstr(i) $(KeyRestore) != $(KeyNull)
  4505. SetRegValue $(KeyRestore) {RestoreConnection, 0, $(!REG_VT_DWORD), 1}
  4506. CloseRegKey $(KeyRestore)
  4507. else
  4508. Debug-Output "SetRestoreConnectionTo1 error opening key. "$(RestoreKeyName)
  4509. endif
  4510. Debug-Output "SetRestoreConnectionTo1 exit."
  4511. return
  4512. [InstallSoftwareAndService]
  4513. ; Create the software and the service sections in the registry for the component $($0)
  4514. set Status = STATUS_SUCCESSFUL
  4515. set ThisOption = $($0)
  4516. Debug-Output "InstallSoftwareAndService for "$(ThisOption)
  4517. Shell $(!UtilityInf), AddSoftwareComponent, $(!Manufacturer), +
  4518. $(!Product$(ThisOption)Name), $(!Product$(ThisOption)Name), +
  4519. $(!Product$(ThisOption)DisplayName), +
  4520. ; $(!RasInfName), $(!Product$(ThisOption)ImagePath), "autoserviceshare",+
  4521. ; Modified service type from autoserviceshare to serviceshare
  4522. ; on 9/26/96 by RamC for routing related changes
  4523. $(!RasInfName), $(!Product$(ThisOption)ImagePath), "serviceshare",+
  4524. "", {}, "", $(!RouterMsgDll), $(!RasEventTypeSupported)
  4525. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4526. Debug-Output "InstallSoftware: AddSoftware bombed out for "$(ThisOption)
  4527. goto InstallSoftwareError
  4528. endif
  4529. set RegistryErrorIndex = $($R0)
  4530. Ifstr(i) $(RegistryErrorIndex) == SERVICE_ALREADY_EXISTS
  4531. return $(Status)
  4532. EndIf
  4533. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  4534. CloseRegKey $($R1)
  4535. CloseRegKey $($R2)
  4536. CloseRegKey $($R3)
  4537. CloseRegKey $($R4)
  4538. CloseRegKey $($R5)
  4539. goto InstallSoftwareError
  4540. endif
  4541. ;
  4542. ; At this point:
  4543. ; $R1 contains the product version key handle;
  4544. ; $R2 contains the NetRules subkey handle;
  4545. ; $R3 contains the new Services key handle; and
  4546. ; $R4 contains the Parameters key
  4547. ; $R5 contains the Linkage key
  4548. ;
  4549. Set SoftProductKey = $($R1)
  4550. CloseRegKey $($R2)
  4551. CloseRegKey $($R3)
  4552. CloseRegKey $($R4)
  4553. CloseRegKey $($R5)
  4554. ; set product key information in the registry
  4555. set NewValueList = +
  4556. {{Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)},+
  4557. {ServiceName,$(NoTitle),$(!REG_VT_SZ),+
  4558. $(!Product$(ThisOption)Name)},+
  4559. {SoftwareType,$(NoTitle),$(!REG_VT_SZ),+
  4560. $(!Product$(ThisOption)SvcType)},+
  4561. {Title,$(NoTitle),$(!REG_VT_SZ),$(!Product$(ThisOption)Title)},+
  4562. {Description,$(NoTitle),$(!REG_VT_SZ),+
  4563. $(!Product$(ThisOption)Description)},+
  4564. {PathName,$(NoTitle),$(!REG_VT_SZ),+
  4565. $(!Product$(ThisOption)ImagePath)},+
  4566. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMajorVersion)},+
  4567. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMinorVersion)},+
  4568. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  4569. {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(!HideComponent)}}
  4570. Shell $(!UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  4571. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4572. Debug-Output "InstallSoftware: AddValueList bombed out for "$(ThisOption)
  4573. goto InstallSoftwareError
  4574. endif
  4575. set RegistryErrorIndex = $($R0)
  4576. CloseRegKey $(SoftProductKey)
  4577. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  4578. goto InstallSoftwareError
  4579. endif
  4580. goto InstallSoftwareEnd
  4581. InstallSoftwareError =+
  4582. read-syms ShellCodeErrorMsg$(!STF_LANGUAGE)
  4583. ui start "Error Message"
  4584. return STATUS_FAILED
  4585. InstallSoftwareEnd =+
  4586. return $(Status)
  4587. [InstallRouterService]
  4588. ; This Shell command installs the Router service and creates the router manager
  4589. ; keys.
  4590. ; First to check to see if the router service is already installed
  4591. set ServiceName = $(!NTN_SoftwareBase)"\"$(!Manufacturer)"\ROUTER\CurrentVersion"
  4592. OpenRegKey $(!REG_H_LOCAL) "" $(ServiceName) $(!MAXIMUM_ALLOWED) KeyService
  4593. ifstr $(KeyService) != $(KeyNull)
  4594. CloseRegKey $(KeyService)
  4595. goto InstallRouterServiceEnd
  4596. endif
  4597. set ThisOption = "ROUTING"
  4598. set PROTO_IP = 33
  4599. set PROTO_IPX = 43
  4600. set KeyNull = ""
  4601. set NoTitle = 0
  4602. set InstallDdm = $($0)
  4603. set InstallRas = $($1)
  4604. set RoutingKeyList = $($2)
  4605. set RoutingValueList = $($3)
  4606. ; if one of Ddm or RAS is installed, then set the LanOnlyMode value to 0
  4607. ; also set the dependency for router service based on LanOnlyMode
  4608. set DependOn = {"LanmanServer"}
  4609. set LanOnlyMode = 1
  4610. ifstr(i) $(InstallDdm) == "TRUE"
  4611. set DependOn = >($(DependOn), "RasMan")
  4612. set LanOnlyMode = 0
  4613. else-ifstr(i) $(InstallRas) == "TRUE"
  4614. set DependOn = >($(DependOn), "RasMan")
  4615. set LanOnlyMode = 0
  4616. endif
  4617. Debug-Output "RoutingKeyList "$(RoutingKeyList)
  4618. Debug-Output "RoutingValueList "$(RoutingValueList)
  4619. set Name = *($(RoutingValueList), ~($(RoutingKeyList), Name))
  4620. set ImagePath = *($(RoutingValueList), ~($(RoutingKeyList), ImagePath))
  4621. set SvcType = *($(RoutingValueList), ~($(RoutingKeyList), SvcType))
  4622. set Class = *($(RoutingValueList), ~($(RoutingKeyList), Class))
  4623. set Type = *($(RoutingValueList), ~($(RoutingKeyList), Type))
  4624. set Use = *($(RoutingValueList), ~($(RoutingKeyList), Use))
  4625. set BindForm = *($(RoutingValueList), ~($(RoutingKeyList), BindForm))
  4626. set Bindable = *($(RoutingValueList), ~($(RoutingKeyList), Bindable))
  4627. set MsgDll = *($(RoutingValueList), ~($(RoutingKeyList), MsgDll))
  4628. set EventType = *($(RoutingValueList), ~($(RoutingKeyList), EventType))
  4629. Shell $(!UtilityInf), AddSoftwareComponent, $(!Manufacturer), +
  4630. $(Name), $(Name), +
  4631. $(!Product$(ThisOption)DisplayName), +
  4632. $(!RasInfName), $(ImagePath),+
  4633. ; modified by ramc on 9/25
  4634. ; router should only depend on rasman for demand dial configuration
  4635. ; "serviceshare", "Network", {"RasMan"}, "", +
  4636. "serviceshare", "Network", $(DependOn), "", +
  4637. $(MsgDll), $(EventType)
  4638. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4639. Debug-Output "DoRouter: AddSoftware bombed out"
  4640. goto ShellCodeError
  4641. endif
  4642. set RegistryErrorIndex = $($R0)
  4643. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  4644. Debug-Output "DoRouter: Registry Error "$(RegistryErrorIndex)
  4645. CloseRegKey $($R1)
  4646. CloseRegKey $($R2)
  4647. CloseRegKey $($R3)
  4648. CloseRegKey $($R4)
  4649. CloseRegKey $($R5)
  4650. goto fatalregistry
  4651. endif
  4652. ;
  4653. ; At this point:
  4654. ; $R1 contains the product version key handle;
  4655. ; $R2 contains the NetRules subkey handle;
  4656. ; $R3 contains the new Services key handle; and
  4657. ; $R4 contains the Parameters key
  4658. ; $R5 contains the Linkage key
  4659. ;
  4660. Set SoftProductKey = $($R1)
  4661. Set SoftNetRuleKey = $($R2)
  4662. set SoftServiceKey = $($R3)
  4663. Set SoftParamsKey = $($R4)
  4664. Set SoftLinkageKey = $($R5)
  4665. ; set product key information in the registry
  4666. set NewValueList = +
  4667. {{Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)},+
  4668. {ServiceName,$(NoTitle),$(!REG_VT_SZ),+
  4669. $(Name)},+
  4670. {SoftwareType,$(NoTitle),$(!REG_VT_SZ),+
  4671. $(SvcType)},+
  4672. {Title,$(NoTitle),$(!REG_VT_SZ),$(!Product$(ThisOption)Title)},+
  4673. {Description,$(NoTitle),$(!REG_VT_SZ),+
  4674. $(!Product$(ThisOption)Description)},+
  4675. {PathName,$(NoTitle),$(!REG_VT_SZ),+
  4676. $(ImagePath)},+
  4677. {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMajorVersion)},+
  4678. {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMinorVersion)},+
  4679. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  4680. {Review, $(NoTitle), $(!REG_VT_DWORD), 1}, +
  4681. {Hidden,$(NoTitle),$(!REG_VT_DWORD), $(!HideComponent)}}
  4682. Shell $(!UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  4683. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4684. Debug-Output "DoRouter:product: AddValueList bombed out"
  4685. goto ShellCodeError
  4686. endif
  4687. set RegistryErrorIndex = $($R0)
  4688. CreateRegKey $(SoftProductKey) {"UIConfigDLLs",$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyUIConfigDLLs
  4689. set NewValueList = +
  4690. {{58bdf950-f471-11cf-aa67-00805f0c9232, $(NoTitle), $(!REG_VT_SZ), "ifadmin.dll"},+
  4691. {58bdf951-f471-11cf-aa67-00805f0c9232, $(NoTitle), $(!REG_VT_SZ), "ipadmin.dll"},+
  4692. {58bdf952-f471-11cf-aa67-00805f0c9232, $(NoTitle), $(!REG_VT_SZ), "ipxadmin.dll"},+
  4693. {58bdf953-f471-11cf-aa67-00805f0c9232, $(NoTitle), $(!REG_VT_SZ), "ddmadmin.dll"}}
  4694. Shell $(!UtilityInf), AddValueList, $(KeyUIConfigDLLs), $(NewValueList)
  4695. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4696. Debug-Output "DoRouter:UIconfigDlls: AddValueList bombed out"
  4697. goto ShellCodeError
  4698. endif
  4699. set RegistryErrorIndex = $($R0)
  4700. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  4701. CloseRegKey $(SoftServiceKey)
  4702. CloseRegKey $(SoftLinkageKey)
  4703. CloseRegKey $(SoftParamsKey)
  4704. CloseRegKey $(SoftProductKey)
  4705. Debug-Output "DoRouter: Registry Error "$(RegistryErrorIndex)
  4706. goto fatalregistry
  4707. endif
  4708. set KeyRouterMgrs = $(KeyNull)
  4709. set KeyIP = $(KeyNull)
  4710. set KeyIpx = $(KeyNull)
  4711. CreateRegKey $(SoftProductKey) {"RouterManagers",$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyRouterMgrs
  4712. ifstr(i) $(KeyRouterMgrs) != $(KeyNull)
  4713. CreateRegKey $(KeyRouterMgrs) {"IP",$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyIP
  4714. CreateRegKey $(KeyRouterMgrs) {"IPX",$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyIPX
  4715. CloseRegKey $(KeyRouterMgrs)
  4716. else
  4717. Debug-Output "CreateRegKey failed for RouterManagers"
  4718. endif
  4719. set NewValueList = +
  4720. {{Title, $(NoTitle), $(!REG_VT_SZ), "TCP/IP Routing Manager"},+
  4721. {ProtocolId, $(NoTitle), $(!REG_VT_DWORD), $(PROTO_IP)},+
  4722. {DllPath, $(NoTitle), $(!REG_VT_EXPAND_SZ), "%SystemRoot%\system32\iprtrmgr.dll"},+
  4723. {ConfigCLSID, $(NoTitle), $(!REG_VT_SZ), "58bdf951-f471-11cf-aa67-00805f0c9232"},+
  4724. {ConfigDll, $(NoTitle), $(!REG_VT_SZ), "ipadmin.dll"}}
  4725. Shell $(!UtilityInf), AddValueList, $(KeyIP), $(NewValueList)
  4726. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4727. Debug-Output "DoRouter:UIconfigDlls: AddValueList bombed out"
  4728. goto ShellCodeError
  4729. endif
  4730. set RegistryErrorIndex = $($R0)
  4731. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  4732. CloseRegKey $(SoftServiceKey)
  4733. CloseRegKey $(SoftLinkageKey)
  4734. CloseRegKey $(SoftParamsKey)
  4735. CloseRegKey $(SoftProductKey)
  4736. Debug-Output "DoRouter: Registry Error "$(RegistryErrorIndex)
  4737. goto fatalregistry
  4738. endif
  4739. set KeyIpRip = $(KeyNull)
  4740. set KeyBootp = $(KeyNull)
  4741. set KeyOSPF = $(KeyNull)
  4742. ifstr(i) $(KeyIP) != $(KeyNull)
  4743. CreateRegKey $(KeyIP) {"IPRIP",$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyIpRip
  4744. CreateRegKey $(KeyIP) {"IPBOOTP",$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyBootp
  4745. CreateRegKey $(KeyIP) {"OSPF",$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyOSPF
  4746. else
  4747. Debug-Output "KeyIP is not valid"
  4748. endif
  4749. ifstr(i) $(KeyIpRip) != $(KeyNull)
  4750. set NewValueList = +
  4751. {{Title, $(NoTitle), $(!REG_VT_SZ), "RIP Version 2 for Internet Protocol"},+
  4752. {ProtocolId, $(NoTitle), $(!REG_VT_DWORD), 8},+
  4753. {DllName, $(NoTitle), $(!REG_VT_SZ), "IPRIP2.DLL"},+
  4754. {ConfigDll, $(NoTitle), $(!REG_VT_SZ), "ipadmin.dll"}}
  4755. Shell $(!UtilityInf), AddValueList, $(KeyIpRip), $(NewValueList)
  4756. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4757. Debug-Output "DoRouter:UIconfigDlls: AddValueList bombed out"
  4758. goto ShellCodeError
  4759. endif
  4760. set RegistryErrorIndex = $($R0)
  4761. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  4762. CloseRegKey $(SoftServiceKey)
  4763. CloseRegKey $(SoftLinkageKey)
  4764. CloseRegKey $(SoftParamsKey)
  4765. CloseRegKey $(SoftProductKey)
  4766. Debug-Output "DoRouter: Registry Error "$(RegistryErrorIndex)
  4767. goto fatalregistry
  4768. endif
  4769. CloseRegKey $(KeyIpRip)
  4770. else
  4771. Debug-Output "KeyIpRip is not valid"
  4772. endif
  4773. ifstr(i) $(KeyBootp) != $(KeyNull)
  4774. set NewValueList = +
  4775. {{Title, $(NoTitle), $(!REG_VT_SZ), "DHCP Relay Agent"},+
  4776. {ProtocolId, $(NoTitle), $(!REG_VT_DWORD), 9999},+
  4777. {DllName, $(NoTitle), $(!REG_VT_SZ), "IPBOOTP.DLL"},+
  4778. {ConfigDll, $(NoTitle), $(!REG_VT_SZ), "ipadmin.dll"}}
  4779. Shell $(!UtilityInf), AddValueList, $(KeyBootp), $(NewValueList)
  4780. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4781. Debug-Output "DoRouter:UIconfigDlls: AddValueList bombed out"
  4782. goto ShellCodeError
  4783. endif
  4784. set RegistryErrorIndex = $($R0)
  4785. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  4786. CloseRegKey $(SoftServiceKey)
  4787. CloseRegKey $(SoftLinkageKey)
  4788. CloseRegKey $(SoftParamsKey)
  4789. CloseRegKey $(SoftProductKey)
  4790. Debug-Output "DoRouter: Registry Error "$(RegistryErrorIndex)
  4791. goto fatalregistry
  4792. endif
  4793. CloseRegKey $(KeyBootp)
  4794. else
  4795. Debug-Output "KeyBootp is not valid"
  4796. endif
  4797. ifstr(i) $(KeyOSPF) != $(KeyNull)
  4798. set NewValueList = +
  4799. {{Title, $(NoTitle), $(!REG_VT_SZ), "Open Shortest Path First (OSPF) by Bay Networks"},+
  4800. {ProtocolId, $(NoTitle), $(!REG_VT_DWORD), 13},+
  4801. {DllName, $(NoTitle), $(!REG_VT_SZ), "OSPF.DLL"},+
  4802. {ConfigDll, $(NoTitle), $(!REG_VT_SZ), "ipadmin.dll"}}
  4803. Shell $(!UtilityInf), AddValueList, $(KeyOSPF), $(NewValueList)
  4804. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4805. Debug-Output "DoRouter:UIconfigDlls: AddValueList bombed out"
  4806. goto ShellCodeError
  4807. endif
  4808. set RegistryErrorIndex = $($R0)
  4809. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  4810. CloseRegKey $(SoftServiceKey)
  4811. CloseRegKey $(SoftLinkageKey)
  4812. CloseRegKey $(SoftParamsKey)
  4813. CloseRegKey $(SoftProductKey)
  4814. Debug-Output "DoRouter: Registry Error "$(RegistryErrorIndex)
  4815. goto fatalregistry
  4816. endif
  4817. CloseRegKey $(KeyOSPF)
  4818. else
  4819. Debug-Output "KeyOSPF is not valid"
  4820. endif
  4821. ifstr(i) $(KeyIP) != $(KeyNull)
  4822. CloseRegKey $(KeyIP)
  4823. endif
  4824. set KeyIpxRip = $(KeyNull)
  4825. set KeyIpxSap = $(KeyNull)
  4826. ifstr(i) $(KeyIPX) != $(KeyNull)
  4827. set NewValueList = +
  4828. {{Title, $(NoTitle), $(!REG_VT_SZ), "IPX Routing Manager"},+
  4829. {ProtocolId, $(NoTitle), $(!REG_VT_DWORD), $(PROTO_IPX)},+
  4830. {DllPath, $(NoTitle), $(!REG_VT_EXPAND_SZ), "%SystemRoot%\system32\ipxrtmgr.dll"},+
  4831. {ConfigCLSID, $(NoTitle), $(!REG_VT_SZ), "58bdf952-f471-11cf-aa67-00805f0c9232"},+
  4832. {ConfigDll, $(NoTitle), $(!REG_VT_SZ), "ipxadmin.dll"}}
  4833. Shell $(!UtilityInf), AddValueList, $(KeyIPX), $(NewValueList)
  4834. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4835. Debug-Output "DoRouter:UIconfigDlls: AddValueList bombed out"
  4836. goto ShellCodeError
  4837. endif
  4838. set RegistryErrorIndex = $($R0)
  4839. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  4840. CloseRegKey $(SoftServiceKey)
  4841. CloseRegKey $(SoftLinkageKey)
  4842. CloseRegKey $(SoftParamsKey)
  4843. CloseRegKey $(SoftProductKey)
  4844. Debug-Output "DoRouter: Registry Error "$(RegistryErrorIndex)
  4845. goto fatalregistry
  4846. endif
  4847. CreateRegKey $(KeyIPX) {"IpxRip",$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyIpxRip
  4848. CreateRegKey $(KeyIPX) {"IpxSap",$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyIpxSap
  4849. endif
  4850. ifstr(i) $(KeyIpxRip) != $(KeyNull)
  4851. set NewValueList = +
  4852. {{Title, $(NoTitle), $(!REG_VT_SZ), "RIP for IPX"},+
  4853. {ProtocolId, $(NoTitle), $(!REG_VT_DWORD), 131072},+
  4854. {DllName, $(NoTitle), $(!REG_VT_SZ), "IPXRIP.DLL"},+
  4855. {ConfigDll, $(NoTitle), $(!REG_VT_SZ), "ipxadmin.dll"}}
  4856. Shell $(!UtilityInf), AddValueList, $(KeyIpxRip), $(NewValueList)
  4857. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4858. Debug-Output "DoRouter:UIconfigDlls: AddValueList bombed out"
  4859. goto ShellCodeError
  4860. endif
  4861. set RegistryErrorIndex = $($R0)
  4862. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  4863. CloseRegKey $(SoftServiceKey)
  4864. CloseRegKey $(SoftLinkageKey)
  4865. CloseRegKey $(SoftParamsKey)
  4866. CloseRegKey $(SoftProductKey)
  4867. Debug-Output "DoRouter: Registry Error "$(RegistryErrorIndex)
  4868. goto fatalregistry
  4869. endif
  4870. CloseRegKey $(KeyIpxRip)
  4871. endif
  4872. ifstr(i) $(KeyIpxSap) != $(KeyNull)
  4873. set NewValueList = +
  4874. {{Title, $(NoTitle), $(!REG_VT_SZ), "SAP for IPX"},+
  4875. {ProtocolId, $(NoTitle), $(!REG_VT_DWORD), 131073},+
  4876. {DllName, $(NoTitle), $(!REG_VT_SZ), "IPXSAP.DLL"},+
  4877. {ConfigDll, $(NoTitle), $(!REG_VT_SZ), "ipxadmin.dll"}}
  4878. Shell $(!UtilityInf), AddValueList, $(KeyIpxSap), $(NewValueList)
  4879. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4880. Debug-Output "DoRouter:UIconfigDlls: AddValueList bombed out"
  4881. goto ShellCodeError
  4882. endif
  4883. set RegistryErrorIndex = $($R0)
  4884. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  4885. CloseRegKey $(SoftServiceKey)
  4886. CloseRegKey $(SoftLinkageKey)
  4887. CloseRegKey $(SoftParamsKey)
  4888. CloseRegKey $(SoftProductKey)
  4889. Debug-Output "DoRouter: Registry Error "$(RegistryErrorIndex)
  4890. goto fatalregistry
  4891. endif
  4892. CloseRegKey $(KeyIpxSap)
  4893. endif
  4894. ifstr(i) $(KeyIPX) != $(KeyNull)
  4895. CloseRegKey $(KeyIPX)
  4896. endif
  4897. CloseRegKey $(SoftProductKey)
  4898. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  4899. Debug-Output "DoRouter: Registry Error "$(RegistryErrorIndex)
  4900. CloseRegKey $(SoftServiceKey)
  4901. CloseRegKey $(SoftNetRuleKey)
  4902. CloseRegKey $(SoftLinkageKey)
  4903. CloseRegKey $(SoftParamsKey)
  4904. goto fatalregistry
  4905. endif
  4906. ; set netrules information in the registry
  4907. set NewValueList = +
  4908. {{class, $(NoTitle), $(!REG_VT_SZ), $(Class)},+
  4909. {type,$(NoTitle),$(!REG_VT_SZ),$(Type)},+
  4910. {use,$(NoTitle),$(!REG_VT_SZ),$(Use)}, +
  4911. ;Modified on 9/24/96 - changed ThisOption to ROUTING
  4912. ; {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  4913. {InfOption,$(NoTitle),$(!REG_VT_SZ), "RAS"}, +
  4914. {bindform,$(NoTitle),$(!REG_VT_SZ),+
  4915. $(BindForm)}, +
  4916. {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  4917. $(Bindable)}, +
  4918. {Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)}}
  4919. Shell $(!UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  4920. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4921. Debug-Output "DoRouter:netrules: AddValueList bombed out"
  4922. goto ShellCodeError
  4923. endif
  4924. set RegistryErrorIndex = $($R0)
  4925. CloseRegKey $(SoftNetRuleKey)
  4926. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  4927. CloseRegKey $(SoftServiceKey)
  4928. CloseRegKey $(SoftLinkageKey)
  4929. CloseRegKey $(SoftParamsKey)
  4930. Debug-Output "DoRouter: Registry Error "$(RegistryErrorIndex)
  4931. goto fatalregistry
  4932. endif
  4933. ; create default parameters
  4934. set NewValueList = +
  4935. {{LanOnlyMode, $(NoTitle), $(!REG_VT_DWORD), $(LanOnlyMode)}}
  4936. Shell $(!UtilityInf), AddValueList, $(SoftParamsKey), $(NewValueList)
  4937. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4938. Debug-Output "AddValueList bombed out"
  4939. goto ShellCodeError
  4940. endif
  4941. set RegistryErrorIndex = $($R0)
  4942. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  4943. CloseRegKey $(SoftServiceKey)
  4944. goto fatalregistry
  4945. endif
  4946. set KeyInterfaces = $(KeyNull)
  4947. set KeyDDM = $(KeyNull)
  4948. CreateRegKey $(SoftServiceKey) {"Interfaces",$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyInterfaces
  4949. ifstr(i) $(KeyInterfaces) != $(KeyNull)
  4950. CloseRegKey $(KeyInterfaces)
  4951. endif
  4952. CreateRegKey $(SoftServiceKey) {"DemandDialManager",$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyDDM
  4953. SetRegValue $(KeyDDM) {DLLPath, $(NoTitle), $(!REG_VT_EXPAND_SZ), "%SystemRoot%\system32\mprddm.dll"}
  4954. ifstr(i) $(KeyDDM) != $(KeyNull)
  4955. CloseRegKey $(KeyDDM)
  4956. endif
  4957. CloseRegKey $(SoftParamsKey)
  4958. CloseRegKey $(SoftServiceKey)
  4959. InstallRouterServiceEnd = +
  4960. return STATUS_SUCCESSFUL
  4961. [AddInfToReviewProgramsList]
  4962. ; Add OEMNSVRA.INF to SOFTWARE\Microsoft\NCPA\ReviewPrograms list
  4963. Debug-Output "AddInfToReviewPrograms: entry"
  4964. set Status = STATUS_FAILED
  4965. set KeyNull = ""
  4966. set NcpaKeyName = $(!NTN_SoftwareBase)"\Microsoft\Ncpa\CurrentVersion"
  4967. set newList = {"OEMNSVRA.INF"}
  4968. OpenRegKey $(!REG_H_LOCAL) "" $(NcpaKeyName) $(!MAXIMUM_ALLOWED) KeyNcpa
  4969. Ifstr(i) $(KeyNcpa) != $(KeyNull)
  4970. GetRegValue $(KeyNcpa) "ReviewPrograms" TmpList
  4971. ifint $(RegLastError) == 0
  4972. Debug-Output "AddInf: old List "*($(TmpList), 4)
  4973. ForListDo *($(TmpList),4)
  4974. ifstr(i) $($) != "OEMNSVRA.INF"
  4975. set newList = >($(newList), $($))
  4976. endif
  4977. EndForListDo
  4978. Debug-Output "OEMNSVRA.INF: AddInf: new List "$(newList)
  4979. SetRegValue $(KeyNcpa) {ReviewPrograms, 0, +
  4980. $(!REG_VT_MULTI_SZ),$(newList)}
  4981. CloseRegKey $(KeyNcpa)
  4982. Set Status = STATUS_SUCCESSFUL
  4983. endif
  4984. else
  4985. Debug-Output "AddInfToReviewPrograms: error opening ncpa key."
  4986. endif
  4987. Debug-Output "AddInfToReviewPrograms: exit"
  4988. return $(Status)
  4989. [RemoveInfFromReviewPrograms]
  4990. ; remove OEMNSVRA.INF from SOFTWARE\Microsoft\NCPA\ReviewPrograms list
  4991. Debug-Output "RemoveInfFromReviewPrograms: entry"
  4992. set Status = STATUS_FAILED
  4993. set KeyNull = ""
  4994. set NcpaKeyName = $(!NTN_SoftwareBase)"\Microsoft\Ncpa\CurrentVersion"
  4995. set newList = {}
  4996. OpenRegKey $(!REG_H_LOCAL) "" $(NcpaKeyName) $(!MAXIMUM_ALLOWED) KeyNcpa
  4997. Ifstr(i) $(KeyNcpa) != $(KeyNull)
  4998. GetRegValue $(KeyNcpa) "ReviewPrograms" TmpList
  4999. ifint $(RegLastError) == 0
  5000. Debug-Output "RemoveInf: old List "*($(TmpList), 4)
  5001. ForListDo *($(TmpList),4)
  5002. ifstr(i) $($) != "OEMNSVRA.INF"
  5003. set newList = >($(newList), $($))
  5004. endif
  5005. EndForListDo
  5006. Debug-Output "AddInf: new List "$(newList)
  5007. SetRegValue $(KeyNcpa) {ReviewPrograms, 0, +
  5008. $(!REG_VT_MULTI_SZ),$(newList)}
  5009. CloseRegKey $(KeyNcpa)
  5010. Set Status = STATUS_SUCCESSFUL
  5011. endif
  5012. else
  5013. Debug-Output "RemoveInfFromReviewPrograms: error opening ncpa key."
  5014. endif
  5015. Debug-Output "RemoveInfFromReviewPrograms: exit"
  5016. return $(Status)
  5017. [InstallResources]
  5018. set STF_VITAL = NO ; make sure failure to copy files is not fatal
  5019. ; don't do this this is trouble 1/31
  5020. ; set STF_OVERWRITE = "OLDER" ; don't overwrite files that are more recent
  5021. ; set STF_DATE = "1997-01-29"
  5022. Debug-Output "In Copying Files"
  5023. ifstr(i) $(AddCopy) == "YES"
  5024. ; attempt to create the system32\ras directory (just a precaution)
  5025. ; because text mode setup should already have created this directory
  5026. CreateDir $(RasDir)
  5027. AddSectionFilesToCopyList Files-Resource $(SourceDir) $(!STF_WINDOWSSYSPATH)
  5028. AddSectionKeyFileToCopyList Files-Ras-Inf "rasread" $(SourceDir) $(ProductPath)
  5029. ; Always overwrite the files in install mode, but copy new files as *.new in
  5030. ; update mode.
  5031. ifstr(i) $(!NTN_InstallMode) == "Install"
  5032. AddSectionKeyFileToCopyList Files-Ras-Inf "modem" $(SourceDir) $(ProductPath)
  5033. AddSectionKeyFileToCopyList Files-Ras-Inf "pad" $(SourceDir) $(ProductPath)
  5034. AddSectionKeyFileToCopyList Files-Ras-Inf "switch" $(SourceDir) $(ProductPath)
  5035. AddSectionKeyFileToCopyList Files-Ras-Scp "cis" $(SourceDir) $(ProductPath)
  5036. AddSectionKeyFileToCopyList Files-Ras-Scp "slip" $(SourceDir) $(ProductPath)
  5037. AddSectionKeyFileToCopyList Files-Ras-Scp "slipmenu" $(SourceDir) $(ProductPath)
  5038. AddSectionKeyFileToCopyList Files-Ras-Scp "pppmenu" $(SourceDir) $(ProductPath)
  5039. AddSectionKeyFileToCopyList Files-Ras-Scp "scriptdoc" $(SourceDir) $(ProductPath)
  5040. else-Ifstr(i) $(!NTN_InstallMode) == "Update"
  5041. forlistdo {modem.new, pad.new, switch.new, cis.new, slip.new, slipmenu.new, pppmenu.new, script.doc}
  5042. LibraryProcedure Status, $(!LIBHANDLE), DelFile +
  5043. $(!STF_WINDOWSSYSPATH)"\RAS\"$($)
  5044. set STF_RENAME = "MODEM.NEW"
  5045. AddSectionKeyFileToCopyList Files-Ras-Inf "modem" $(SourceDir) $(ProductPath)
  5046. set STF_RENAME = "PAD.NEW"
  5047. AddSectionKeyFileToCopyList Files-Ras-Inf "pad" $(SourceDir) $(ProductPath)
  5048. set STF_RENAME = "SWITCH.NEW"
  5049. AddSectionKeyFileToCopyList Files-Ras-Inf "switch" $(SourceDir) $(ProductPath)
  5050. set STF_RENAME = "CIS.SCP"
  5051. AddSectionKeyFileToCopyList Files-Ras-Scp "cis" $(SourceDir) $(ProductPath)
  5052. set STF_RENAME = "SLIP.SCP"
  5053. AddSectionKeyFileToCopyList Files-Ras-Scp "slip" $(SourceDir) $(ProductPath)
  5054. set STF_RENAME = "SLIPMENU.SCP"
  5055. AddSectionKeyFileToCopyList Files-Ras-Scp "slipmenu" $(SourceDir) $(ProductPath)
  5056. set STF_RENAME = "PPPMENU.SCP"
  5057. AddSectionKeyFileToCopyList Files-Ras-Scp "pppmenu" $(SourceDir) $(ProductPath)
  5058. set STF_RENAME = "SCRIPT.DOC"
  5059. AddSectionKeyFileToCopyList Files-Ras-Scp "scriptdoc" $(SourceDir) $(ProductPath)
  5060. set STF_RENAME = ""
  5061. endif
  5062. endif
  5063. ifstr(i) $(!NTN_InstallMode) == "Update"
  5064. set !STF_NCPA_FLUSH_COPYLIST = TRUE
  5065. CopyFilesInCopyList
  5066. else-ifstr(i) $(DoCopy) == "YES"
  5067. set !STF_NCPA_FLUSH_COPYLIST = TRUE
  5068. CopyFilesInCopyList
  5069. endif
  5070. Debug-Output "Done Copying Files"
  5071. exit
  5072. [RemoveResources]
  5073. Debug-Output "In removing infs and dll"
  5074. set RemoveList = {}
  5075. set RenameList = {}
  5076. set RemoveList = >($(RemoveList), #(Files-RemoveList, MODEMINF, 1))
  5077. set RemoveList = >($(RemoveList), #(Files-RemoveList, PADINF, 1))
  5078. set RemoveList = >($(RemoveList), #(Files-RemoveList, SWITCHINF, 1))
  5079. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSETUPHLP, 1))
  5080. set RenameList = >($(RenameList), #(Files-RemoveList, RASRESDLL, 1))
  5081. set RenameList = >($(RenameList), #(Files-RemoveList, RASCFGDLL, 1))
  5082. set RenameList = >($(RenameList), #(Files-RemoveList, RASFIL32DLL, 1))
  5083. ForListDo $(RemoveList)
  5084. Debug-Output "Removing "$($)
  5085. LibraryProcedure Status , $(!LIBHANDLE), DelFile $($)
  5086. Debug-Output "Status is "$(Status)
  5087. EndForListDo
  5088. ForListDo $(RenameList)
  5089. Split-String $($) "\" FilePath
  5090. QueryListSize PathLen $(FilePath)
  5091. Split-String *($(FilePath),$(PathLen)) "." FullFileName
  5092. Set FileName = *($(FullFileName),1)
  5093. Debug-Output "FileName is "$(FileName)
  5094. LibraryProcedure STATUS, $(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\"$(FileName)".old"
  5095. Debug-Output "CheckFile Status = "$(STATUS)
  5096. ifstr(i) $(STATUS) == YES
  5097. LibraryProcedure STATUS, $(!LIBHANDLE), DelFile $(!STF_WINDOWSSYSPATH)"\"$(FileName)".old"
  5098. Debug-Output "Delfile Status = "$(STATUS)
  5099. endif
  5100. Debug-Output "Renaming from "$($)
  5101. Debug-Output "Renaming to "$(!STF_WINDOWSSYSPATH)"\"$(FileName)".old"
  5102. LibraryProcedure Status1 , $(!LIBHANDLE), RenFile $($), $(!STF_WINDOWSSYSPATH)"\"$(FileName)".old"
  5103. ; Add the files to the delete list so that they get deleted at next boot
  5104. AddFileToDeleteList $(!STF_WINDOWSSYSPATH)"\"$(FileName)".old"
  5105. EndForListDo
  5106. exit
  5107. [InstallRasFiles]
  5108. set STF_VITAL = NO
  5109. ; don't do this this is trouble 1/31
  5110. ; set STF_OVERWRITE = "OLDER" ; don't overwrite files that are more recent
  5111. ; set STF_DATE = "1997-01-29"
  5112. Debug-Output "In InstallRasFiles Copying Files"
  5113. Debug-Output "ServerInstalled "$(ServerInstalled)
  5114. Debug-Output "ClientInstalled "$(ClientInstalled)
  5115. AddSectionFilesToCopyList Files-Ras-Admin $(SourceDir) +
  5116. $(!STF_WINDOWSSYSPATH)
  5117. AddSectionFilesToCopyList Files-Ras-Client $(SourceDir) +
  5118. $(!STF_WINDOWSSYSPATH)
  5119. AddSectionFilesToCopyList Files-Ras-Server $(SourceDir) +
  5120. $(!STF_WINDOWSSYSPATH)
  5121. AddSectionFilesToCopyList Files-Router $(SourceDir) +
  5122. $(!STF_WINDOWSSYSPATH)
  5123. AddSectionFilesToCopyList Files-Ras-Common $(SourceDir) +
  5124. $(!STF_WINDOWSSYSPATH)
  5125. AddSectionFilesToCopyList Files-Ras-Drivers $(SourceDir) +
  5126. $(!STF_WINDOWSSYSPATH)\drivers
  5127. AddSectionFilesToCopyList Files-Router-Drivers $(SourceDir) +
  5128. $(!STF_WINDOWSSYSPATH)\drivers
  5129. ; check if proxy is installed and add this section only if
  5130. ; proxy is not installed because we would like to not overwrite
  5131. ; the proxy version of the filter driver - 5/11/97 - ramc
  5132. ifstr(i) $(!PROXY_INSTALLED) == FALSE
  5133. AddSectionFilesToCopyList Files-Router-Filter-Driver $(SourceDir) +
  5134. $(!STF_WINDOWSSYSPATH)\drivers
  5135. endif
  5136. InstallRasFiles1 = +
  5137. ; force file copy during update mode
  5138. ifstr(i) $(!NTN_InstallMode) == "Update"
  5139. set !STF_NCPA_FLUSH_COPYLIST = TRUE
  5140. CopyFilesInCopyList
  5141. else
  5142. ifstr(i) $(DoCopy) == "YES"
  5143. set !STF_NCPA_FLUSH_COPYLIST = TRUE
  5144. CopyFilesInCopyList
  5145. endif
  5146. endif
  5147. Debug-Output "Done Copying Files"
  5148. exit
  5149. [RemoveRasFiles]
  5150. ; we should actually use RemoveSectionFiles, but setup hasn't implemented
  5151. ; it yet, so we remove file by file.
  5152. ; Do not remove files if this is the install mode and the CopyFlag
  5153. ; is set to NO because we didn't copy any files in the first place!!
  5154. ifstr(i) $(!NTN_InstallMode) == install
  5155. ifstr(i) $(DoCopy) == "NO"
  5156. Exit
  5157. endif
  5158. endif
  5159. set RemoveList = {}
  5160. set RenameList = {}
  5161. set fCommonRemoved = FALSE
  5162. ifstr(i) $(DoServer) == TRUE
  5163. set fCommonRemoved = TRUE
  5164. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASGTWYDLL, 1))
  5165. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASGPRXYDLL, 1))
  5166. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSPRXYEXE, 1))
  5167. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSRVEXE, 1))
  5168. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCTRSDLL, 1))
  5169. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCTRSINI, 1))
  5170. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCTRNMH, 1))
  5171. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSAUTHDLL, 1))
  5172. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASADMINDLL, 1))
  5173. ; below are the files common to server and client
  5174. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMANDLL, 1))
  5175. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMANEXE, 1))
  5176. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSERDLL, 1))
  5177. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASIPXCPDLL, 1))
  5178. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPPPDLL, 1))
  5179. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPPPENDLL, 1))
  5180. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPAPDLL, 1))
  5181. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCHAPDLL, 1))
  5182. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSPAPDLL, 1))
  5183. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASIPCPDLL, 1))
  5184. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASIPHLPDLL, 1))
  5185. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASNBFCPDLL, 1))
  5186. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCCPDLL, 1))
  5187. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCBCPDLL, 1))
  5188. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASNBIPCDLL, 1))
  5189. ; set RenameList = >($(RenameList), #(Files-RemoveList, ASYNCMACSYS, 1))
  5190. ; set RenameList = >($(RenameList), #(Files-RemoveList, NDISWANSYS, 1))
  5191. ; set RenameList = >($(RenameList), #(Files-RemoveList, RASARPSYS, 1))
  5192. endif
  5193. ifstr(i) $(DoClient) == TRUE
  5194. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASDIALEXE, 1))
  5195. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPHONEHLP, 1))
  5196. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCAUTHDLL, 1))
  5197. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASAPI32DLL, 1))
  5198. ifstr(i) $(fCommonRemoved) == FALSE
  5199. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMANDLL, 1))
  5200. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMANEXE, 1))
  5201. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSERDLL, 1))
  5202. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASIPXCPDLL, 1))
  5203. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPPPDLL, 1))
  5204. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPPPENDLL, 1))
  5205. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPAPDLL, 1))
  5206. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCHAPDLL, 1))
  5207. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSPAPDLL, 1))
  5208. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASIPCPDLL, 1))
  5209. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASIPHLPDLL, 1))
  5210. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASNBFCPDLL, 1))
  5211. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCCPDLL, 1))
  5212. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCBCPDLL, 1))
  5213. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASNBIPCDLL, 1))
  5214. ; set RenameList = >($(RenameList), #(Files-RemoveList, ASYNCMACSYS, 1))
  5215. ; set RenameList = >($(RenameList), #(Files-RemoveList, NDISWANSYS, 1))
  5216. ; set RenameList = >($(RenameList), #(Files-RemoveList, RASARPSYS, 1))
  5217. endif
  5218. endif
  5219. ifstr(i) $(DoAdmin) == TRUE
  5220. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASADMINHLP, 1))
  5221. set RemoveList = >($(RemoveList), #(Files-RemoveList, RASGLOSSHLP, 1))
  5222. endif
  5223. ForListDo $(RemoveList)
  5224. Debug-Output "Removing "$($)
  5225. LibraryProcedure Status , $(!LIBHANDLE), DelFile $($)
  5226. Debug-Output "Status is "$(Status)
  5227. EndForListDo
  5228. ; delete the router.pbk file from system32\ras directory
  5229. LibraryProcedure Status , $(!LIBHANDLE), DelFile $(!STF_WINDOWSSYSPATH)"\RAS\router.pbk"
  5230. ForListDo $(RenameList)
  5231. Split-String $($) "\" FilePath
  5232. QueryListSize PathLen $(FilePath)
  5233. Split-String *($(FilePath),$(PathLen)) "." FullFileName
  5234. Set FileName = *($(FullFileName),1)
  5235. Debug-Output "FileName is "$(FileName)
  5236. LibraryProcedure STATUS, $(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  5237. Debug-Output "CheckFile Status = "$(STATUS)
  5238. ifstr(i) $(STATUS) == YES
  5239. LibraryProcedure STATUS, $(!LIBHANDLE), DelFile $(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  5240. Debug-Output "Delfile Status = "$(STATUS)
  5241. endif
  5242. Debug-Output "Renaming from "$($)
  5243. Debug-Output "Renaming to "$(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  5244. LibraryProcedure Status1 , $(!LIBHANDLE), RenFile $($), $(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  5245. ; Add the files to the delete list so that they get deleted at next boot
  5246. AddFileToDeleteList $(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  5247. EndForListDo
  5248. exit
  5249. [RestoreSavedFiles]
  5250. ; Now it is time to restore the files saved away in the
  5251. ; system32\~~RB$$~~ directory to their respective locations
  5252. set BackupDir = $(!STF_WINDOWSSYSPATH)"\~~RB$$~~"
  5253. set DriversDir = $(!STF_WINDOWSSYSPATH)"\drivers"
  5254. set Sys32Dir = $(!STF_WINDOWSSYSPATH)
  5255. set Files_System32 = { "SNMP.EXE", "SNMPAPI.DLL", "INETMIB1.DLL", +
  5256. "OEMNSVRA.INF", "OEMNXPPP.INF" }
  5257. set Files_Drivers = { "NWLNKIPX.SYS", "NWLNKNB.SYS", "NWLNKSPX.SYS", +
  5258. "NWLNKRIP.SYS", "NDIS.SYS", "TCPIP.SYS", +
  5259. "RASARP.SYS", "RASPPTPF.SYS" }
  5260. forlistdo $(Files_System32)
  5261. set STATUS = NO
  5262. ; First check to see if the file exists in backup directory
  5263. LibraryProcedure STATUS, $(!LIBHANDLE), CheckFileExistance $(BackupDir)"\"$($)
  5264. ifstr(i) $(STATUS) == YES
  5265. ; First check to see if the file exists in system32 directory
  5266. LibraryProcedure STATUS, $(!LIBHANDLE),CheckFileExistance $(Sys32Dir)"\"$($)
  5267. ifstr(i) $(STATUS) == YES
  5268. ; first delete the old backup file
  5269. LibraryProcedure Status , $(!LIBHANDLE), DelFile $(Sys32Dir)"\"$($)".OLD"
  5270. ; if it does, rename to .OLD extension
  5271. Debug-Output "File "$($)"is being renamed to "$($)".OLD"
  5272. LibraryProcedure STATUS, $(!LIBHANDLE), RenFile $(Sys32Dir)"\"$($) +
  5273. $(Sys32Dir)"\"$($)".OLD"
  5274. ; Add the file to the delete list so that it gets deleted at next boot
  5275. AddFileToDeleteList $(Sys32Dir)"\"$($)".OLD"
  5276. endif
  5277. ; Now copy the file from the backup directory to system32 directory
  5278. LibraryProcedure STATUS, $(!NCPA_HANDLE), CopySingleFile $(!STF_HWND) +
  5279. $(BackupDir)"\"$($) $(Sys32Dir)"\"$($)
  5280. ; now delete the backup file
  5281. LibraryProcedure Status , $(!LIBHANDLE), DelFile $(BackupDir)"\"$($)
  5282. Debug-Output "File "$(BackupDir)"\"$($)" delete Status = "$(STATUS)
  5283. endif
  5284. endforlistdo
  5285. forlistdo $(Files_Drivers)
  5286. set STATUS = NO
  5287. ; First check to see if the file exists in backup directory
  5288. LibraryProcedure STATUS, $(!LIBHANDLE), CheckFileExistance $(BackupDir)"\"$($)
  5289. ifstr(i) $(STATUS) == YES
  5290. ; First check to see if the file exists in system32\drivers directory
  5291. LibraryProcedure STATUS, $(!LIBHANDLE),CheckFileExistance $(DriversDir)"\"$($)
  5292. ifstr(i) $(STATUS) == YES
  5293. ; first delete the old backup file
  5294. LibraryProcedure Status , $(!LIBHANDLE), DelFile $(DriversDir)"\"$($)".OLD"
  5295. ; if it does, rename to .OLD extension
  5296. Debug-Output "File "$($)"is being renamed to "$($)".OLD"
  5297. LibraryProcedure STATUS, $(!LIBHANDLE), RenFile $(DriversDir)"\"$($) +
  5298. $(DriversDir)"\"$($)".OLD"
  5299. ; Add the file to the delete list so that it gets deleted at next boot
  5300. AddFileToDeleteList $(DriversDir)"\"$($)".OLD"
  5301. endif
  5302. ; Now copy the file from the backup directory to system32\drivers directory
  5303. LibraryProcedure STATUS, $(!NCPA_HANDLE), CopySingleFile $(!STF_HWND) +
  5304. $(BackupDir)"\"$($) $(DriversDir)"\"$($)
  5305. ; now delete the backup file
  5306. LibraryProcedure Status , $(!LIBHANDLE), DelFile $(BackupDir)"\"$($)
  5307. Debug-Output "File "$(BackupDir)"\"$($)" delete Status = "$(STATUS)
  5308. else
  5309. ; check to see if the file was saved away in the drivers directory
  5310. LibraryProcedure STATUS, $(!LIBHANDLE), CheckFileExistance $(DriversDir)"\"$($)".SAV"
  5311. ifstr(i) $(STATUS) == YES
  5312. ; First check to see if the file exists in system32\drivers directory
  5313. LibraryProcedure STATUS, $(!LIBHANDLE),CheckFileExistance $(DriversDir)"\"$($)
  5314. ifstr(i) $(STATUS) == YES
  5315. ; first delete the old backup file
  5316. LibraryProcedure Status , $(!LIBHANDLE), DelFile $(DriversDir)"\"$($)".OLD"
  5317. ; if it does, rename to .OLD extension
  5318. Debug-Output "File "$($)"is being renamed to "$($)".OLD"
  5319. LibraryProcedure STATUS, $(!LIBHANDLE), RenFile $(DriversDir)"\"$($) +
  5320. $(DriversDir)"\"$($)".OLD"
  5321. ; Add the file to the delete list so that it gets deleted at next boot
  5322. AddFileToDeleteList $(DriversDir)"\"$($)".OLD"
  5323. endif
  5324. ; Now copy the file from the backup directory to system32\drivers directory
  5325. LibraryProcedure STATUS, $(!LIBHANDLE), RenFile +
  5326. $(DriversDir)"\"$($)".SAV" $(DriversDir)"\"$($)
  5327. endif
  5328. endif
  5329. endforlistdo
  5330. exit
  5331. [CreateRtrAdminIcon]
  5332. ; Create an icon for RTRADMIN in the Administrative Tools (Common) program group
  5333. ; This will be removed when Routing service is removed.
  5334. ; also remove the RasAdmin icon previously created - this is a legacy tool now
  5335. RemoveCommonProgManItem $(AdminGroup) $(RasAdmin)
  5336. CreateCommonProgManItem $(AdminGroup), $(RtrAdmin) "%SystemRoot%\system32\mpradmin.exe" "" 0
  5337. exit
  5338. ;[CreateRasGroup]
  5339. ; 3/22/96 Remote Access Program Group is not created any more
  5340. ; instead the Remote Access Admin icon will appear in Administrative Tools folder
  5341. ; and Dial-Up Networking icon (previously Remote Access) will appear in Accessories
  5342. ; and My Computer folder. The help icons will be absorbed in the main NT help.
  5343. ; the old Remote Access Monitor icon appears in the Control Panel as Dial-Up Monitor.
  5344. ;
  5345. ; ; Create and show the RemoteAccess group
  5346. ;
  5347. ; CreateCommonProgManGroup $(RasGroup) ""
  5348. ;
  5349. ; ShowCommonProgManGroup $(RasGroup), 1
  5350. ;
  5351. ; CreateCommonProgManItem $(RasGroup), $(RasPhone) +
  5352. ; "rasphone.exe" "" 0
  5353. ; CreateCommonProgManItem $(RasGroup), $(RasMon) +
  5354. ; "rasmon.exe" "" 0
  5355. ; CreateCommonProgManItem $(RasGroup), $(RasAdmin) +
  5356. ; "rasadmin.exe" "" 0
  5357. ;
  5358. ;
  5359. ; ; note that we index into the progman.exe icons for our readme
  5360. ; ; icon.
  5361. ;
  5362. ; CreateCommonProgManItem $(RasGroup), $(ReadMe) +
  5363. ; "NOTEPAD.EXE "+
  5364. ; "%SystemRoot%\system32\RAS\RASREAD.TXT" +
  5365. ; "PROGMAN.EXE" 29
  5366. ;
  5367. ; CreateCommonProgManItem $(RasGroup), $(RasHelp) +
  5368. ; "WINHLP32.EXE "+
  5369. ; "RASPHONE.HLP" +
  5370. ; "WINHLP32.EXE" 0
  5371. ;
  5372. ; CreateCommonProgManItem $(RasGroup), $(RasInternet) +
  5373. ; "WINHLP32.EXE -k internet RASPHONE.HLP "+
  5374. ; "" +
  5375. ; "%SystemRoot%\system32\RAS\RAS.ICO" 0
  5376. ;
  5377. ; ; minimize the RemoteAccess group
  5378. ;
  5379. ; ShowCommonProgManGroup $(RasGroup), 6
  5380. ;
  5381. ; exit
  5382. [RemoveRasGroup]
  5383. Debug-Output "Removing icons from "$(RasGroup)
  5384. ; The reason we create the group before we attempt to remove it is
  5385. ; to make sure that we don't get an error on removal if the group
  5386. ; has been deleted by the user.
  5387. RemoveCommonProgManItem $(AdminGroup) $(RtrAdmin)
  5388. CreateCommonProgManGroup $(RasGroup) ""
  5389. RemoveCommonProgManGroup $(RasGroup)
  5390. exit
  5391. [AddNDISWANToServiceGroupOrder]
  5392. ; Add NDISWAN to the ServiceGroupOrder list between NDIS and TDI so
  5393. ; that the NdisWan driver loads after the NDIS group components like
  5394. ; AsyMac driver or the TAPI providers have loaded.
  5395. set GroupOrderName = "SYSTEM\CurrentControlSet\Control\ServiceGroupOrder"
  5396. OpenRegKey $(!REG_H_LOCAL) "" $(GroupOrderName) $(!MAXIMUM_ALLOWED) KeyGroup
  5397. set OldList = {}
  5398. Ifstr(i) $(KeyGroup) != $(KeyNull)
  5399. GetRegValue $(KeyGroup) "List" TmpList
  5400. ifint $(RegLastError) == 0
  5401. ForListDo *($(TmpList), 4)
  5402. set OldList = >($(OldList), $($))
  5403. EndForListDo
  5404. endif
  5405. Debug-Output "AddNDISWANToServiceGroupOrder current list "$(OldList)
  5406. Ifcontains(i) "NDISWAN" not-in $(OldList)
  5407. set NewGroupList = {}
  5408. ForListDo $(OldList)
  5409. set NewGroupList = >($(NewGroupList), $($))
  5410. ifstr(i) $($) == "NDIS"
  5411. ; add NDISWAN just after NDIS in the group order
  5412. set NewGroupList = >($(NewGroupList), "NDISWAN" )
  5413. endif
  5414. EndForListDo
  5415. Debug-Output "AddNDISWANToServiceGroupOrder new list "$(NewGroupList)
  5416. SetRegValue $(KeyGroup) {List, 0,$(!REG_VT_MULTI_SZ),$(NewGroupList)}
  5417. endif
  5418. CloseRegKey $(KeyGroup)
  5419. else
  5420. Debug-Output "AddNDISWANToServiceGroupOrder error opening ServiceGroupOrder key."
  5421. endif
  5422. return
  5423. [CheckRasInstalled]
  5424. ; this routine is for external INF files to determine if RAS is installed
  5425. ; we check to see if SYSTEM\CurrentControlSet\Services\RasMan key exists.
  5426. ; if it does the return value is TRUE to indicate that RAS is installed
  5427. ; else the return value is FALSE to indicate that RAS is not installed.
  5428. set MAXIMUM_ALLOWED = 33554432
  5429. set ProductKeyName = $(!NTN_ServiceBase)"\RasMan"
  5430. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  5431. Ifstr $(KeyProduct) != ""
  5432. CloseRegKey $(KeyProduct)
  5433. return "TRUE"
  5434. else
  5435. return "FALSE"
  5436. endif
  5437. [CheckProxyInstalled]
  5438. set MAXIMUM_ALLOWED = 33554432
  5439. set ProductKeyName = $(!NTN_ServiceBase)"\mspadmin"
  5440. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  5441. Ifstr $(KeyProduct) != ""
  5442. CloseRegKey $(KeyProduct)
  5443. set !PROXY_INSTALLED = TRUE
  5444. return "TRUE"
  5445. else
  5446. set !PROXY_INSTALLED = FALSE
  5447. return "FALSE"
  5448. endif
  5449. [QueryComponentsInstalled]
  5450. Set Status = STATUS_FAILED
  5451. Set ValueName = ""
  5452. Set InstalledList = {}
  5453. Set InstalledFlags = {}
  5454. Set TmpList = {}
  5455. Set KeyNull = ""
  5456. Set NumberOfComps = 0
  5457. Set RasKeyName = $($0)
  5458. Debug-Output "QueryComponentsInstalled: "$(RasKeyName)
  5459. OpenRegKey $(!REG_H_LOCAL) "" $(RasKeyName) $(!MAXIMUM_ALLOWED) KeyProduct
  5460. Ifstr(i) $(KeyProduct) != $(KeyNull)
  5461. GetRegValue $(KeyProduct) "RasComponents" TmpList
  5462. Debug-Output "QueryComponentsInstalled: "$(TmpList)
  5463. ForListDo *($(TmpList),4)
  5464. set InstalledList = >($(InstalledList), $($))
  5465. EndForListDo
  5466. CloseRegKey $(KeyProduct)
  5467. Ifcontains(i) "Server" in $(InstalledList)
  5468. Set InstalledFlags = >($(InstalledFlags), TRUE)
  5469. else
  5470. Set InstalledFlags = >($(InstalledFlags), FALSE)
  5471. endif
  5472. Ifcontains(i) "Client" in $(InstalledList)
  5473. Set InstalledFlags = >($(InstalledFlags), TRUE)
  5474. else
  5475. Set InstalledFlags = >($(InstalledFlags), FALSE)
  5476. endif
  5477. Ifcontains(i) "Admin" in $(InstalledList)
  5478. Set InstalledFlags = >($(InstalledFlags), TRUE)
  5479. else
  5480. Set InstalledFlags = >($(InstalledFlags), FALSE)
  5481. endif
  5482. QueryListSize NumberOfComps $(InstalledList)
  5483. ifint $(NumberOfComps) == 1
  5484. Ifcontains(i) "Server" in $(InstalledList)
  5485. Set InstalledFlags = >($(InstalledFlags), TRUE)
  5486. else
  5487. Set InstalledFlags = >($(InstalledFlags), FALSE)
  5488. endif
  5489. Ifcontains(i) "Client" in $(InstalledList)
  5490. Set InstalledFlags = >($(InstalledFlags), TRUE)
  5491. else
  5492. Set InstalledFlags = >($(InstalledFlags), FALSE)
  5493. endif
  5494. Ifcontains(i) "Admin" in $(InstalledList)
  5495. Set InstalledFlags = >($(InstalledFlags), TRUE)
  5496. else
  5497. Set InstalledFlags = >($(InstalledFlags), FALSE)
  5498. endif
  5499. else
  5500. Set InstalledFlags = >($(InstalledFlags), FALSE)
  5501. Set InstalledFlags = >($(InstalledFlags), FALSE)
  5502. Set InstalledFlags = >($(InstalledFlags), FALSE)
  5503. endif
  5504. Set Status = STATUS_SUCCESSFUL
  5505. Else
  5506. Set Status = STATUS_NOT_FOUND
  5507. EndIf
  5508. Debug-Output "QueryComponentsInstalled: "$(InstalledList)
  5509. Return $(Status) $(InstalledList) $(InstalledFlags)
  5510. [UpdateComponentsInstalled]
  5511. Set Status = STATUS_FAILED
  5512. Set InstalledList = $($0)
  5513. Set RasKeyName = $($1)
  5514. Set KeyNull = ""
  5515. Debug-Output "UpdateComponentsInstalled: "$(RasKeyName)
  5516. OpenRegKey $(!REG_H_LOCAL) "" $(RasKeyName) $(!MAXIMUM_ALLOWED) KeyProduct
  5517. Ifstr(i) $(KeyProduct) != $(KeyNull)
  5518. SetRegValue $(KeyProduct) {RasComponents, 0,$(!REG_VT_MULTI_SZ),$(InstalledList)}
  5519. CloseRegKey $(KeyProduct)
  5520. Set Status = STATUS_SUCCESSFUL
  5521. else
  5522. Set Status = STATUS_FAILED
  5523. endif
  5524. return $(Status)
  5525. [GetNetworkAccess]
  5526. ; Returns the remote clients' network access on each of NBF, TCP/IP and IPX
  5527. set Status = STATUS_SUCCESSFUL
  5528. Set KeyNull = ""
  5529. set NbfNetAccess = 0
  5530. set TcpIpNetAccess = 0
  5531. set IpxNetAccess = 0
  5532. set RasProtocolsKeyName = $(!NTN_SoftwareBase)"\Microsoft\RAS\PROTOCOLS"
  5533. Debug-Output "GetNetworkAccess entry"
  5534. set ProtocolKeyName = $(RasProtocolsKeyName)"\NBF"
  5535. OpenRegKey $(!REG_H_LOCAL) "" $(ProtocolKeyName) $(!MAXIMUM_ALLOWED) KeyProtocol
  5536. Ifstr(i) $(KeyProtocol) != $(KeyNull)
  5537. GetRegValue $(KeyProtocol), "NetBiosGatewayEnabled" NetworkAccess
  5538. ifint $(RegLastError) == 0
  5539. set NbfNetAccess = *($(NetworkAccess), 4)
  5540. endif
  5541. CloseRegKey $(KeyProtocol)
  5542. else
  5543. Debug-Output "GetNetworkAccess:error opening key "$(ProtocolKeyName)
  5544. endif
  5545. set ProtocolKeyName = $(RasProtocolsKeyName)"\IP"
  5546. OpenRegKey $(!REG_H_LOCAL) "" $(ProtocolKeyName) $(!MAXIMUM_ALLOWED) KeyProtocol
  5547. Ifstr(i) $(KeyProtocol) != $(KeyNull)
  5548. GetRegValue $(KeyProtocol), "AllowNetworkAccess" NetworkAccess
  5549. ifint $(RegLastError) == 0
  5550. set TcpIpNetAccess = *($(NetworkAccess), 4)
  5551. endif
  5552. CloseRegKey $(KeyProtocol)
  5553. else
  5554. Debug-Output "GetNetworkAccess:error opening key "$(ProtocolKeyName)
  5555. endif
  5556. set ProtocolKeyName = $(RasProtocolsKeyName)"\IPX"
  5557. OpenRegKey $(!REG_H_LOCAL) "" $(ProtocolKeyName) $(!MAXIMUM_ALLOWED) KeyProtocol
  5558. Ifstr(i) $(KeyProtocol) != $(KeyNull)
  5559. GetRegValue $(KeyProtocol), "AllowNetworkAccess" NetworkAccess
  5560. ifint $(RegLastError) == 0
  5561. set IpxNetAccess = *($(NetworkAccess), 4)
  5562. endif
  5563. CloseRegKey $(KeyProtocol)
  5564. else
  5565. Debug-Output "GetNetworkAccess:error opening key "$(ProtocolKeyName)
  5566. endif
  5567. Debug-Output "GetNetworkAccess exit"
  5568. return $(Status) $(NbfNetAccess) $(TcpIpNetAccess) $(IpxNetAccess)
  5569. [IsNdisWanBHAdapterInstalled]
  5570. ; Checks to see if NdisWan adapter for Blood Hound is already installed
  5571. set Status = STATUS_FAILED
  5572. Set KeyNull = ""
  5573. Debug-Output "IsNdisWanBHAdapterInstalled entry"
  5574. set NetworkCardKey = $(KeyNull)
  5575. OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) NetworkCardKey
  5576. Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  5577. set NetcardsList = {}
  5578. EnumRegKey $(NetworkCardKey) NetcardsList
  5579. Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  5580. Debug-Output "IsNdisWanBHAdapterInstalled: EnumRegKey failed."
  5581. goto IsNdisWanBHAdapterInstalledEnd
  5582. endif
  5583. ; go down the list of installed netcards and determine if
  5584. ; NdisWan Blood hound adapter is installed
  5585. ForListDo $(NetcardsList)
  5586. set KeyName = *($($),1)
  5587. set Card = $(KeyNull)
  5588. OpenRegKey $(NetworkCardKey) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  5589. ifstr $(Card) == $(KeyNull)
  5590. Debug-Output "IsNdisWanBHAdapterInstalled: could not open netcard key "$(KeyName)
  5591. else
  5592. GetRegValue $(Card), "ProductName" ProductNameInfo
  5593. Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  5594. Debug-Output "IsNdisWanBHAdapterInstalled: ProductName not found."
  5595. else
  5596. set CardProductName = *($(ProductNameInfo), 4)
  5597. Debug-Output "IsNdisWanBHAdapterInstalled: ProductName. "$(CardProductName)
  5598. ifstr(i) $(CardProductName) == $(!ProductNDISWANName)
  5599. set Status = STATUS_SUCCESSFUL
  5600. CloseRegKey $(Card)
  5601. goto IsNdisWanBHAdapterInstalledEnd
  5602. endif
  5603. endif
  5604. CloseRegKey $(Card)
  5605. endif
  5606. EndForListDo
  5607. else
  5608. Debug-Output "IsNdisWanBHAdapterInstalled: failed to open "$(!NetworkCardKeyName)
  5609. endif
  5610. IsNdisWanBHAdapterInstalledEnd =+
  5611. ifstr(i) $(NetworkCardKey) != $(KeyNull)
  5612. CloseRegKey $(NetworkCardKey)
  5613. endif
  5614. Debug-Output "IsNdisWanBHAdapterInstalled exit"
  5615. Return $(Status)
  5616. [InstallNdisWanBHAdapter]
  5617. ; creates the NdisWan adapter so that Blood Hound can bind to it for sniffing
  5618. set Status = STATUS_FAILED
  5619. set ThisOption = NDISWAN
  5620. Debug-Output "InstallNdisWanBHAdapter entry"
  5621. Shell "utility.inf", AddHardwareComponent, +
  5622. $(!Product$(ThisOption)Name),$(!RasInfName),+
  5623. $(!Product$(ThisOption)KeyName)
  5624. ifint $($R4) != -1
  5625. Set !NETCARD_LIST = >($(!NETCARD_LIST), +
  5626. {$(!Product$(ThisOption)Name),+
  5627. $(!NetworkCardKeyName)"\"$($R4)})
  5628. endif
  5629. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  5630. Debug-Output "InstallNdisWanBHAdapter:Shell error"
  5631. goto InstallNdisWanBHAdapterEnd
  5632. endif
  5633. set RegistryErrorIndex = $($R0)
  5634. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  5635. Debug-Output "InstallNdisWanBHAdapter:Registry error: add hardware component"
  5636. CloseRegKey $($R1)
  5637. CloseRegKey $($R2)
  5638. CloseRegKey $($R3)
  5639. goto InstallNdisWanBHAdapterEnd
  5640. endif
  5641. ; At this point:
  5642. ; $R1 Registry key variable for HARDWARE\Netcard\(n)
  5643. ; $R2 Registry key variable for HARDWARE\Netcard\(n)\\NetRules
  5644. ; $R3 Registry key handle for <service>\Parameters key
  5645. ; $R4 Adapter number assigned to adapter
  5646. ; $R5 Service name generated by combining svc name with adapter
  5647. ; number
  5648. set KeyNetcard = $($R1)
  5649. set KeyParameters = $($R3)
  5650. set KeyAdapterRules = $($R2)
  5651. set AdapterNumber = $($R4)
  5652. set NewValueList = +
  5653. {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(!Manufacturer)},+
  5654. {Title,$(NoTitle),$(!REG_VT_SZ),+
  5655. "["$($R4)"] "$(!Product$(ThisOption)Title)},+
  5656. {Description,$(NoTitle),$(!REG_VT_SZ),+
  5657. $(!Product$(ThisOption)Description)},+
  5658. {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  5659. $(!Product$(ThisOption)Name)},+
  5660. {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  5661. {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  5662. {Hidden,$(NoTitle),$(!REG_VT_DWORD),1}}
  5663. Shell "utility.inf", AddValueList, $(KeyNetcard), $(NewValueList)
  5664. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  5665. Debug-Output "InstallNdisWanBHAdapter: ShellCode error"
  5666. goto InstallNdisWanBHAdapterEnd
  5667. endif
  5668. CloseRegKey $(KeyNetcard)
  5669. set TempProdName = """"$(!Product$(ThisOption)Name)$(AdapterNumber)""""
  5670. set TempBindForm = $(TempProdName)$(!NetRuleHardwareBHBindForm)
  5671. set NewValueList = +
  5672. {{type,$(NoTitle),$(!REG_VT_SZ),+
  5673. $(!NetRuleHardwareBHType)},+
  5674. {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  5675. {class,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  5676. $(!NetRuleHardwareBHClass)}, +
  5677. ;Modified on 9/24/96 by Ramc - changed ThisOption to ROUTING
  5678. ; {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  5679. {InfOption,$(NoTitle),$(!REG_VT_SZ), "RAS"}, +
  5680. {Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)}}
  5681. Shell "utility.inf", AddValueList, $(KeyAdapterRules), $(NewValueList)
  5682. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  5683. Debug-Output "InstallNdisWanBHAdapter: ShellCode error"
  5684. goto InstallNdisWanBHAdapterEnd
  5685. endif
  5686. set RegistryErrorIndex = $($R0)
  5687. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  5688. Debug-Output "InstallNdisWanBHAdapter:Registry error: add hardware component"
  5689. CloseRegKey $(KeyParameters)
  5690. CloseRegKey $(KeyAdapterRules)
  5691. goto InstallNdisWanBHAdapterEnd
  5692. endif
  5693. CloseRegKey $(KeyAdapterRules)
  5694. CloseRegKey $(KeyParameters)
  5695. set Status = STATUS_SUCCESSFUL
  5696. InstallNdisWanBHAdapterEnd =+
  5697. Debug-Output "InstallNdisWanBHAdapter exit"
  5698. return $(Status)
  5699. [InstallService]
  5700. ; intall the service if it is not already installed
  5701. set ServiceName = $($0)
  5702. set DisplayName = $($1)
  5703. set ImagePath = $($2)
  5704. set StartType = $($3)
  5705. set GroupName = $($4)
  5706. set Dependencies = $($5)
  5707. set RegKeyName = $(!NTN_ServiceBase)"\"$(ServiceName)
  5708. set Status = STATUS_SUCCESSFUL
  5709. set KeyNull = ""
  5710. Debug-Output "Install"$(ServiceName)" entry"
  5711. OpenRegKey $(!REG_H_LOCAL) "" $(RegKeyName) $(!MAXIMUM_ALLOWED) KeyService
  5712. Ifstr(i) $(KeyService) == $(KeyNull)
  5713. Shell "utility.inf", CreateService, $(ServiceName), $(DisplayName), $(ImagePath), +
  5714. $(StartType), $(GroupName), $(Dependencies), ""
  5715. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  5716. Debug-Output "OEMNSVRA.INF: Install"$(ServiceName)": ShellCode error"
  5717. return STATUS_FAILED
  5718. endif
  5719. set RegistryErrorIndex = $($R0)
  5720. CloseRegKey $($R1)
  5721. CloseRegKey $($R2)
  5722. CloseRegKey $($R3)
  5723. Ifstr(i) $(RegistryErrorIndex) == SERVICE_ALREADY_EXISTS
  5724. return $(Status)
  5725. EndIf
  5726. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  5727. Debug-Output "OEMNSVRA.INF: Install"$(ServiceName)": Registry error create service"
  5728. return STATUS_FAILED
  5729. endif
  5730. endif
  5731. Ifstr(i) $(KeyService) != $(KeyNull)
  5732. CloseRegKey $(KeyService)
  5733. endif
  5734. Debug-Output "Install"$(ServiceName)" exit"
  5735. return $(Status)
  5736. [RemoveService]
  5737. ; remove service if it is installed
  5738. set ServiceName = $($0)
  5739. set RegKeyName = $(!NTN_ServiceBase)"\"$(ServiceName)
  5740. set Status = STATUS_SUCCESSFUL
  5741. set KeyNull = ""
  5742. Debug-Output "Remove"$(ServiceName)" entry"
  5743. OpenRegKey $(!REG_H_LOCAL) "" $(RegKeyName) $(!MAXIMUM_ALLOWED) KeyService
  5744. Ifstr(i) $(KeyService) != $(KeyNull)
  5745. ; remove the service using RemoveService
  5746. Shell "utility.inf", RemoveService $(ServiceName) "YES"
  5747. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  5748. Debug-Output "OEMNSVRA.INF: Remove"$(ServiceName)": ShellCode error"
  5749. return STATUS_FAILED
  5750. endif
  5751. set RegistryErrorIndex = $($R0)
  5752. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  5753. Debug-Output "OEMNSVRA.INF: Remove"$(ServiceName)": Registry error: "
  5754. return STATUS_FAILED
  5755. endif
  5756. CloseRegKey $(KeyService)
  5757. endif
  5758. Debug-Output "Remove"$(ServiceName)" exit"
  5759. return $(Status)
  5760. [InstallRasRad]
  5761. Debug-Output "InstallRasRad entry...."
  5762. set Status = STATUS_FAILED
  5763. set Status = $($R0)
  5764. ; now add the perf parameters to the service
  5765. set KeyPerformance = ""
  5766. set KeyRasRad = ""
  5767. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\RasRad" $(!MAXIMUM_ALLOWED) KeyRasRad
  5768. ifstr $(KeyRasRad) == ""
  5769. CreateRegKey $(!REG_H_LOCAL) {$(!NTN_ServiceBase)"\RasRad", 0, GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyRasRad
  5770. ifstr $(KeyRasRad) == ""
  5771. Debug-Output "InstallRasRad: can not create registry key"
  5772. goto InstallRasRadEnd
  5773. endif
  5774. OpenRegKey $(KeyRasRad) "" "Performance" $(!MAXIMUM_ALLOWED) KeyPerformance
  5775. ifstr $(KeyPerformance) == ""
  5776. CreateRegKey $(KeyRasRad) {"Performance", 0, GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyPerformance
  5777. ifstr $(KeyPerformance) == ""
  5778. Debug-Output "Error creating Performance key"
  5779. goto InstallRasRadEnd
  5780. endif
  5781. endif
  5782. set NewValueList = +
  5783. {{Library ,0,$(!REG_VT_SZ),"rasrad.dll"},+
  5784. {Open, 0,$(!REG_VT_SZ),"Open"},+
  5785. {Close, 0,$(!REG_VT_SZ),"Close"},+
  5786. {Collect, 0,$(!REG_VT_SZ),"Collect"}}
  5787. Shell "Utility.Inf", AddValueList, $(KeyPerformance), $(NewValueList)
  5788. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  5789. Debug-Output "InstallRasRadService: error shelling AddValueList"
  5790. goto InstallRasRadEnd
  5791. endif
  5792. set RegistryErrorIndex = $($R0)
  5793. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  5794. Debug-Output "InstallRasRadService: AddValueList bombed out"
  5795. goto InstallRasRadEnd
  5796. endif
  5797. CloseRegKey $(KeyPerformance)
  5798. set Status = STATUS_SUCCESSFUL
  5799. CloseRegKey $(KeyRasRad)
  5800. else
  5801. Debug-Output "InstallRasRadService: Failed to open RasRad service key"
  5802. endif
  5803. InstallRasRadEnd =+
  5804. Debug-Output "InstallRasRad exit"
  5805. ; now create the perf keys
  5806. return $(Status)
  5807. [RemoveRasRad]
  5808. set Status = STATUS_SUCCESSFUL
  5809. DeleteRegTree $(!NTN_ServiceBase) "RasRad"
  5810. return $(Status)
  5811. [InstallRasArpService]
  5812. shell "" InstallService $(!ProductRASARPName) $(!ProductRASARPDisplayName), +
  5813. $(!ProductRASARPImagePath), "kernelautostart", "PNP_TDI", {"TCPIP"}
  5814. return $($R0)
  5815. [RemoveRasArpService]
  5816. shell "" RemoveService $(!ProductRASARPName)
  5817. return $($R0)
  5818. [InstallWanArpService]
  5819. shell "" InstallService $(!ProductWANARPName) $(!ProductWANARPDisplayName), +
  5820. $(!ProductWANARPImagePath), "kernel", "PNP_TDI", {"TCPIP"}
  5821. return $($R0)
  5822. [RemoveWanArpService]
  5823. shell "" RemoveService $(!ProductWANARPName)
  5824. return $($R0)
  5825. [InstallIPFilterDriver]
  5826. shell "" InstallService $(!ProductIPFLTName) $(!ProductIPFLTDisplayName), +
  5827. $(!ProductIPFLTImagePath), "kernel", "", {}
  5828. return $($R0)
  5829. [RemoveIPFilterDriver]
  5830. shell "" RemoveService $(!ProductIPFLTName)
  5831. return $($R0)
  5832. [InstallIpxPingService]
  5833. shell "" InstallService $(!ProductIPXPINGName) $(!ProductIPXPINGDisplayName), +
  5834. $(!ProductIPXPINGImagePath), "serviceshare", "", {"NWLNKIPX"}
  5835. return $($R0)
  5836. [RemoveIpxPingService]
  5837. shell "" RemoveService $(!ProductIPXPINGName)
  5838. return $($R0)
  5839. [InstallNwLnkFwdService]
  5840. shell "" InstallService $(!ProductNWLNKFWDName) $(!ProductNWLNKFWDDisplayName), +
  5841. $(!ProductNWLNKFWDImagePath), "kernel", "", {"NWLNKIPX"}
  5842. return $($R0)
  5843. [RemoveNwLnkFwdService]
  5844. shell "" RemoveService $(!ProductNWLNKFWDName)
  5845. return $($R0)
  5846. [InstallNwLnkFltService]
  5847. shell "" InstallService $(!ProductNWLNKFLTName) $(!ProductNWLNKFLTDisplayName), +
  5848. $(!ProductNWLNKFLTImagePath), "kernel", "", {$(!ProductNWLNKFWDName)}
  5849. return $($R0)
  5850. [RemoveIpRipService]
  5851. shell "" RemoveService "IPRIP"
  5852. return $($R0)
  5853. [RemoveRelayAgentService]
  5854. shell "" RemoveService "RELAYAGENT"
  5855. return $($R0)
  5856. [RemoveNwLnkFltService]
  5857. shell "" RemoveService $(!ProductNWLNKFLTName)
  5858. return $($R0)
  5859. [InstallRtrMgr]
  5860. ; create the RouterManager keys and set the values passed in
  5861. set RtrMgr = $($0) ; name of rtrmgr key
  5862. set RtrDll = $($1) ; dll path
  5863. set RtrId = $($2) ; protocol id
  5864. Debug-Output "InstallRtrMgr for "$(RtrMgr)" entry"
  5865. CreateRegKey $(!REG_H_LOCAL) {$(!RouterKeyName)"\RouterManagers", 0, GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyRtrMgrs
  5866. Ifstr $(KeyRtrMgrs) == ""
  5867. OpenRegKey $(!REG_H_LOCAL) "" $(!RouterKeyName)"\RouterManagers" $(!MAXIMUM_ALLOWED) KeyRtrMgrs
  5868. Ifstr $(KeyRtrMgrs) == ""
  5869. Debug-Output "InstallRtrMgr: error opening RouterManagers key"
  5870. set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  5871. return $(RegistryErrorIndex)
  5872. endif
  5873. endif
  5874. CreateRegKey $(KeyRtrMgrs) {$(RtrMgr), 0, GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyRtrMgr
  5875. Ifstr $(KeyRtrMgr) == ""
  5876. OpenRegKey $(KeyRtrMgrs) "" $(RtrMgr) $(!MAXIMUM_ALLOWED) KeyRtrMgr
  5877. Ifstr $(KeyRtrMgr) == ""
  5878. Debug-Output "InstallRtrMgr: error creating RouterManagers\"$RtrMgr)" key"
  5879. set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  5880. return $(RegistryErrorIndex)
  5881. endif
  5882. endif
  5883. SetRegValue $(KeyRtrMgr) {"DLLPath", 0, $(!REG_VT_EXPAND_SZ), $(RtrDll)}
  5884. SetRegValue $(KeyRtrMgr) {"ProtocolID", 0, $(!REG_VT_DWORD), $(RtrId)}
  5885. CloseRegKey $(KeyRtrMgr)
  5886. CloseRegKey $(KeyRtrMgrs)
  5887. Debug-Output "InstallRtrMgr for "$(RtrMgr)" exit"
  5888. return STATUS_SUCCESSFUL
  5889. [InstallIPRtrMgr]
  5890. shell "" InstallRtrMgr "IP" "%systemroot%\system32\iprtrmgr.dll" $(!P:PROTO_IP)
  5891. return $($R0)
  5892. [InstallIPXRtrMgr]
  5893. shell "" InstallRtrMgr "IPX" "%systemroot%\system32\ipxrtmgr.dll" $(!P:PROTO_IPX)
  5894. return $($R0)
  5895. [RemoveRtrMgr]
  5896. ; Remove the RouterManager keys for the specified router manager
  5897. set RtrMgr = $($0) ; name of rtrmgr key
  5898. Debug-Output "RemoveRtrMgr for "$(RtrMgr)" entry"
  5899. OpenRegKey $(!REG_H_LOCAL) "" $(!RouterKeyName)"\RouterManagers" $(!MAXIMUM_ALLOWED) KeyRtrMgrs
  5900. Ifstr $(KeyRtrMgrs) == ""
  5901. Debug-Output "RemoveRtrMgr: error opening RouterManagers key"
  5902. set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  5903. return $(RegistryErrorIndex)
  5904. endif
  5905. DeleteRegTree $(KeyRtrMgrs) $(RtrMgr)
  5906. CloseRegKey $(KeyRtrMgrs)
  5907. Debug-Output "RemoveRtrMgr for "$(RtrMgr)" exit"
  5908. return STATUS_SUCCESSFUL
  5909. [RemoveIPRtrMgr]
  5910. shell "" RemoveRtrMgr "IP"
  5911. return $($R0)
  5912. [RemoveIPXRtrMgr]
  5913. shell "" RemoveRtrMgr "IPX"
  5914. return $($R0)
  5915. [InstallEventlogDlls]
  5916. ; install the eventlog dlls in the registry for the specified services in the DllList
  5917. set DllList = $($0)
  5918. Debug-Output "InstallEventlogDlls entry"
  5919. OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\EventLog\System" $(!MAXIMUM_ALLOWED) KeyEventLog
  5920. Ifstr $(KeyEventLog) == ""
  5921. ; cannot open eventlog
  5922. debug-output "OEMNSVRA.INF: InstallEventlogDlls Cannot open eventlog key"
  5923. return UNABLE_OPEN_EVENTLOG_SUBKEY
  5924. else
  5925. ; set up the service key
  5926. ForListDo $(DllList)
  5927. set Component = *($($), 1)
  5928. set DllName = "%SystemRoot%\system32\"*($($), 2)
  5929. set TypeSupported = *($($), 3)
  5930. CreateRegKey $(KeyEventLog) {$(Component), 0,GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyService
  5931. ifstr(i) $(KeyService) == ""
  5932. OpenRegKey $(KeyEventLog) "" $(Component) $(!MAXIMUM_ALLOWED) KeyService
  5933. endif
  5934. Ifstr $(KeyService) != ""
  5935. ; create the EventMessageFile and TypeSupported fields
  5936. SetRegValue $(KeyService) {EventMessageFile, 0,$(!REG_VT_EXPAND_SZ),$(DllName)}
  5937. SetRegValue $(KeyService) {TypesSupported, 0,$(!REG_VT_DWORD), $(TypeSupported)}
  5938. CloseRegKey $(KeyService)
  5939. else
  5940. Debug-Output "InstallEventlogDlls: error creating or opening eventlog\system\"$(Component)" key"
  5941. endif
  5942. EndForListDo
  5943. CloseRegKey $(KeyEventLog)
  5944. Endif
  5945. Debug-Output "InstallEventlogDlls exit"
  5946. return STATUS_SUCCESSFUL
  5947. [InstallIPEventlogDlls]
  5948. set DllList = {{"IPRouterManager", "mprmsg.dll", 7},+
  5949. {"IPRIP2", "iprip2.dll", 7},+
  5950. {"IPBOOTP", "ipbootp.dll", 7},+
  5951. {"OSPFMib", "ospfmib.dll", 7},+
  5952. {"OSPF", "ospf.dll", 7}}
  5953. shell "" InstallEventlogDlls $(DllList)
  5954. return $($R0)
  5955. [InstallIPXEventlogDlls]
  5956. set DllList = {{"IPXRouterManager", "mprmsg.dll", 7},+
  5957. {"IPXRIP", "mprmsg.dll", 7},+
  5958. {"IPXSAP", "mprmsg.dll", 7}}
  5959. shell "" InstallEventlogDlls $(DllList)
  5960. return $($R0)
  5961. [RemoveEventlogDlls]
  5962. ; remove the previously installed eventlog entries for the specified services in the DllList
  5963. set DllList = $($0)
  5964. Debug-Output "RemoveEventlogDlls entry"
  5965. OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\EventLog\System" $(!MAXIMUM_ALLOWED) KeyEventLog
  5966. Ifstr $(KeyEventLog) == ""
  5967. ; cannot open eventlog
  5968. debug-output "OEMNSVRA.INF: InstallEventlogDlls Cannot open eventlog key"
  5969. return UNABLE_OPEN_EVENTLOG_SUBKEY
  5970. else
  5971. ; set up the service key
  5972. ForListDo $(DllList)
  5973. set Component = *($($), 1)
  5974. DeleteRegTree $(KeyEventLog) $(Component)
  5975. EndForListDo
  5976. CloseRegKey $(KeyEventLog)
  5977. Endif
  5978. Debug-Output "RemoveEventlogDlls exit"
  5979. return STATUS_SUCCESSFUL
  5980. [RemoveIPEventlogDlls]
  5981. set DllList = {{"IPRouterManager"}, {"IPRIP2"}, {"IPBOOTP"}, {"OSPFMib"}, {"OSPF"}}
  5982. shell "" InstallEventlogDlls $(DllList)
  5983. return $($R0)
  5984. [RemoveIPXEventlogDlls]
  5985. set DllList = {{"IPXRouterManager"}, {"IPXRIP"}, {"IPXSAP"}}
  5986. shell "" InstallEventlogDlls $(DllList)
  5987. return $($R0)
  5988. [InstallSnmpAgents]
  5989. set AgentList = $($0)
  5990. set ProductKeyBase = $(!NTN_SoftwareBase)"\Microsoft"
  5991. Debug-Output "InstallSnmpAgents entry"
  5992. OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ExtensionAgents" $(!MAXIMUM_ALLOWED) KeySnmp
  5993. Ifstr $(KeySnmp) == ""
  5994. ; cannot open snmp extension agents key
  5995. debug-output "OEMNSVRA.INF: InstallSnmpAgents Cannot open ExtensionAgents key"
  5996. ; BUGBUG we should return a different value for SNMP agent key
  5997. return UNABLE_OPEN_EVENTLOG_SUBKEY
  5998. else
  5999. ; set up the service key
  6000. ForListDo $(AgentList)
  6001. set AgentName = *($($), 1)
  6002. set AgentKeyName = *($($), 2)
  6003. set DllName = "%SystemRoot%\System32\"*($($), 3)
  6004. SetRegValue $(KeySnmp) {$(AgentName), 0,$(!REG_VT_SZ), "SOFTWARE\MICROSOFT\"$(AgentKeyName)"\CurrentVersion"}
  6005. CreateRegKey $(!REG_H_LOCAL) {$(ProductKeyBase)"\"$(AgentKeyName), 0, GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyAgent
  6006. Ifstr $(KeyAgent) == ""
  6007. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyBase)"\"$(AgentKeyName) $(!MAXIMUM_ALLOWED) KeyAgent
  6008. Ifstr $(KeyAgent) == ""
  6009. Debug-Output "InstallSnmpAgents: error opening "$(AgentKeyName)" registry key"
  6010. set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  6011. return $(RegistryErrorIndex)
  6012. endif
  6013. Endif
  6014. CreateRegKey $(KeyAgent) {"CurrentVersion", 0, GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyCurrentVer
  6015. Ifstr $(KeyCurrentVer) == ""
  6016. OpenRegKey $(KeyAgent) "" "CurrentVersion" $(!MAXIMUM_ALLOWED) KeyCurrentVer
  6017. Ifstr $(KeyCurrentVer) == ""
  6018. Debug-Output "InstallSnmpAgents: error opening "$(AgentKeyName)"\CurrentVersion registry key"
  6019. set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  6020. return $(RegistryErrorIndex)
  6021. endif
  6022. EndIf
  6023. SetRegValue $(KeyCurrentVer) {"PathName", 0, $(!REG_VT_EXPAND_SZ), $(DllName)}
  6024. CloseRegKey $(KeyCurrentVer)
  6025. CloseRegKey $(KeyAgent)
  6026. EndForListDo
  6027. CloseRegKey $(KeySnmp)
  6028. Endif
  6029. Debug-Output "InstallSnmpAgents exit"
  6030. return STATUS_SUCCESSFUL
  6031. [InstallIPSnmpAgents]
  6032. set AgentList = { {"ospf", "OspfMibAgent", "ospfagnt.dll"},+
  6033. ; note that we don't install the mib2 agent any more because we
  6034. ; have renamed mib2.dll to inetmib1.dll which is already registered
  6035. ; with snmp
  6036. ; {"mib2", "NewMib2Agent", "inetmib1.dll"},+
  6037. {"rip2", "Rip2Agent", "ripagnt.dll"},+
  6038. {"bootp", "BootPAgent", "btpagnt.dll"} }
  6039. shell "" InstallSnmpAgents $(AgentList)
  6040. return $($R0)
  6041. [InstallIPXSnmpAgents]
  6042. set AgentList = { {"IPX", "IPXMibAgent", "rtipxmib.dll"} }
  6043. shell "" InstallSnmpAgents $(AgentList)
  6044. return $($R0)
  6045. [RemoveSnmpAgents]
  6046. set AgentList = $($0)
  6047. set ProductKeyBase = $(!NTN_SoftwareBase)"\MICROSOFT"
  6048. Debug-Output "RemoveSnmpAgents entry"
  6049. OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ExtensionAgents" $(!MAXIMUM_ALLOWED) KeySnmp
  6050. Ifstr $(KeySnmp) == ""
  6051. ; cannot open snmp extension agents key
  6052. debug-output "OEMNSVRA.INF: RemoveSnmpAgents Cannot open ExtensionAgents key"
  6053. ; BUGBUG we should return a different value for SNMP agent key
  6054. return UNABLE_OPEN_EVENTLOG_SUBKEY
  6055. else
  6056. ; set up the service key
  6057. ForListDo $(AgentList)
  6058. set AgentName = *($($), 1)
  6059. set AgentKeyName = *($($), 2)
  6060. DeleteRegValue $(KeySnmp) $(AgentName)
  6061. DeleteRegTree $(!REG_H_LOCAL) $(ProductKeyBase)"\"$(AgentKeyName)
  6062. EndForListDo
  6063. CloseRegKey $(KeySnmp)
  6064. Endif
  6065. Debug-Output "RemoveSnmpAgents exit"
  6066. return STATUS_SUCCESSFUL
  6067. [RemoveIPSnmpAgents]
  6068. ; Note that even though we don't install mib2 agent any more, we
  6069. ; still remove it to clean up any leftover turds from a previous
  6070. ; install where we used to add the mib2 agent
  6071. set AgentList = { {"ospf", "OspfMibAgent"},+
  6072. {"mib2", "NewMib2Agent"},+
  6073. {"rip2", "Rip2Agent"},+
  6074. {"bootp", "BootPAgent"} }
  6075. shell "" RemoveSnmpAgents $(AgentList)
  6076. return $($R0)
  6077. [RemoveIPXSnmpAgents]
  6078. set AgentList = { {"IPX", "IPXMibAgent"} }
  6079. shell "" RemoveSnmpAgents $(AgentList)
  6080. return $($R0)
  6081. [InstallRasAcdService]
  6082. ; intall the Auto Connection Driver service if it is not already installed
  6083. ; 3/11/96 RamC Changed the group from NDISWAN to "Streams Drivers" because
  6084. ; the load order changed with the recent no-net checkins in NT
  6085. ;
  6086. shell "" InstallService $(!ProductRASACDName) $(!ProductRASACDDisplayName), +
  6087. $(!ProductRASACDImagePath), "kernelautostart", "Streams Drivers", {}
  6088. return $($R0)
  6089. [RemoveRasAcdService]
  6090. shell "" RemoveService $(!ProductRASACDName)
  6091. return $($R0)
  6092. [InstallNdisTapiService]
  6093. ; intall the NdisTapi service if it is not already installed
  6094. set Status = STATUS_SUCCESSFUL
  6095. set KeyNull = ""
  6096. Debug-Output "InstallNdisTapiService entry"
  6097. OpenRegKey $(!REG_H_LOCAL) "" $(!NdisTapiKeyName) $(!MAXIMUM_ALLOWED) KeyService
  6098. Ifstr(i) $(KeyService) == $(KeyNull)
  6099. Shell "utility.inf", CreateService, $(!ProductNDISTAPIName), +
  6100. $(!ProductNDISTAPIDisplayName), +
  6101. $(!ProductNDISTAPIImagePath), +
  6102. "kernelauto", "NDIS", {}, ""
  6103. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  6104. Debug-Output "OEMNSVRA.INF: InstallNdisTapiService : ShellCode error"
  6105. return STATUS_FAILED
  6106. endif
  6107. set RegistryErrorIndex = $($R0)
  6108. set ParamKey = $($R2)
  6109. CloseRegKey $($R1)
  6110. CloseRegKey $($R3)
  6111. Ifstr(i) $(RegistryErrorIndex) == SERVICE_ALREADY_EXISTS
  6112. return $(Status)
  6113. EndIf
  6114. Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  6115. Debug-Output "OEMNSVRA.INF: InstallNdisTapiService: Registry error create service"
  6116. return STATUS_FAILED
  6117. endif
  6118. ifstr(i) $(!STF_PRODUCT) != "WINNT"
  6119. SetRegValue $(ParamKey) {AsyncEventQueueSize, 0, $(!REG_VT_DWORD), 3072}
  6120. else
  6121. SetRegValue $(ParamKey) {AsyncEventQueueSize, 0, $(!REG_VT_DWORD), 768}
  6122. endif
  6123. CloseRegKey $(ParamKey)
  6124. endif
  6125. Ifstr(i) $(KeyService) != $(KeyNull)
  6126. CloseRegKey $(KeyService)
  6127. endif
  6128. Debug-Output "InstallNdisTapiService exit"
  6129. return $(Status)
  6130. [RemoveNdisTapiService]
  6131. shell "" RemoveService $(!ProductNDISTAPIName)
  6132. return $($R0)
  6133. [InstallNwlnkRipService]
  6134. ; install the nwlnkrip service by shelling out the OEMNSVRR.INF file.
  6135. ; The reason we do this is because the RIP service is shared between RAS
  6136. ; and the IPX installer.
  6137. ; Modified on 9/19/96 by RamC
  6138. ; For the combined router/ras service, rip functionality is provided
  6139. ; by the IPX router manager. So, we will not install this separate
  6140. ; service any more and disable it if it is currently installed.
  6141. ; We need to take care to re-enable the service when some one removes
  6142. ; the router service.
  6143. Debug-Output "InstallNwlnkRipService entry"
  6144. set Status = STATUS_FAILED
  6145. set KeyNull = ""
  6146. Set SrcDir = $(!STF_SRCDIR)
  6147. ; commented out on 9/19/96 by RamC as part of router service changes
  6148. ;
  6149. ; ; set !STF_SRCDIR_OVERRIDE to the SrcDir value to prevent asking
  6150. ; ; the user for the same information.
  6151. ;
  6152. ; ifstr(i) $(!NTN_InstallMode) == "install"
  6153. ; set !STF_SRCDIR_OVERRIDE = $(SrcDir)
  6154. ; endif
  6155. ;
  6156. ; ; set the flags based on what phase we are in and whether this is an
  6157. ; ; IDW installation
  6158. ;
  6159. ; set AddCopy = YES
  6160. ; set DoCopy = YES
  6161. ; set DoConfig = YES
  6162. ;
  6163. ; ; save !NTN_InstallMode and change it to install before shelling the
  6164. ; ; inf file.
  6165. ;
  6166. ; set SaveNTN_InstallMode = $(!NTN_InstallMode)
  6167. ;
  6168. ; set !NTN_InstallMode = install
  6169. ; Shell "oemnsvrr.inf" InstallOption $(!STF_LANGUAGE) "NWLNKRIP" +
  6170. ; $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig) "RAS"
  6171. ;
  6172. ; ; restore the environment variables
  6173. ; set !NTN_InstallMode = $(SaveNTN_InstallMode)
  6174. ;
  6175. ; Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  6176. ; Debug-Output "Error installing NWLNKRIP service"
  6177. ; Goto InstallNwlnkRipServiceEnd
  6178. ; Endif
  6179. ;
  6180. ; Set InstallStatus = $($R0)
  6181. ;
  6182. ; Ifstr(i) $(InstallStatus) != STATUS_SUCCESSFUL
  6183. ; Ifstr(i) $(InstallStatus) != STATUS_USERCANCEL
  6184. ; Debug-Output "InstallNwlnkRipService returned "$(InstallStatus)
  6185. ; Goto InstallNwlnkRipServiceEnd
  6186. ; Endif
  6187. ; Endif
  6188. ;
  6189. ; ; now set the NetbiosRouting parameter appropriately
  6190. ; OpenRegKey $(!REG_H_LOCAL) "" $(!RasIsnRipKeyName) $(!MAXIMUM_ALLOWED) KeyService
  6191. ; ifstr $(KeyService) != ""
  6192. ; OpenRegKey $(KeyService) "" "Parameters" $(!MAXIMUM_ALLOWED) KeyParams
  6193. ; ifstr(i) $(KeyParams) != ""
  6194. ; GetRegValue $(KeyParams),"NetbiosRouting", NetbiosRoutingInfo
  6195. ; Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  6196. ; set NetbiosRouting = *($(NetbiosRoutingInfo), 4)
  6197. ; else
  6198. ; ; not defined, so set the default value
  6199. ; set NetbiosRouting = 2
  6200. ; endif
  6201. ; ; Now enable the WAN bit
  6202. ; ifint $(NetbiosRouting) == 0
  6203. ; set NetbiosRouting = 2
  6204. ; else-ifint $(NetbiosRouting) == 1
  6205. ; set NetbiosRouting = 3
  6206. ; endif
  6207. ; SetRegValue $(KeyParams) {NetbiosRouting, $(NoTitle), $(!REG_VT_DWORD), $(NetbiosRouting)}
  6208. ; CloseRegKey $(KeyParams)
  6209. ; endif
  6210. ; CloseRegKey $(KeyService)
  6211. ; endif
  6212. ;
  6213. ; Shell "" AddServiceDependency "RemoteAccess" $(!ProductRASISNRIPName)
  6214. ; ifstr(i) $($R0) == STATUS_FAILED
  6215. ; Debug-Output "InstallNwlnkRipService: error adding service dependency"
  6216. ; endif
  6217. ;
  6218. ; added on 9/19/96 by RamC
  6219. ; if the NwlnkRip service is currently installed, disable it
  6220. OpenRegKey $(!REG_H_LOCAL) "" $(!RasIsnRipKeyName) $(!MAXIMUM_ALLOWED) KeyService
  6221. ifstr $(KeyService) != ""
  6222. SetRegValue $(KeyService) {Start, 0, $(!REG_VT_DWORD), 4}
  6223. CloseRegKey $(KeyService)
  6224. endif
  6225. ; end new code
  6226. set Status = STATUS_SUCCESSFUL
  6227. InstallNwlnkRipServiceEnd =+
  6228. Debug-Output "InstallNwlnkRipService exit"
  6229. return $(Status)
  6230. [RemoveNwlnkRipService]
  6231. ; remove NwlnkRip service by shelling out to OEMNSVRR.INF The service is
  6232. ; actually removed if RAS is the only consumer. Otherwise, the service
  6233. ; installer just removes RAS from the list of users of the service.
  6234. Debug-Output "RemoveNwlnkRipService entry"
  6235. set Status = STATUS_FAILED
  6236. set KeyNull = ""
  6237. Set SrcDir = $(!STF_SRCDIR)
  6238. ; set the flags based on what phase we are in and whether this is an
  6239. ; IDW installation
  6240. set AddCopy = YES
  6241. set DoCopy = YES
  6242. set DoConfig = YES
  6243. ; save !NTN_InstallMode and change it to deinstall before shelling the
  6244. ; inf file.
  6245. set SaveNTN_InstallMode = $(!NTN_InstallMode)
  6246. set !NTN_InstallMode = deinstall
  6247. Shell "oemnsvrr.inf" InstallOption $(!STF_LANGUAGE) "NWLNKRIP" +
  6248. $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig) "RAS"
  6249. ; restore the environment variables
  6250. set !NTN_InstallMode = $(SaveNTN_InstallMode)
  6251. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  6252. Debug-Output "Error removing NWLNKRIP service"
  6253. Goto RemoveNwlnkRipServiceEnd
  6254. Endif
  6255. Set RemoveStatus = $($R0)
  6256. Ifstr(i) $(RemoveStatus) != STATUS_SUCCESSFUL
  6257. Ifstr(i) $(RemoveStatus) != STATUS_USERCANCEL
  6258. Debug-Output "RemoveNwlnkRipService returned "$(RemoveStatus)
  6259. Goto RemoveNwlnkRipServiceEnd
  6260. Endif
  6261. Endif
  6262. Shell "" RemoveServiceDependency "RemoteAccess" $(!ProductRASISNRIPName)
  6263. ifstr(i) $($R0) == STATUS_FAILED
  6264. Debug-Output "RemoveNwlnkRipService: error removing service dependency"
  6265. endif
  6266. set Status = STATUS_SUCCESSFUL
  6267. RemoveNwlnkRipServiceEnd =+
  6268. Debug-Output "RemoveNwlnkRipService exit"
  6269. return $(Status)
  6270. [InstallIsnSapService]
  6271. ; install the isnsap service by shelling out the OEMNSVSA.INF file.
  6272. ; The reason we do this is because the SAP agent is shared between RAS
  6273. ; and the NCP server install.
  6274. Debug-Output "InstallIsnSapService entry"
  6275. set Status = STATUS_FAILED
  6276. set KeyNull = ""
  6277. Set SrcDir = $(!STF_SRCDIR)
  6278. ; set !STF_SRCDIR_OVERRIDE to the SrcDir value to prevent asking
  6279. ; the user for the same information.
  6280. ifstr(i) $(!NTN_InstallMode) == "install"
  6281. set !STF_SRCDIR_OVERRIDE = $(SrcDir)
  6282. endif
  6283. ; set the flags based on what phase we are in and whether this is an
  6284. ; IDW installation
  6285. set AddCopy = YES
  6286. set DoCopy = YES
  6287. set DoConfig = YES
  6288. ; save !NTN_InstallMode and change it to install before shelling the
  6289. ; inf file.
  6290. set SaveNTN_InstallMode = $(!NTN_InstallMode)
  6291. set !NTN_InstallMode = install
  6292. Shell "oemnsvsa.inf" InstallOption $(!STF_LANGUAGE) "SAP" +
  6293. $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig) "RAS"
  6294. ; restore the environment variables
  6295. set !NTN_InstallMode = $(SaveNTN_InstallMode)
  6296. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  6297. Debug-Output "Error installing SAP agent"
  6298. Goto InstallIsnSapServiceEnd
  6299. Endif
  6300. Set InstallStatus = $($R0)
  6301. Ifstr(i) $(InstallStatus) != STATUS_SUCCESSFUL
  6302. Ifstr(i) $(InstallStatus) != STATUS_USERCANCEL
  6303. Debug-Output "InstallSapService returned "$(InstallStatus)
  6304. Goto InstallIsnSapServiceEnd
  6305. Endif
  6306. Endif
  6307. ; Commented on 9/19/96 by RamC for routing related changes
  6308. ;
  6309. ; Shell "" AddServiceDependency "RemoteAccess" $(!ProductRASISNSAPName)
  6310. ; ifstr(i) $($R0) == STATUS_FAILED
  6311. ; Debug-Output "InstallIsnSapService: error adding service dependency"
  6312. ; endif
  6313. ; added on 9/19/96 by RamC
  6314. ; if the NwSapAgent service is installed, change the ImagePath to point to mprouter.exe
  6315. ; BUGBUG When the router service is removed, we should restore this value back to its previous value
  6316. OpenRegKey $(!REG_H_LOCAL) "" $(!RasIsnSapKeyName) $(!MAXIMUM_ALLOWED) KeyService
  6317. ifstr $(KeyService) != ""
  6318. SetRegValue $(KeyService) {ImagePath, 0, $(!REG_VT_EXPAND_SZ), "%SystemRoot%\System32\mprouter.exe"}
  6319. CloseRegKey $(KeyService)
  6320. endif
  6321. ; end new code
  6322. set Status = STATUS_SUCCESSFUL
  6323. InstallIsnSapServiceEnd =+
  6324. Debug-Output "InstallIsnSapService exit"
  6325. return $(Status)
  6326. [RemoveIsnSapService]
  6327. ; remove IsnSap service by shelling out to OEMNSVSA.INF The SAP agent is
  6328. ; actually removed if RAS is the only consumer. Otherwise, the SAP installer
  6329. ; just removes RAS from the list of users of SAP agent.
  6330. Debug-Output "RemoveIsnSapService entry"
  6331. set Status = STATUS_FAILED
  6332. set KeyNull = ""
  6333. Set SrcDir = $(!STF_SRCDIR)
  6334. ; set the flags based on what phase we are in and whether this is an
  6335. ; IDW installation
  6336. set AddCopy = YES
  6337. set DoCopy = YES
  6338. set DoConfig = YES
  6339. ; save !NTN_InstallMode and change it to deinstall before shelling the
  6340. ; inf file.
  6341. set SaveNTN_InstallMode = $(!NTN_InstallMode)
  6342. set !NTN_InstallMode = deinstall
  6343. Shell "oemnsvsa.inf" InstallOption $(!STF_LANGUAGE) "SAP" +
  6344. $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig) "RAS"
  6345. ; restore the environment variables
  6346. set !NTN_InstallMode = $(SaveNTN_InstallMode)
  6347. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  6348. Debug-Output "Error removing SAP agent"
  6349. Goto RemoveIsnSapServiceEnd
  6350. Endif
  6351. Set RemoveStatus = $($R0)
  6352. Ifstr(i) $(RemoveStatus) != STATUS_SUCCESSFUL
  6353. Ifstr(i) $(RemoveStatus) != STATUS_USERCANCEL
  6354. Debug-Output "RemoveIsnSapService returned "$(RemoveStatus)
  6355. Goto RemoveIsnSapServiceEnd
  6356. Endif
  6357. Endif
  6358. Shell "" RemoveServiceDependency "RemoteAccess" $(!ProductRASISNSAPName)
  6359. ifstr(i) $($R0) == STATUS_FAILED
  6360. Debug-Output "RemoveIsnSapService: error removing service dependency"
  6361. endif
  6362. set Status = STATUS_SUCCESSFUL
  6363. RemoveIsnSapServiceEnd =+
  6364. Debug-Output "RemoveIsnSapService exit"
  6365. return $(Status)
  6366. [InstallSnmpService]
  6367. ; First check to see if SNMP service is currently installed, if not then
  6368. ;Install SNMP service by shelling oemnsvsn.inf with the appropriate parameters
  6369. Debug-Output "InstallSnmpService entry"
  6370. set Status = STATUS_FAILED
  6371. set KeyNull = ""
  6372. Set SrcDir = $(!STF_SRCDIR)
  6373. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\Snmp" $(!MAXIMUM_ALLOWED) KeySnmp
  6374. ifstr $(KeySnmp) != $(KeyNull)
  6375. Debug-Output "OEMNSVRA.INF: Not installing SNMP service because it is already installed."
  6376. CloseRegkey $(KeySnmp)
  6377. return STATUS_SUCCESSFUL
  6378. endif
  6379. ; set !STF_SRCDIR_OVERRIDE to the SrcDir value to prevent asking
  6380. ; the user for the source driveinformation again.
  6381. ifstr(i) $(!NTN_InstallMode) == "install"
  6382. set !STF_SRCDIR_OVERRIDE = $(SrcDir)
  6383. endif
  6384. ; set the flags based on what phase we are in and whether this is an
  6385. ; IDW installation
  6386. set AddCopy = YES
  6387. set DoCopy = YES
  6388. set DoConfig = YES
  6389. ; save !NTN_InstallMode and change it to install before shelling the
  6390. ; inf file.
  6391. set SaveNTN_InstallMode = $(!NTN_InstallMode)
  6392. set !NTN_InstallMode = install
  6393. Shell "oemnsvsn.inf" InstallOption $(!STF_LANGUAGE) "SNMP" +
  6394. $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig)
  6395. ; restore the environment variables
  6396. set !NTN_InstallMode = $(SaveNTN_InstallMode)
  6397. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  6398. Debug-Output "Error installing SAP agent"
  6399. Goto InstallIsnSapServiceEnd
  6400. Endif
  6401. Set InstallStatus = $($R0)
  6402. Ifstr(i) $(InstallStatus) != STATUS_SUCCESSFUL
  6403. Ifstr(i) $(InstallStatus) != STATUS_USERCANCEL
  6404. Debug-Output "InstallSapService returned "$(InstallStatus)
  6405. Goto InstallSnmpServiceEnd
  6406. Endif
  6407. Endif
  6408. set Status = STATUS_SUCCESSFUL
  6409. InstallSnmpServiceEnd =+
  6410. Debug-Output "InstallSnmpService exit"
  6411. return $(Status)
  6412. [EnablePPTPFilterDriver]
  6413. Debug-Output "EnablePPTPFilterDriver entry"
  6414. set Status = STATUS_FAILED
  6415. set DrvrKeyName = $(!NTN_ServiceBase)"\RASPPTPF"
  6416. OpenRegKey $(!REG_H_LOCAL) "" $(DrvrKeyName) $(!MAXIMUM_ALLOWED) KeyDriver
  6417. ifstr $(KeyDriver) != ""
  6418. SetRegValue $(KeyDriver) {Start, 0, $(!REG_VT_DWORD), 2}
  6419. CloseRegKey $(KeyDriver)
  6420. Debug-Output "Set PPTPFilterDriver Start value to 2"
  6421. set Status = STATUS_SUCCESSFUL
  6422. endif
  6423. Debug-Output "EnablePPTPFilterDriver exit"
  6424. return $(Status)
  6425. [DisablePPTPFilterDriver]
  6426. Debug-Output "DisablePPTPFilterDriver entry"
  6427. set Status = STATUS_FAILED
  6428. set BackupDir = $(!STF_WINDOWSSYSPATH)"\~~RB$$~~"
  6429. set DrvrKeyName = $(!NTN_ServiceBase)"\RASPPTPF"
  6430. OpenRegKey $(!REG_H_LOCAL) "" $(DrvrKeyName) $(!MAXIMUM_ALLOWED) KeyDriver
  6431. ifstr $(KeyDriver) != ""
  6432. SetRegValue $(KeyDriver) {Start, 0, $(!REG_VT_DWORD), 4}
  6433. CloseRegKey $(KeyDriver)
  6434. Debug-Output "Set PPTPFilterDriver Start value to 4"
  6435. ; Now, remove raspptpf.sys file if it exists
  6436. ; the saved file will be restored by routing setup when routing
  6437. ; service is removed
  6438. set STATUS = NO
  6439. LibraryProcedure STATUS, $(!LIBHANDLE), CheckFileExistance $(!STF_WINDOWSSYSPATH)"\drivers\RASPPTPF.SYS"
  6440. ifstr(i) $(STATUS) == YES
  6441. set STATUS = NO
  6442. LibraryProcedure STATUS, $(!LIBHANDLE), CheckFileExistance $(BackupDir)"\RASPPTPF.SYS"
  6443. ifstr(i) $(STATUS) == YES
  6444. ; if file exists in the backup directory add file to delete list
  6445. ; else copy this file to the backupdir so that it can be restored
  6446. ; when routing is removed
  6447. LibraryProcedure STATUS, $(!LIBHANDLE), DelFile +
  6448. $(!STF_WINDOWSSYSPATH)"drivers\RASPPTPF.OLD"
  6449. LibraryProcedure STATUS, $(!LIBHANDLE), RenFile $(!STF_WINDOWSSYSPATH)"\drivers\RASPPTPF.SYS" +
  6450. $(!STF_WINDOWSSYSPATH)"\drivers\RASPPTPF.OLD"
  6451. ; Add the file to the delete list so that it gets deleted at next boot
  6452. AddFileToDeleteList $(!STF_WINDOWSSYSPATH)"\drivers\RASPPTPF.OLD"
  6453. else
  6454. LibraryProcedure STATUS, $(!LIBHANDLE), DelFile $(!STF_WINDOWSSYSPATH)"\DRIVERS\RASPPTPF.SYS.SAV"
  6455. LibraryProcedure STATUS, $(!LIBHANDLE), RenFile $(!STF_WINDOWSSYSPATH)"\drivers\RASPPTPF.SYS" +
  6456. $(!STF_WINDOWSSYSPATH)"\drivers\RASPPTPF.SYS.SAV"
  6457. endif
  6458. endif
  6459. set Status = STATUS_SUCCESSFUL
  6460. endif
  6461. Debug-Output "DisablePPTPFilterDriver exit"
  6462. return $(Status)
  6463. [WritePPPParameters]
  6464. ; this routine copies the PPP parameters information from
  6465. ; SOFTWARE\..\RAS\PROTOCOLS to SERVICES\RASMAN\PPP key
  6466. Debug-Output "WritePPPParameters: entry"
  6467. Set Status = STATUS_FAILED
  6468. set KeyNull = ""
  6469. set RasManKeyName = $(!NTN_ServiceBase)"\RasMan"
  6470. set RasManPPPKeyName = $(!NTN_ServiceBase)"\RasMan\PPP"
  6471. set RasProtocolsKeyName = $(!NTN_SoftwareBase)"\Microsoft\RAS\PROTOCOLS"
  6472. OpenRegKey $(!REG_H_LOCAL) "" $(RasManKeyName) $(!MAXIMUM_ALLOWED) KeyRasMan
  6473. ifstr $(KeyRasMan) != $(KeyNull)
  6474. ; save the old PPP parameters if they are present
  6475. OpenRegKey $(KeyRasMan) "" "PPP" $(!MAXIMUM_ALLOWED) KeyRasManPPP
  6476. set NewValueList = {}
  6477. ifstr $(KeyRasManPPP) != $(KeyNull)
  6478. EnumRegValue $(KeyRasManPPP) NewValueList
  6479. else
  6480. CreateRegKey $(KeyRasMan) +
  6481. {"PPP",0,GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyRasManPPP
  6482. CloseRegKey $(KeyRasMan)
  6483. ifstr $(KeyRasManPPP) == $(KeyNull)
  6484. Debug-Output "WritePPPParameters: error creating RasMan\ppp key"
  6485. goto WritePPPParametersEnd
  6486. endif
  6487. endif
  6488. else
  6489. Debug-Output "WritePPPParameters: error opening RasMan key"
  6490. goto UpdateCPListEnd
  6491. endif
  6492. ifstr(i) $(NewValueList) == {}
  6493. set NewValueList = {{MaxConfigure, 0, $(!REG_VT_DWORD), 10}, +
  6494. {MaxTerminate, 0, $(!REG_VT_DWORD), 2}, +
  6495. {MaxFailure, 0, $(!REG_VT_DWORD), 10}. +
  6496. {MaxReject, 0, $(!REG_VT_DWORD), 5}. +
  6497. {NegotiateTime, 0, $(!REG_VT_DWORD), 150}, +
  6498. {Logging, 0, $(!REG_VT_DWORD), 0}, +
  6499. {RestartTimer, 0, $(!REG_VT_DWORD), 3}}
  6500. endif
  6501. forlistdo $(NewValueList)
  6502. SetRegValue $(KeyRasManPPP) $($)
  6503. endforlistdo
  6504. ; if ForceEncryptedPassword, ForceEncryptedData and ForceStrongEncryption
  6505. ; are set in
  6506. ; SOFTWARE\..\RAS\PROTOCOLS get that value and store in the RASMAN\PPP key.
  6507. ; otherwise just default the values.
  6508. set ForceEncryptedPassword = 2
  6509. set ForceEncryptedData = 0
  6510. set ForceStrongEncryption = 0
  6511. OpenRegKey $(!REG_H_LOCAL) "" $(RasProtocolsKeyName) $(!MAXIMUM_ALLOWED) KeyRasProtocols
  6512. ifstr $(KeyRasProtocols) != $(KeyNull)
  6513. GetRegValue $(KeyRasProtocols) "ForceEncryptedPassword" ForceValue
  6514. ifint $(RegLastError) == 0
  6515. set ForceEncryptedPassword = *($(ForceValue), 4)
  6516. endif
  6517. GetRegValue $(KeyRasProtocols) "ForceEncryptedData" ForceValue
  6518. ifint $(RegLastError) == 0
  6519. set ForceEncryptedData = *($(ForceValue), 4)
  6520. endif
  6521. GetRegValue $(KeyRasProtocols) "ForceStrongEncryption" ForceValue
  6522. ifint $(RegLastError) == 0
  6523. set ForceStrongEncryption = *($(ForceValue), 4)
  6524. endif
  6525. SetRegValue $(KeyRasManPPP) {ForceEncryptedPassword, 0, +
  6526. $(!REG_VT_DWORD),$(ForceEncryptedPassword)}
  6527. SetRegValue $(KeyRasManPPP) {ForceEncryptedData, 0, +
  6528. $(!REG_VT_DWORD),$(ForceEncryptedData)}
  6529. SetRegValue $(KeyRasManPPP) {ForceStrongEncryption, 0, +
  6530. $(!REG_VT_DWORD),$(ForceStrongEncryption)}
  6531. CloseRegKey $(KeyRasProtocols)
  6532. endif
  6533. CloseRegKey $(KeyRasManPPP)
  6534. set Status = STATUS_SUCCESSFUL
  6535. WritePPPParametersEnd =+
  6536. Debug-Output "WritePPPParameters: exit"
  6537. return $(Status)
  6538. [UpdateCPList]
  6539. ; this routine modifies the supported list of CPs and their corresponding
  6540. ; dll's based on the installed set of protocols.
  6541. Debug-Output "UpdateCPList: entry"
  6542. Set Status = STATUS_FAILED
  6543. set KeyNull = ""
  6544. set RasManPPPKeyName = $(!NTN_ServiceBase)"\RasMan\PPP"
  6545. ; Write the PPP parameters first
  6546. Shell "" WritePPPParameters
  6547. Shell "" QuerySelectedProtocols
  6548. ifstr(i) $($R0) == STATUS_SUCCESSFUL
  6549. set fNetbeuiSelected = $($R1)
  6550. set fTcpIpSelected = $($R2)
  6551. set fIpxSelected = $($R3)
  6552. set fNetbeuiAllowed = $($R4)
  6553. set fTcpIpAllowed = $($R5)
  6554. set fIpxAllowed = $($R6)
  6555. else
  6556. Debug-Output "UpdateCPList: error QuerySelectedProtocols"
  6557. goto UpdateCPListEnd
  6558. endif
  6559. OpenRegKey $(!REG_H_LOCAL) "" $(RasManPPPKeyName) $(!MAXIMUM_ALLOWED) KeyRasManPPP
  6560. ifstr $(KeyRasManPPP) != $(KeyNull)
  6561. EnumRegKey $(KeyRasManPPP) OldCPList
  6562. ifstr(i) $(fNetbeuiSelected) == TRUE
  6563. set fNetbeuiChosen = TRUE
  6564. else
  6565. set fNetbeuiChosen = $(fNetbeuiAllowed)
  6566. endif
  6567. ifstr(i) $(fTcpIpSelected) == TRUE
  6568. set fTcpIpChosen = TRUE
  6569. else
  6570. set fTcpIpChosen = $(fTcpIpAllowed)
  6571. endif
  6572. ifstr(i) $(fIpxSelected) == TRUE
  6573. set fIpxChosen = TRUE
  6574. else
  6575. set fIpxChosen = $(fIpxAllowed)
  6576. endif
  6577. set CPList = {"PAP", "CHAP", "SPAP", "CBCP", "COMPCP"}
  6578. ifstr(i) $(fNetbeuiChosen) == TRUE
  6579. set CPList = >($(CPList), "NBFCP")
  6580. endif
  6581. ifstr(i) $(fTcpIpChosen) == TRUE
  6582. set CPList = >($(CPList), "IPCP")
  6583. endif
  6584. ifstr(i) $(fIpxChosen) == TRUE
  6585. set CPList = >($(CPList), "IPXCP")
  6586. endif
  6587. ; ifstr(i) $(fAppleTalkChosen) == TRUE
  6588. ; set CPList = >($(CPList), "ATALKCP")
  6589. ; endif
  6590. ; if a CP was added in a prior configuration and is no more supported
  6591. ; delete the corresponding registry key
  6592. set CurrentCPList = {}
  6593. ForListDo $(OldCPList)
  6594. set CPName = *($($),1)
  6595. ifcontains(i) $(CPName) not-in $(CPList)
  6596. DeleteRegTree $(KeyRasManPPP) $(CPName)
  6597. else
  6598. set CurrentCPList = >($(CurrentCPList), $(CPName))
  6599. endif
  6600. EndForListDo
  6601. forlistdo $(CPList)
  6602. ; create the CP key only if it doesn't already exist
  6603. ifcontains(i) $($) not-in $(CurrentCPList)
  6604. CreateRegKey $(KeyRasManPPP) +
  6605. {$($),0,GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyCp
  6606. set path = #(CP-List, $($), 1)
  6607. set NewValueList = {{Path, 0, $(!REG_VT_EXPAND_SZ), $(path)}}
  6608. ifstr $(KeyCp) != $(KeyNull)
  6609. Shell "utility.inf", AddValueList, $(KeyCp), +
  6610. $(NewValueList)
  6611. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  6612. Debug-Output "UpdateCPList:AddValueList bombed out"
  6613. goto UpdateCPListEnd
  6614. endif
  6615. set RegistryErrorIndex = $($R0)
  6616. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  6617. goto UpdateCPListEnd
  6618. endif
  6619. CloseRegKey $(KeyCp)
  6620. else
  6621. Debug-Output "UpdateCPList:error creating key"
  6622. endif
  6623. endif
  6624. endforlistdo
  6625. CloseRegKey $(KeyRasManPPP)
  6626. else
  6627. Debug-Output "UpdateCPList:error opening RASMAN\PPP key"
  6628. goto UpdateCPListEnd
  6629. endif
  6630. set Status = STATUS_SUCCESSFUL
  6631. UpdateCPListEnd =+
  6632. Debug-Output "UpdateCPList: exit"
  6633. return $(Status)
  6634. [UpdateSoftwareType]
  6635. ; this routine mofifies \\Software\<manufacturer>\<Product>\CurrentVersion!SoftwareType
  6636. ; to correctly list a supported type
  6637. ;
  6638. Debug-Output "UpdateSoftwareType: entry"
  6639. set ProductKeyName = $(!NTN_SoftwareBase)"\Microsoft\RAS\CurrentVersion"
  6640. set Status = STATUS_FAILED
  6641. set KeyCurrentVersion = ""
  6642. OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(!MAXIMUM_ALLOWED) KeyCurrentVersion
  6643. ifstr $(KeyCurrentVersion) == ""
  6644. Debug-Output "OEMNSVRA.INF:UpdateSoftwareType: couldn't open "$(ProductKeyName)
  6645. goto UpdateSoftwareTypeEnd
  6646. endif
  6647. SetRegValue $(KeyCurrentVersion) {SoftwareType, 0, $(!REG_VT_SZ), "service" }
  6648. CloseRegKey $(KeyCurrentVersion)
  6649. set Status = STATUS_SUCCESSFUL
  6650. UpdateSoftwareTypeEnd=+
  6651. Debug-Output "UpdateSoftwareType: exit"
  6652. return $(Status)
  6653. [UpdateLLInterface]
  6654. ; then update the NdisWanx\Parameters\TCPIP\LLInterface key with RasArp value
  6655. ; while we are at it also set the IPAddress, SubnetMask, DefaultGateway and
  6656. ; EnableDHCP values of each NdisWan adapter bound to TcpIp
  6657. ; Modified on 9/19/96 by RamC for routing related changes
  6658. ; WanArp replaces RasArp, so update the NdisWanx\Parameters\TCPIP\LLInterface key with
  6659. ; WanArp value. Also set WanArp\Linkage\Bind to the list of NdisWan devices bound to
  6660. ; Tcp/Ip and set WanArp\Parameters\NdisWanAdapter to one of the NdisWan adapters bound to
  6661. ; Tcp/Ip
  6662. Debug-Output "UpdateLLInterface: entry"
  6663. set Status = STATUS_FAILED
  6664. set KeyNull = ""
  6665. ; set LLInterface = "\Device\RASARP"
  6666. set LLInterface = "\Device\WANARP"
  6667. ; find out which one of the NdisWan adapters is bound to the IP stack
  6668. ; we do this by looking in the Linkage key of IP service
  6669. set KeyIpLinkage = $(KeyNull)
  6670. set IPLinkageKeyName = $(!NTN_ServiceBase)"\TCPIP\Linkage"
  6671. OpenRegKey $(!REG_H_LOCAL) "" $(IPLinkageKeyName) $(!MAXIMUM_ALLOWED) KeyIpLinkage
  6672. ifstr $(KeyIpLinkage) == $(KeyNull)
  6673. Debug-Output "OEMNSVRA.INF:UpdateLLInterface: couldn't open IP Linkage key"
  6674. goto UpdateLLInterfaceEnd
  6675. endif
  6676. ; create a list of NdisWan adapters bound to TcpIp
  6677. set NdisWanList = {}
  6678. set DeviceList = {}
  6679. GetRegValue $(KeyIpLinkage) "Bind" TmpList
  6680. ForListDo *($(TmpList),4)
  6681. Split-String $($), "\", BindList
  6682. QueryListSize ListSize $(BindList)
  6683. set ServiceName = *($(BindList), $(ListSize))
  6684. LibraryProcedure Result $(!LIBHANDLE) SetupStrncmp $(ServiceName) "NdisWan" 7
  6685. ifint $(Result) == 0
  6686. set NdisWanList = >($(NdisWanList), $(ServiceName))
  6687. set DeviceList = >($(DeviceList), $($))
  6688. endif
  6689. EndForListDo
  6690. CloseRegKey $(KeyIpLinkage)
  6691. ; Find out which of the NdisWan Adapters is the server adapter
  6692. set NdisWanServerAdapter = ""
  6693. ForListDo $(NdisWanList)
  6694. set ServiceKeyName = $(!NTN_ServiceBase)"\"$($)"\Parameters"
  6695. OpenRegKey $(!REG_H_LOCAL) "" $(ServiceKeyName) $(!MAXIMUM_ALLOWED) KeyNdisWan
  6696. ifstr $(KeyNdisWan) != $(KeyNull)
  6697. GetRegValue $(KeyNdisWan) "ServerAdapter" KeyValue
  6698. ifint $(RegLastError) == 0
  6699. ifint *($(KeyValue), 4) == 1
  6700. set NdisWanServerAdapter = "\Device\"$($)
  6701. endif
  6702. endif
  6703. CloseRegKey $(KeyNdisWan)
  6704. endif
  6705. EndForListDo
  6706. ; Now set WanArp\Linkage\Bind to the list of Ndiswan devices bound to TcpIp
  6707. ; and set WanArp\Parameters\NdisWanAdapter value to the first device from
  6708. ; the DeviceList
  6709. ; also set WanArp\Parameters\NdisWanServerAdapter value to the NdisWan
  6710. ; adapter that has ServerAdapter value set to 1
  6711. set ListSize = 0
  6712. QueryListSize ListSize $(DeviceList)
  6713. ifint $(ListSize) >= 1
  6714. set KeyLinkage = $(KeyNull)
  6715. set KeyParam = $(KeyNull)
  6716. set WanArpLinkageKeyName = $(!NTN_ServiceBase)"\WanArp\Linkage"
  6717. set WanArpParamKeyName = $(!NTN_ServiceBase)"\WanArp\Parameters"
  6718. OpenRegKey $(!REG_H_LOCAL) "" $(WanArpLinkageKeyName) $(!MAXIMUM_ALLOWED) KeyLinkage
  6719. ifstr $(KeyLinkage) != $(KeyNull)
  6720. SetRegValue $(KeyLinkage) {Bind, 0, $(!REG_VT_MULTI_SZ), $(DeviceList)}
  6721. CloseRegKey $(KeyLinkage)
  6722. else
  6723. Debug-Output "OEMNSVRA.INF:UpdateLLInterface: couldn't open WANARP Linkage key"
  6724. endif
  6725. OpenRegKey $(!REG_H_LOCAL) "" $(WanArpParamKeyName) $(!MAXIMUM_ALLOWED) KeyParam
  6726. ifstr $(KeyParam) != $(KeyNull)
  6727. SetRegValue $(KeyParam) {NdisWanAdapter, 0, $(!REG_VT_SZ), *($(DeviceList), 1)}
  6728. SetRegValue $(KeyParam) {NdisWanServerAdapter, 0, $(!REG_VT_SZ), $(NdisWanServerAdapter)}
  6729. CloseRegKey $(KeyParam)
  6730. else
  6731. Debug-Output "OEMNSVRA.INF:UpdateLLInterface: couldn't open WANARP Parameters key"
  6732. endif
  6733. endif
  6734. set ListSize = 0
  6735. QueryListSize ListSize $(NdisWanList)
  6736. ifint $(ListSize) >= 1
  6737. ForListDo $(NdisWanList)
  6738. set ServiceKeyName = $(!NTN_ServiceBase)"\"$($)"\Parameters\TCPIP"
  6739. OpenRegKey $(!REG_H_LOCAL) "" $(ServiceKeyName) $(!MAXIMUM_ALLOWED) KeyNdisWan
  6740. ifstr $(KeyNdisWan) != $(KeyNull)
  6741. SetRegValue $(KeyNdisWan) {IPAddress, 0, +
  6742. $(!REG_VT_MULTI_SZ), {"0.0.0.0"}}
  6743. SetRegValue $(KeyNdisWan) {SubnetMask, 0, +
  6744. $(!REG_VT_MULTI_SZ), {"0.0.0.0"}}
  6745. SetRegValue $(KeyNdisWan) {DefaultGateway, 0, +
  6746. $(!REG_VT_MULTI_SZ), {""}}
  6747. SetRegValue $(KeyNdisWan) {LLInterface, 0,+
  6748. $(!REG_VT_SZ), $(LLInterface)}
  6749. SetRegValue $(KeyNdisWan) {EnableDHCP, 0, +
  6750. $(!REG_VT_DWORD), 0}
  6751. else
  6752. CreateRegKey $(!REG_H_LOCAL) +
  6753. {$(ServiceKeyName),0,GenericClass} "" +
  6754. $(!MAXIMUM_ALLOWED) "" KeyNdisWan
  6755. ifstr $(KeyNdisWan) != $(KeyNull)
  6756. SetRegValue $(KeyNdisWan) {IPAddress, 0, +
  6757. $(!REG_VT_MULTI_SZ), {"0.0.0.0"}}
  6758. SetRegValue $(KeyNdisWan) {SubnetMask, 0, +
  6759. $(!REG_VT_MULTI_SZ), {"0.0.0.0"}}
  6760. SetRegValue $(KeyNdisWan) {DefaultGateway, 0, +
  6761. $(!REG_VT_MULTI_SZ), {""}}
  6762. SetRegValue $(KeyNdisWan) {LLInterface, 0,+
  6763. $(!REG_VT_SZ), $(LLInterface)}
  6764. SetRegValue $(KeyNdisWan) {EnableDHCP, 0, +
  6765. $(!REG_VT_DWORD), 0}
  6766. SetRegValue $(KeyNdisWan) {UseZeroBroadcast, 0, +
  6767. $(!REG_VT_DWORD), 0}
  6768. else
  6769. Debug-Output "OEMNSVRA.INF:UpdateLLInterface: couldn't create NdisWan params-tcpip key"
  6770. goto UpdateLLInterfaceEnd
  6771. endif
  6772. endif
  6773. CloseRegKey $(KeyNdisWan)
  6774. EndForListDo
  6775. endif
  6776. set Status = STATUS_SUCCESSFUL
  6777. UpdateLLInterfaceEnd =+
  6778. Debug-Output "UpdateLLInterface: exit"
  6779. return $(Status)
  6780. [SetRasArpBindValueFromTcpIP]
  6781. ;Set the services\RasArp\Linkage\Bind to all NdisWan bindings of TCP/IP
  6782. Debug-Output "SetRasArpBindValueFromTcpIP: entry"
  6783. set Status = STATUS_FAILED
  6784. set KeyNull = ""
  6785. ; find out which one of the NdisWan adapters is bound to the IP stack
  6786. ; we do this by looking in the Linkage key of IP service
  6787. set IPLinkageKeyName = $(!NTN_ServiceBase)"\TCPIP\Linkage"
  6788. OpenRegKey $(!REG_H_LOCAL) "" $(IPLinkageKeyName) $(!MAXIMUM_ALLOWED) KeyIpLinkage
  6789. ifstr $(KeyIpLinkage) == $(KeyNull)
  6790. Debug-Output "OEMNSVRA.INF:SetRasArpBindValueFromTcpIP: couldn't open IP Linkage key"
  6791. goto SetRasArpBindValueFromTcpIPEnd
  6792. endif
  6793. set NdisWanList = {}
  6794. GetRegValue $(KeyIpLinkage) "Bind" TmpList
  6795. ForListDo *($(TmpList),4)
  6796. Split-String $($), "\", BindList
  6797. QueryListSize ListSize $(BindList)
  6798. set ServiceName = *($(BindList), $(ListSize))
  6799. LibraryProcedure Result $(!LIBHANDLE) SetupStrncmp $(ServiceName) "NdisWan" 7
  6800. ifint $(Result) == 0
  6801. set NdisWanList = >($(NdisWanList), $($))
  6802. endif
  6803. EndForListDo
  6804. set RasArpLinkageKeyName = $(!NTN_ServiceBase)"\RASARP\Linkage"
  6805. OpenRegKey $(!REG_H_LOCAL) "" $(RasArpLinkageKeyName) $(!MAXIMUM_ALLOWED) KeyRasArpLinkage
  6806. ifstr $(KeyRasArpLinkage) != $(KeyNull)
  6807. SetRegValue $(KeyRasArpLinkage) {Bind, 0, $(!REG_VT_MULTI_SZ), $(NdisWanList)}
  6808. CloseRegKey $(KeyRasArpLinkage)
  6809. endif
  6810. CloseRegKey $(KeyIpLinkage)
  6811. set Status = STATUS_SUCCESSFUL
  6812. SetRasArpBindValueFromTcpIPEnd=+
  6813. Debug-Output "SetRasArpBindValueFromTcpIP: entry"
  6814. return $(Status)
  6815. [UpdateNetGroupDependency]
  6816. ; set the DependOnGroup and OtherDependencies parameter of the corresponding
  6817. ; service to NDISWAN. This will ensure that in a no netcard installation of ras
  6818. ; the ras drivers would be forced to load
  6819. Set Status = STATUS_SUCCESSFUL
  6820. set KeyNull = ""
  6821. set fNetbeuiInstalled = $($0)
  6822. set fTcpIpInstalled = $($1)
  6823. set fIpxInstalled = $($2)
  6824. Debug-Output "UpdateNetGroupDependency entry"
  6825. set ServiceList = {}
  6826. ifstr(i) $(fNetbeuiInstalled) == TRUE
  6827. set ServiceList = >($(ServiceList), "nbf")
  6828. endif
  6829. ifstr(i) $(fTcpIpInstalled) == TRUE
  6830. set ServiceList = >($(ServiceList), "tcpip")
  6831. endif
  6832. ifstr(i) $(fIpxInstalled) == TRUE
  6833. set ServiceList = >($(ServiceList), "nwlnkipx")
  6834. endif
  6835. ForListDo $(ServiceList)
  6836. set Service = $($)
  6837. Debug-Output "OEMNSVRA.INF: Changing group dependency of "$(Service)
  6838. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(Service) +
  6839. $(!MAXIMUM_ALLOWED) KeyService
  6840. ifstr $(KeyService) != $(KeyNull)
  6841. set newGroupList = {"+NDIS", "+NDISWAN"}
  6842. GetRegValue $(KeyService) "DependOnGroup" GrpList
  6843. ifint $(RegLastError) == 0
  6844. Debug-Output "UpdateNetGroupDependency: old group List "*($(GrpList), 4)
  6845. ForListDo *($(GrpList),4)
  6846. ifstr(i) $($) != "NDIS"
  6847. ifstr(i) $($) != "NDISWAN"
  6848. set newGroup = "+"$($)
  6849. set newGroupList = >($(newGroupList), $(newGroup))
  6850. endif
  6851. endif
  6852. EndForListDo
  6853. endif
  6854. GetRegValue $(KeyService) "DependOnService" ServiceList
  6855. ifint $(RegLastError) == 0
  6856. Debug-Output "UpdateNetGroupDependency: old service List "*($(ServiceList), 4)
  6857. ForListDo *($(ServiceList),4)
  6858. set newGroupList = >($(newGroupList), $($))
  6859. EndForListDo
  6860. endif
  6861. Debug-Output "OEMNSVRA.INF: UpdateNetGroupDependency: new depend List "$(newGroupList)
  6862. LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, $(Service) $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), "", "", $(newGroupList), "", "", ""
  6863. CloseRegKey $(KeyService)
  6864. else
  6865. Debug-Output "UpdateNetGroupDependency: failed to open service linkage key"$(Service)
  6866. endif
  6867. EndForListDo
  6868. Debug-Output "UpdateNetGroupDependency exit"
  6869. return $(Status)
  6870. [RemoveNetGroupDependency]
  6871. ;Remove transport dependency on group NDISWAN
  6872. Set Status = STATUS_SUCCESSFUL
  6873. set KeyNull = ""
  6874. set fNetbeuiInstalled = $($0)
  6875. set fTcpIpInstalled = $($1)
  6876. set fIpxInstalled = $($2)
  6877. Debug-Output "UpdateNetGroupDependency entry"
  6878. set ServiceList = {"nbf", "tcpip", "nwlnkipx"}
  6879. ForListDo $(ServiceList)
  6880. set Service = $($)
  6881. Debug-Output "OEMNSVRA.INF: Changing group dependency of "$(Service)
  6882. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(Service) +
  6883. $(!MAXIMUM_ALLOWED) KeyService
  6884. ifstr $(KeyService) != $(KeyNull)
  6885. ; check whether the service is marked for deletion
  6886. set DeleteFlag = ""
  6887. GetRegValue $(KeyService),"DeleteFlag", DeleteFlagInfo
  6888. set DeleteFlag = *($(DeleteFlagInfo), 4)
  6889. ifint $(DeleteFlag) != 1
  6890. set newGroupList = {}
  6891. GetRegValue $(KeyService) "DependOnGroup" GrpList
  6892. ifint $(RegLastError) == 0
  6893. Debug-Output "UpdateNetGroupDependency: old List "*($(GrpList), 4)
  6894. ForListDo *($(GrpList),4)
  6895. ifstr(i) $($) != "NDISWAN"
  6896. set newGroup = "+"$($)
  6897. set newGroupList = >($(newGroupList), $(newGroup))
  6898. endif
  6899. EndForListDo
  6900. endif
  6901. GetRegValue $(KeyService) "DependOnService" ServiceList
  6902. ifint $(RegLastError) == 0
  6903. Debug-Output "UpdateNetGroupDependency: old service List "*($(ServiceList), 4)
  6904. ForListDo *($(ServiceList),4)
  6905. set newGroupList = >($(newGroupList), $($))
  6906. EndForListDo
  6907. endif
  6908. Debug-Output "OEMNSVRA.INF: UpdateNetGroupDependency: new depend List "$(newGroupList)
  6909. LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, $(Service) $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), "", "", $(newGroupList), "", "", ""
  6910. CloseRegKey $(KeyService)
  6911. endif
  6912. else
  6913. Debug-Output "UpdateNetGroupDependency: failed to open service linkage key"$(Service)
  6914. endif
  6915. EndForListDo
  6916. Debug-Output "UpdateNetGroupDependency exit"
  6917. return $(Status)
  6918. [UpdateIPRouterInfo]
  6919. ; set the IPEnableRouter parameter in TCPIP\Parameters based on input param 1
  6920. set EnableRouter = $($0)
  6921. set KeyNull = ""
  6922. Debug-Output "UpdateIPRouterInfo entry"
  6923. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\TCPIP\parameters" $(!MAXIMUM_ALLOWED) KeyIpParams
  6924. ifstr $(KeyIpParams) != $(KeyNull)
  6925. SetRegValue $(KeyIpParams) {IPEnableRouter, 0,+
  6926. $(!REG_VT_DWORD), $(EnableRouter)}
  6927. CloseRegKey $(KeyIpParams)
  6928. endif
  6929. Debug-Output "UpdateIPRouterInfo exit"
  6930. return STATUS_SUCCESSFUL
  6931. [UpdateIPXRouterInfo]
  6932. ; Set the DisableWanTraffic parameter in NWLNKIPX\NetConfig\Driverxx key to
  6933. ; the passed in value of EnableRouter
  6934. set Status = STATUS_FAILED
  6935. set EnableRouter = $($0)
  6936. set KeyNull = ""
  6937. Debug-Output "UpdateIPXRouterInfo entry"
  6938. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NWLNKIPX\NetConfig" $(!MAXIMUM_ALLOWED) KeyIpxNetConfig
  6939. ifstr $(KeyIpxNetConfig) != $(KeyNull)
  6940. EnumRegKey $(KeyIpxNetConfig) DriverList
  6941. ForListDo $(DriverList)
  6942. set DriverName = *($($),1)
  6943. OpenRegKey $(KeyIpxNetConfig) "" $(DriverName) $(!MAXIMUM_ALLOWED) Driver
  6944. ifstr $(Driver) == $(KeyNull)
  6945. Debug-Output "UpdateIPXRouterInfo: could not open key ipx\netconfig\"$(DriverName)
  6946. CloseRegKey $(KeyIpxNetConfig)
  6947. return $(Status)
  6948. endif
  6949. SetRegValue $(Driver) {EnableWanRouter, 0,+
  6950. $(!REG_VT_DWORD), $(EnableRouter)}
  6951. CloseRegKey $(Driver)
  6952. EndForListDo
  6953. CloseRegKey $(KeyIpxNetConfig)
  6954. set Status = STATUS_SUCCESSFUL
  6955. else
  6956. Debug-Output "UpdateIPXRouterInfo: error opening ipx\netconfig key"
  6957. endif
  6958. Debug-Output "UpdateIPXRouterInfo exit"
  6959. return $(Status)
  6960. [IsNetcardInstalled]
  6961. ; determine if a network card is installed on the system.
  6962. ; Return TRUE if a non-ras network card is installed, FALSE otherwise.
  6963. Set Status = STATUS_FAILED
  6964. Set fNetcardInstalled = FALSE
  6965. Set KeyNull = ""
  6966. set ProductRASASYMACName = "AsyncMac"
  6967. set NetworkCardKey = $(KeyNull)
  6968. OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) NetworkCardKey
  6969. Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  6970. set NetcardsList = {}
  6971. EnumRegKey $(NetworkCardKey) NetcardsList
  6972. Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  6973. Debug-Output "IsNetcardInstalled: EnumRegKey failed."
  6974. goto IsNetcardInstalledEnd
  6975. endif
  6976. ; go down the list of installed netcards and determine if there are
  6977. ; any netcards which are not AsyncMac, NdiswanDialin or NdiswanDialout
  6978. ForListDo $(NetcardsList)
  6979. set KeyName = *($($),1)
  6980. set Card = $(KeyNull)
  6981. OpenRegKey $(NetworkCardKey) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  6982. ifstr $(Card) == $(KeyNull)
  6983. Debug-Output "IsNetcardInstalled: could not open netcard key "$(KeyName)
  6984. else
  6985. GetRegValue $(Card), "ProductName" ProductNameInfo
  6986. Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  6987. Debug-Output "IsNetcardInstalled: ProductName not found."
  6988. else
  6989. set CardProductName = *($(ProductNameInfo), 4)
  6990. Debug-Output "IsNetcardInstalled: ProductName. "$(CardProductName)
  6991. ifstr(i) $(CardProductName) != $(!ProductNDISWANName)
  6992. ifstr(i) $(CardProductName) != $(!ProductNDISWANDIALINName)
  6993. ifstr(i) $(CardProductName) != $(!ProductNDISWANDIALOUTName)
  6994. ifstr(i) $(CardProductName) != $(!ProductNDISWANDIALINIPName)
  6995. ifstr(i) $(CardProductName) != $(!ProductNDISWANDIALOUTIPName)
  6996. ifstr(i) $(CardProductName) != $(!ProductNDISWANDIALINOUTIPXName)
  6997. ifstr(i) $(CardProductName) != $(ProductRASASYMACName)
  6998. ifstr(i) $(CardProductName) != $(!ProductPCIMACName)
  6999. GetRegValue $(Card), "Manufacturer" Manufacturer
  7000. Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  7001. ; if the Manufacturer is Digiboard then this
  7002. ; is more than likely a multi-port adapter and
  7003. ; not a net card. so check that.
  7004. ifstr(i) *($(Manufacturer), 4) != "Digiboard"
  7005. Debug-Output "found installed netcard"
  7006. set fNetcardInstalled = TRUE
  7007. set Status = STATUS_SUCCESSFUL
  7008. CloseRegKey $(Card)
  7009. goto IsNetcardInstalledEnd
  7010. endif
  7011. endif
  7012. endif
  7013. endif
  7014. endif
  7015. endif
  7016. endif
  7017. endif
  7018. endif
  7019. endif
  7020. endif
  7021. CloseRegKey $(Card)
  7022. endif
  7023. EndForListDo
  7024. else
  7025. Debug-Output "IsNetcardInstalled: failed to open "$(!NetworkCardKeyName)
  7026. endif
  7027. IsNetcardInstalledEnd =+
  7028. ifstr(i) $(NetworkCardKey) != $(KeyNull)
  7029. CloseRegKey $(NetworkCardKey)
  7030. endif
  7031. Return $(Status) $(fNetcardInstalled)
  7032. [IsNetworkConfigured]
  7033. ; determine if the lanman workstation isinstalled on the system.
  7034. set WkstaKeyName = $(!NTN_ServiceBase)"\LanmanWorkstation"
  7035. set SrvrKeyName = $(!NTN_ServiceBase)"\LanmanServer"
  7036. Set KeyNull = ""
  7037. Set status = STATUS_FAILED
  7038. Set WkstaConfigured = FALSE
  7039. Set SrvrConfigured = FALSE
  7040. Debug-Output "IsNetworkConfigured WkstaKeyName "$(WkstaKeyName)
  7041. set KeyProduct = $(KeyNull)
  7042. OpenRegKey $(!REG_H_LOCAL) "" $(WkstaKeyName) $(!MAXIMUM_ALLOWED) KeyProduct
  7043. Ifstr(i) $(KeyProduct) != $(KeyNull)
  7044. GetRegValue $(KeyProduct),"DeleteFlag", DeleteFlagInfo
  7045. set DeleteFlag = *($(DeleteFlagInfo), 4)
  7046. ifint $(DeleteFlag) != 1
  7047. set WkstaConfigured = TRUE
  7048. endif
  7049. CloseRegKey $(KeyProduct)
  7050. endif
  7051. Debug-Output "IsNetworkConfigured SrvrKeyName "$(SrvrKeyName)
  7052. set KeyProduct = $(KeyNull)
  7053. OpenRegKey $(!REG_H_LOCAL) "" $(SrvrKeyName) $(!MAXIMUM_ALLOWED) KeyProduct
  7054. Ifstr(i) $(KeyProduct) != $(KeyNull)
  7055. GetRegValue $(KeyProduct),"DeleteFlag", DeleteFlagInfo
  7056. set DeleteFlag = *($(DeleteFlagInfo), 4)
  7057. ifint $(DeleteFlag) != 1
  7058. set SrvrConfigured = TRUE
  7059. endif
  7060. CloseRegKey $(KeyProduct)
  7061. endif
  7062. set status = STATUS_SUCCESSFUL
  7063. Debug-Output "IsNetworkConfigured exit"
  7064. Return $(status) $(WkstaConfigured) $(SrvrConfigured)
  7065. [QueryInstalledProtocols]
  7066. ; determine if Nbf, Tcpip and Ipx transports are installed in the system
  7067. Debug-Output "QueryInstalledProtocols entry "
  7068. set NbfKeyName = $(!NTN_ServiceBase)"\Nbf"
  7069. set TcpIpKeyName = $(!NTN_ServiceBase)"\TcpIp"
  7070. set IpxKeyName = $(!NTN_ServiceBase)"\NWLNKIPX"
  7071. set AppleTalkKeyName = $(!NTN_ServiceBase)"\AppleTalk"
  7072. Set KeyNull = ""
  7073. Set status = STATUS_FAILED
  7074. Set NbfInstalled = FALSE
  7075. Set TcpIpInstalled = FALSE
  7076. Set IpxInstalled = FALSE
  7077. Set AppleTalkInstalled = FALSE
  7078. set KeyService = $(KeyNull)
  7079. set DeleteFlag = 0
  7080. set DeleteFlagInfo = {}
  7081. OpenRegKey $(!REG_H_LOCAL) "" $(NbfKeyName) $(!MAXIMUM_ALLOWED) KeyService
  7082. Ifstr(i) $(KeyService) != $(KeyNull)
  7083. ; check whether it is marked for deletion
  7084. GetRegValue $(KeyService),"DeleteFlag", DeleteFlagInfo
  7085. set DeleteFlag = *($(DeleteFlagInfo), 4)
  7086. ifint $(DeleteFlag) != 1
  7087. set NbfInstalled = TRUE
  7088. endif
  7089. CloseRegKey $(KeyService)
  7090. endif
  7091. set KeyService = $(KeyNull)
  7092. set DeleteFlag = 0
  7093. set DeleteFlagInfo = {}
  7094. OpenRegKey $(!REG_H_LOCAL) "" $(TcpIpKeyName) $(!MAXIMUM_ALLOWED) KeyService
  7095. Ifstr(i) $(KeyService) != $(KeyNull)
  7096. ; check whether it is marked for deletion
  7097. GetRegValue $(KeyService),"DeleteFlag", DeleteFlagInfo
  7098. set DeleteFlag = *($(DeleteFlagInfo), 4)
  7099. ifint $(DeleteFlag) != 1
  7100. set TcpIpInstalled = TRUE
  7101. endif
  7102. CloseRegKey $(KeyService)
  7103. endif
  7104. set KeyService = $(KeyNull)
  7105. set DeleteFlag = 0
  7106. set DeleteFlagInfo = {}
  7107. OpenRegKey $(!REG_H_LOCAL) "" $(IpxKeyName) $(!MAXIMUM_ALLOWED) KeyService
  7108. Ifstr(i) $(KeyService) != $(KeyNull)
  7109. ; check whether it is marked for deletion
  7110. GetRegValue $(KeyService),"DeleteFlag", DeleteFlagInfo
  7111. set DeleteFlag = *($(DeleteFlagInfo), 4)
  7112. ifint $(DeleteFlag) != 1
  7113. set IpxInstalled = TRUE
  7114. endif
  7115. CloseRegKey $(KeyService)
  7116. endif
  7117. set KeyService = $(KeyNull)
  7118. set DeleteFlag = 0
  7119. set DeleteFlagInfo = {}
  7120. OpenRegKey $(!REG_H_LOCAL) "" $(AppleTalkKeyName) $(!MAXIMUM_ALLOWED) KeyService
  7121. Ifstr(i) $(KeyService) != $(KeyNull)
  7122. ; check whether it is marked for deletion
  7123. GetRegValue $(KeyService),"DeleteFlag", DeleteFlagInfo
  7124. set DeleteFlag = *($(DeleteFlagInfo), 4)
  7125. ifint $(DeleteFlag) != 1
  7126. set AppleTalkInstalled = TRUE
  7127. endif
  7128. CloseRegKey $(KeyService)
  7129. endif
  7130. set status = STATUS_SUCCESSFUL
  7131. Debug-Output "QueryInstalledProtocols exit"
  7132. Return $(status) $(NbfInstalled) $(TcpIpInstalled) $(IpxInstalled) +
  7133. $(AppleTalkInstalled)
  7134. [ProtocolInfo]
  7135. ; this information is used by InstallProtocol
  7136. ; protocol name INF file, Option name, bill board index
  7137. NETBEUI = "OEMNXPNB.INF", "NBF", 1
  7138. TCPIP = "OEMNXPTC.INF", "TC", 2
  7139. IPX = "OEMNXPIP.INF", "NWLNKIPX", 3
  7140. [InstallProtocol]
  7141. ; install the specified protocol in parameter 1, by shelling the
  7142. ; respective inf file.
  7143. Set Status = STATUS_FAILED
  7144. Set KeyNull = ""
  7145. set Protocol = $($0)
  7146. ; protocol name INF name, Option name, Bill board index
  7147. Debug-Output "OEMNSVRA.INF: Label: InstallProtocol"
  7148. Set ThisInfName = #(ProtocolInfo, $(Protocol), 1)
  7149. Set InfOption = #(ProtocolInfo, $(Protocol), 2)
  7150. Set BbIndex = #(ProtocolInfo, $(Protocol), 3)
  7151. Debug-Output "OEMNSVRA.INF: Installing "$(ThisInfName)
  7152. Ifint $(BbIndex) != 0
  7153. read-syms Billboard$(BbIndex)$(!STF_LANGUAGE)
  7154. Shell "subroutn.inf" PushBillboard NETSTATUSDLG $(Status)
  7155. Set BillboardVisible = 1
  7156. Else-ifint $(BillboardVisible) != 0
  7157. Shell "subroutn.inf" PopBillboard
  7158. Set BillboardVisible = 0
  7159. Endif
  7160. ; set the flags based on what phase we are in and whether this is an
  7161. ; IDW installation
  7162. set AddCopy = YES
  7163. set DoCopy = YES
  7164. set DoConfig = YES
  7165. ; indicate to the invoked INF file that RAS setup is invoking them
  7166. ; this is required because if RAS installed these protocols then those
  7167. ; INF files should not display a popup that they should configure RAS
  7168. ; after installing the respective protocols.
  7169. set InvokedByRas = YES
  7170. ; save !NTN_InstallMode and change it to install before shelling the
  7171. ; inf file.
  7172. ; save !STF_INSTALL_MODE and change it to EXPRESS before shelling the
  7173. ; inf file - this triggers the silent mode of install.
  7174. set SaveNTN_InstallMode = $(!NTN_InstallMode)
  7175. set SaveSTF_INSTALL_MODE = $(!STF_INSTALL_MODE)
  7176. set !NTN_InstallMode = install
  7177. set !STF_INSTALL_MODE = EXPRESS
  7178. Shell $(ThisInfName) InstallOption $(!STF_LANGUAGE) $(InfOption) $(!STF_SRCDIR) $(AddCopy) $(DoCopy) $(DoConfig) $(InvokedByRas)
  7179. ; restore the environment variables
  7180. set !NTN_InstallMode = $(SaveNTN_InstallMode)
  7181. set !STF_INSTALL_MODE = $(SaveSTF_INSTALL_MODE)
  7182. Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  7183. Debug-Output "OEMNSVRA.INF: INF "$(ThisInfName)" SHELL ERROR!"
  7184. Goto InstallProtocolEscape
  7185. Endif
  7186. Set InstallProtocolStatus = $($R0)
  7187. Ifstr(i) $(InstallProtocolStatus) != STATUS_SUCCESSFUL
  7188. Ifstr(i) $(InstallProtocolStatus) != STATUS_USERCANCEL
  7189. Debug-Output "OEMNSVRA.INF: INF "$(ThisInfName)" returned "$(InstallProtocolStatus)
  7190. Goto InstallProtocolEscape
  7191. Endif
  7192. Endif
  7193. InstallProtocolEscape = +
  7194. set Status = $(InstallProtocolStatus)
  7195. return $(Status)
  7196. [UpgradeSelectedProtocols]
  7197. ; upgrade the user selected protocols info in the
  7198. ; SOFTWARE\Microsoft\RAS\Protocols key. This procedure
  7199. ; is called during Upgrade of the product.
  7200. ; 10/9/95 added the new Multilink key and value which is defaulted to 0 (disabled) if
  7201. ; not present.
  7202. Debug-Output "UpgradeSelectedProtocols entry."
  7203. set Status = STATUS_FAILED
  7204. Set KeyNull = ""
  7205. set RasKeyName = $(!NTN_SoftwareBase)"\Microsoft\Ras"
  7206. set RasProtocolName = $(!NTN_SoftwareBase)"\Microsoft\Ras\Protocols"
  7207. set RasServiceParmName = $(!NTN_ServiceBase)"\Remoteaccess\Parameters"
  7208. set AsyMacServiceParmName = $(!NTN_ServiceBase)"\AsyncMac\Parameters"
  7209. set RasManPPPName = $(!NTN_ServiceBase)"\RasMan\PPP"
  7210. ; first get the NetBiosGatewayEnabled parameter value. This tells us
  7211. ; how the system was configured earlier for us to set the protocol info.
  7212. set GtwyEnabled = 1
  7213. OpenRegKey $(!REG_H_LOCAL) "" $(RasServiceParmName) $(!MAXIMUM_ALLOWED) KeyParam
  7214. ifstr $(KeyParam) != $(KeyNull)
  7215. GetRegValue $(KeyParam), "NetBiosGatewayEnabled", GtwyEnabledList
  7216. ifint $(RegLastError) == 0
  7217. set GtwyEnabled = *($(GtwyEnabledList), 4)
  7218. endif
  7219. CloseRegKey $(KeyParam)
  7220. else
  7221. Debug-Output "UpgradeSelectedProtocols: error opening RemoteAccess\Parameters key"
  7222. endif
  7223. ; now get the number of configured ports for each protocol
  7224. set DialinNBF = 0
  7225. set DialinIP = 0
  7226. set DialoutNBF = 0
  7227. set DialoutIP = 0
  7228. set DialinoutIPX = 0
  7229. OpenRegKey $(!REG_H_LOCAL) "" $(AsyMacServiceParmName) $(!MAXIMUM_ALLOWED) KeyParam
  7230. ifstr $(KeyParam) != $(KeyNull)
  7231. GetRegValue $(KeyParam), "DialinNBF", DialinNBFList
  7232. ifint $(RegLastError) == 0
  7233. set DialinNBF = *($(DialinNBFList), 4)
  7234. endif
  7235. GetRegValue $(KeyParam), "DialinIP", DialinIPList
  7236. ifint $(RegLastError) == 0
  7237. set DialinIP = *($(DialinIPList), 4)
  7238. endif
  7239. GetRegValue $(KeyParam), "DialoutNBF", DialoutNBFList
  7240. ifint $(RegLastError) == 0
  7241. set DialoutNBF = *($(DialoutNBFList), 4)
  7242. endif
  7243. GetRegValue $(KeyParam), "DialoutIP", DialoutIPList
  7244. ifint $(RegLastError) == 0
  7245. set DialoutIP = *($(DialoutIPList), 4)
  7246. endif
  7247. GetRegValue $(KeyParam), "DialinoutIPX", DialinoutIPXList
  7248. ifint $(RegLastError) == 0
  7249. set DialinoutIPX = *($(DialinoutIPXList), 4)
  7250. endif
  7251. CloseRegKey $(KeyParam)
  7252. else
  7253. Debug-Output "UpgradeSelectedProtocols: error opening AsyncMac\Parameters key"
  7254. endif
  7255. set fDownLevel = FALSE
  7256. OpenRegKey $(!REG_H_LOCAL) "" $(RasProtocolName) $(!MAXIMUM_ALLOWED) RasProtocolKey
  7257. ifstr $(RasProtocolKey) == $(KeyNull)
  7258. ; we are dealing with a NT3.1 system here
  7259. set fDownLevel = TRUE
  7260. OpenRegKey $(!REG_H_LOCAL) "" $(RasKeyName) $(!MAXIMUM_ALLOWED) RasKey
  7261. CreateRegKey $(RasKey) {"Protocols",0,GenericClass} "" $(!MAXIMUM_ALLOWED) "" RasProtocolKey
  7262. OpenRegKey $(RasKey) "" "Protocols" $(!MAXIMUM_ALLOWED) RasProtocolKey
  7263. CloseRegKey $(RasKey)
  7264. endif
  7265. ifstr $(RasProtocolKey) != $(KeyNull)
  7266. ; The MultiLink value is new, if it is not set, then default it to 0 (disabled)
  7267. set MultilinkList = {}
  7268. GetRegValue $(RasProtocolKey), "Multilink", MultiLinkList
  7269. ifint $(RegLastError) != 0
  7270. Debug-Output "Upgradeselectedprotocols: defaulting Multilink to 0"
  7271. SetRegValue $(RasProtocolKey) {Multilink, 0, $(!REG_VT_DWORD), 0}
  7272. endif
  7273. ; xxxSelected means for dial-out and xxxAllowed means for dial-in
  7274. set NetbeuiSelected = 0
  7275. set NetbeuiAllowed = 0
  7276. set TcpIpSelected = 0
  7277. set TcpIpAllowed = 0
  7278. set IpxSelected = 0
  7279. set IpxAllowed = 0
  7280. ifint $(DialoutNBF) != 0
  7281. set NetbeuiSelected = 1
  7282. endif
  7283. ifint $(GtwyEnabled) == 1
  7284. ifint $(DialinNBF) != 0
  7285. set NetbeuiAllowed = 1
  7286. endif
  7287. else
  7288. ifint $(DialoutNBF) != 0
  7289. set NetbeuiAllowed = 1
  7290. endif
  7291. endif
  7292. ifstr(i) $(fDownLevel) != TRUE
  7293. ifint $(DialoutIP) != 0
  7294. set TcpIpSelected = 1
  7295. endif
  7296. ifint $(DialinIP) != 0
  7297. set TcpIpAllowed = 1
  7298. endif
  7299. ifint $(DialinoutIPX) != 0
  7300. set IpxSelected = 1
  7301. set IpxAllowed = 1
  7302. endif
  7303. endif
  7304. set ItemList = {}
  7305. GetRegValue $(RasProtocolKey), "fNetbeuiSelected", ItemList
  7306. ifint $(RegLastError) != 0
  7307. SetRegValue $(RasProtocolKey) {fNetbeuiSelected, 0,+
  7308. $(!REG_VT_DWORD),$(NetbeuiSelected)}
  7309. endif
  7310. GetRegValue $(RasProtocolKey), "fTcpIpSelected", ItemList
  7311. ifint $(RegLastError) != 0
  7312. SetRegValue $(RasProtocolKey) {fTcpIpSelected, 0,+
  7313. $(!REG_VT_DWORD),$(TcpIpSelected)}
  7314. endif
  7315. GetRegValue $(RasProtocolKey), "fIpxSelected", ItemList
  7316. ifint $(RegLastError) != 0
  7317. SetRegValue $(RasProtocolKey) {fIpxSelected, 0,+
  7318. $(!REG_VT_DWORD),$(IpxSelected)}
  7319. endif
  7320. GetRegValue $(RasProtocolKey), "fNetbeuiAllowed", ItemList
  7321. ifint $(RegLastError) != 0
  7322. SetRegValue $(RasProtocolKey) {fNetbeuiAllowed, 0,+
  7323. $(!REG_VT_DWORD),$(NetbeuiAllowed)}
  7324. endif
  7325. GetRegValue $(RasProtocolKey), "fTcpIpAllowed", ItemList
  7326. ifint $(RegLastError) != 0
  7327. SetRegValue $(RasProtocolKey) {fTcpIpAllowed, 0,+
  7328. $(!REG_VT_DWORD),$(TcpIpAllowed)}
  7329. endif
  7330. GetRegValue $(RasProtocolKey), "fIpxAllowed", ItemList
  7331. ifint $(RegLastError) != 0
  7332. SetRegValue $(RasProtocolKey) {fIpxAllowed, 0,+
  7333. $(!REG_VT_DWORD),$(IpxAllowed)}
  7334. endif
  7335. OpenRegKey $(RasProtocolKey) "" "NBF" $(!MAXIMUM_ALLOWED) NbfKey
  7336. ifstr $(NbfKey) == $(KeyNull)
  7337. CreateRegKey $(RasProtocolKey) {"NBF",0,GenericClass} "" $(!MAXIMUM_ALLOWED) "" NbfKey
  7338. SetRegValue $(NbfKey) {NetBiosGatewayEnabled, 0,+
  7339. $(!REG_VT_DWORD),$(GtwyEnabled)}
  7340. CloseRegKey $(NbfKey)
  7341. endif
  7342. ifstr(i) $(fDownLevel) != TRUE
  7343. OpenRegKey $(RasProtocolKey) "" "IP" $(!MAXIMUM_ALLOWED) IpKey
  7344. ifstr $(IpKey) != $(KeyNull)
  7345. GetRegValue $(IpKey), "AllowNetworkAccess", ItemList
  7346. ifint $(RegLastError) != 0
  7347. SetRegValue $(IpKey) {AllowNetworkAccess, 0,+
  7348. $(!REG_VT_DWORD),$(GtwyEnabled)}
  7349. endif
  7350. CloseRegKey $(IpKey)
  7351. endif
  7352. OpenRegKey $(RasProtocolKey) "" "IPX" $(!MAXIMUM_ALLOWED) IpxKey
  7353. ifstr $(IpxKey) != $(KeyNull)
  7354. GetRegValue $(IpxKey), "AllowNetworkAccess", ItemList
  7355. ifint $(RegLastError) != 0
  7356. SetRegValue $(IpxKey) {AllowNetworkAccess, 0,+
  7357. $(!REG_VT_DWORD),$(GtwyEnabled)}
  7358. endif
  7359. CloseRegKey $(IpxKey)
  7360. endif
  7361. endif
  7362. ; Now we need to update the encryption parameters.
  7363. ; if it is a NT3.1 server, these values are new and are defaulted
  7364. ; to MS encryption (2) and no data encryption (0).
  7365. ; If it is a daytona server (beta1) the ForceEncryptedData param
  7366. ; is new and is defaulted to 0, but the ForceEncryptedPassword
  7367. ; needs to be properly mapped to the new values.
  7368. ; If ForceEncryptedPassword = 0, then leave it as is.
  7369. ; If ForceEncryptedPassword = 1, then map it to the new value of
  7370. ; 2 for MS encryption.
  7371. ; if this is a Daytona (beta2 and greater) then leave the values
  7372. ; alone because the user could have configured them.
  7373. set ForceEncryptedPassword = 2
  7374. set ForceEncryptedData = 0
  7375. ifstr(i) $(fDownLevel) != TRUE
  7376. ; if the ForceEncryptedData parameter is not present then this
  7377. ; info needs to be upgraded.
  7378. GetRegValue $(RasProtocolKey), "ForceEncryptedData", DataList
  7379. ifint $(RegLastError) != 0
  7380. GetRegValue $(RasProtocolKey), "ForceEncryptedPassword", PasswdList
  7381. ifint $(RegLastError) == 0
  7382. set ForceEncryptedPassword = *($(PasswdList), 4)
  7383. ; if previously the value was set to 1, map it to MS Encryption
  7384. ifint $(ForceEncryptedPassword) == 1
  7385. set ForceEncryptedPassword = 2
  7386. endif
  7387. endif
  7388. else
  7389. goto UpgradeSelectedProtocolsEnd
  7390. endif
  7391. endif
  7392. SetRegValue $(RasProtocolKey) {ForceEncryptedPassword, 0,+
  7393. $(!REG_VT_DWORD), $(ForceEncryptedPassword)}
  7394. SetRegValue $(RasProtocolKey) {ForceEncryptedData, 0,+
  7395. $(!REG_VT_DWORD), $(ForceEncryptedData)}
  7396. UpgradeSelectedProtocolsEnd =+
  7397. CloseRegKey $(RasProtocolKey)
  7398. set Status = STATUS_SUCCESSFUL
  7399. else
  7400. Debug-Output "UpgradeSelectedProtocols: error opening Ras\protocols key"
  7401. endif
  7402. Debug-Output "UpgradeSelectedProtocols exit."
  7403. return $(Status)
  7404. [SaveSelectedProtocols]
  7405. ; save the user selected protocols in the SOFTWARE\Microsoft\RAS\Protocols
  7406. ; key.
  7407. Debug-Output "SaveSelectedProtocols entry."
  7408. set Status = STATUS_FAILED
  7409. Set KeyNull = ""
  7410. ifstr(i) $($0) == TRUE
  7411. set NetbeuiSelected = 1
  7412. else
  7413. set NetbeuiSelected = 0
  7414. endif
  7415. ifstr(i) $($1) == TRUE
  7416. set TcpIpSelected = 1
  7417. else
  7418. set TcpIpSelected = 0
  7419. endif
  7420. ifstr(i) $($2) == TRUE
  7421. set IpxSelected = 1
  7422. else
  7423. set IpxSelected = 0
  7424. endif
  7425. ifstr(i) $($3) == TRUE
  7426. set NetbeuiAllowed = 1
  7427. else
  7428. set NetbeuiAllowed = 0
  7429. endif
  7430. ifstr(i) $($4) == TRUE
  7431. set TcpIpAllowed = 1
  7432. else
  7433. set TcpIpAllowed = 0
  7434. endif
  7435. ifstr(i) $($5) == TRUE
  7436. set IpxAllowed = 1
  7437. else
  7438. set IpxAllowed = 0
  7439. endif
  7440. set dwRouterType = $($6)
  7441. set RasKeyName = $(!NTN_SoftwareBase)"\Microsoft\Ras"
  7442. set RasProtocolName = $(!NTN_SoftwareBase)"\Microsoft\Ras\Protocols"
  7443. OpenRegKey $(!REG_H_LOCAL) "" $(RasProtocolName) $(!MAXIMUM_ALLOWED) RasProtocolKey
  7444. ifstr $(RasProtocolKey) == $(KeyNull)
  7445. OpenRegKey $(!REG_H_LOCAL) "" $(RasKeyName) $(!MAXIMUM_ALLOWED) RasKey
  7446. CreateRegKey $(RasKey) {"Protocols",0,GenericClass} "" $(!MAXIMUM_ALLOWED) "" RasProtocolKey
  7447. OpenRegKey $(RasKey) "" "Protocols" $(!MAXIMUM_ALLOWED) RasProtocolKey
  7448. CloseRegKey $(RasKey)
  7449. endif
  7450. ifstr $(RasProtocolKey) != $(KeyNull)
  7451. SetRegValue $(RasProtocolKey) {fNetbeuiSelected, 0,+
  7452. $(!REG_VT_DWORD),$(NetbeuiSelected)}
  7453. SetRegValue $(RasProtocolKey) {fTcpIpSelected, 0,+
  7454. $(!REG_VT_DWORD),$(TcpIpSelected)}
  7455. SetRegValue $(RasProtocolKey) {fIpxSelected, 0,+
  7456. $(!REG_VT_DWORD),$(IpxSelected)}
  7457. SetRegValue $(RasProtocolKey) {fNetbeuiAllowed, 0,+
  7458. $(!REG_VT_DWORD),$(NetbeuiAllowed)}
  7459. SetRegValue $(RasProtocolKey) {fTcpIpAllowed, 0,+
  7460. $(!REG_VT_DWORD),$(TcpIpAllowed)}
  7461. SetRegValue $(RasProtocolKey) {fIpxAllowed, 0,+
  7462. $(!REG_VT_DWORD),$(IpxAllowed)}
  7463. SetRegValue $(RasProtocolKey) {RouterType, 0,+
  7464. $(!REG_VT_DWORD),$(dwRouterType)}
  7465. CloseRegKey $(RasProtocolKey)
  7466. set Status = STATUS_SUCCESSFUL
  7467. else
  7468. Debug-Output "error opening Ras\protocols key"
  7469. endif
  7470. Debug-Output "SaveSelectedProtocols exit."
  7471. return $(Status)
  7472. [QuerySelectedProtocols]
  7473. ; get the user selected protocols in the SOFTWARE\Microsoft\RAS\Protocols
  7474. ; key.
  7475. Debug-Output "QuerySelectedProtocols: entry"
  7476. set Status = STATUS_FAILED
  7477. Set KeyNull = ""
  7478. set fNetbeuiSelected = FALSE
  7479. set fTcpIpSelected = FALSE
  7480. set fIpxSelected = FALSE
  7481. set fNetbeuiAllowed = FALSE
  7482. set fTcpIpAllowed = FALSE
  7483. set fIpxAllowed = FALSE
  7484. set dwRouterType = 0
  7485. set NetbeuiSelected = {}
  7486. set TcpIpSelected = {}
  7487. set IpxSelected = {}
  7488. set NetbeuiAllowed = {}
  7489. set TcpIpAllowed = {}
  7490. set IpxAllowed = {}
  7491. set RouterType = {}
  7492. set RasKeyName = $(!NTN_SoftwareBase)"\Microsoft\Ras\Protocols"
  7493. OpenRegKey $(!REG_H_LOCAL) "" $(RasKeyName) $(!MAXIMUM_ALLOWED) RasKey
  7494. ifstr $(RasKey) != $(KeyNull)
  7495. GetRegValue $(RasKey), "fNetbeuiSelected", NetbeuiSelected
  7496. ifint *($(NetbeuiSelected), 4) == 1
  7497. set fNetbeuiSelected = TRUE
  7498. else
  7499. set fNetbeuiSelected = FALSE
  7500. endif
  7501. GetRegValue $(RasKey), "fTcpIpSelected", TcpIpSelected
  7502. ifint *($(TcpIpSelected), 4) == 1
  7503. set fTcpIpSelected = TRUE
  7504. else
  7505. set fTcpIpSelected = FALSE
  7506. endif
  7507. GetRegValue $(RasKey), "fIpxSelected", IpxSelected
  7508. ifint *($(IpxSelected), 4) == 1
  7509. set fIpxSelected = TRUE
  7510. else
  7511. set fIpxSelected = FALSE
  7512. endif
  7513. GetRegValue $(RasKey), "fNetbeuiAllowed", NetbeuiAllowed
  7514. ifint *($(NetbeuiAllowed), 4) == 1
  7515. set fNetbeuiAllowed = TRUE
  7516. else
  7517. set fNetbeuiAllowed = FALSE
  7518. endif
  7519. GetRegValue $(RasKey), "fTcpIpAllowed", TcpIpAllowed
  7520. ifint *($(TcpIpAllowed), 4) == 1
  7521. set fTcpIpAllowed = TRUE
  7522. else
  7523. set fTcpIpAllowed = FALSE
  7524. endif
  7525. GetRegValue $(RasKey), "fIpxAllowed", IpxAllowed
  7526. ifint *($(IpxAllowed), 4) == 1
  7527. set fIpxAllowed = TRUE
  7528. else
  7529. set fIpxAllowed = FALSE
  7530. endif
  7531. GetRegValue $(RasKey), "RouterType", RouterType
  7532. set dwRouterType = *($(RouterType), 4)
  7533. CloseRegKey $(RasKey)
  7534. set Status = STATUS_SUCCESSFUL
  7535. else
  7536. Debug-Output "error opening Ras\protocols key"
  7537. endif
  7538. Debug-Output "QuerySelectedProtocols: NbfSelected="$(fNetbeuiSelected)+
  7539. " TcpSelected="$(fTcpIpSelected)" IpxSelected="$(fIpxSelected)+
  7540. " NbfAllowed="$(fNetbeuiAllowed)" TcpAllowed="$(fTcpIpAllowed)+
  7541. " IpxAllowed="$(fIpxAllowed)" dwRouterType="$(dwRouterType)
  7542. Debug-Output "QuerySelectedProtocols: exit"
  7543. return $(Status) $(fNetbeuiSelected) $(fTcpIpSelected) $(fIpxSelected) +
  7544. $(fNetbeuiAllowed) $(fTcpIpAllowed) $(fIpxAllowed) $(dwRouterType)
  7545. [UpdateSelectedProtocols]
  7546. ; updates the user selected protocol list based on what protocols have been
  7547. ; recently removed. This routine is called during the review bindings time.
  7548. Debug-Output "UpdateSelectedProtocols: entry"
  7549. set Status = STATUS_FAILED
  7550. set fNetbeuiChosen = FALSE
  7551. set fTcpIpChosen = FALSE
  7552. set fIpxChosen = FALSE
  7553. set dwRouterType = 0
  7554. Shell "" QuerySelectedProtocols
  7555. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  7556. Debug-Output "error shelling QuerySelectedProtocols."
  7557. goto UpdateSelectedProtocolsEnd
  7558. endif
  7559. Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  7560. Debug-Output "error returned by QuerySelectedProtocols."
  7561. goto UpdateSelectedProtocolsEnd
  7562. endif
  7563. set fNetbeuiSelected = $($R1)
  7564. set fTcpIpSelected = $($R2)
  7565. set fIpxSelected = $($R3)
  7566. set fNetbeuiAllowed = $($R4)
  7567. set fTcpIpAllowed = $($R5)
  7568. set fIpxAllowed = $($R6)
  7569. set dwRouterType = $($R7)
  7570. Debug-Output "UpdateSelectedProtocols: Selected protocols NBF IP IPX "$(fNetbeuiSelected)" "$(fTcpIpSelected)" "$(fIpxSelected)
  7571. shell "" QueryInstalledProtocols
  7572. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  7573. Debug-Output "error shelling QueryInstalledProtocols."
  7574. goto UpdateSelectedProtocolsEnd
  7575. endif
  7576. Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  7577. Debug-Output "error returned by QueryInstalledProtocols."
  7578. goto UpdateSelectedProtocolsEnd
  7579. endif
  7580. set fNetbeuiInstalled = $($R1)
  7581. set fTcpIpInstalled = $($R2)
  7582. set fIpxInstalled = $($R3)
  7583. Debug-Output "UpdateSelectedProtocols: Installed Protocols NBF IP IPX "$(fNetbeuiInstalled)" "$(fTcpIpInstalled)" "$(fIpxInstalled)
  7584. set fNetbeuiSelectedNew = $(fNetbeuiSelected)
  7585. set fTcpIpSelectedNew = $(fTcpIpSelected)
  7586. set fIpxSelectedNew = $(fIpxSelected)
  7587. set fNetbeuiAllowedNew = $(fNetbeuiAllowed)
  7588. set fTcpIpAllowedNew = $(fTcpIpAllowed)
  7589. set fIpxAllowedNew = $(fIpxAllowed)
  7590. ; the protocols are chosen for either dialout or dialin.
  7591. ; let us just 'OR' the values to determine which protocols are relevant
  7592. ifstr(i) $(fNetbeuiSelectedNew) == TRUE
  7593. set fNetbeuiChosen = TRUE
  7594. else
  7595. set fNetbeuiChosen = $(fNetbeuiAllowedNew)
  7596. endif
  7597. ifstr(i) $(fTcpIpSelectedNew) == TRUE
  7598. set fTcpIpChosen = TRUE
  7599. else
  7600. set fTcpIpChosen = $(fTcpIpAllowedNew)
  7601. endif
  7602. ifstr(i) $(fIpxSelectedNew) == TRUE
  7603. set fIpxChosen = TRUE
  7604. else
  7605. set fIpxChosen = $(fIpxAllowedNew)
  7606. endif
  7607. ifstr(i) $(fNetbeuiInstalled) == FALSE
  7608. set fNetbeuiSelectedNew = FALSE
  7609. set fNetbeuiAllowedNew = FALSE
  7610. endif
  7611. ifstr(i) $(fTcpIpInstalled) == FALSE
  7612. set fTcpIpSelectedNew = FALSE
  7613. set fTcpIpAllowedNew = FALSE
  7614. endif
  7615. ifstr(i) $(fIpxInstalled) == FALSE
  7616. set fIpxSelectedNew = FALSE
  7617. set fIpxAllowedNew = FALSE
  7618. endif
  7619. ifstr(i) $(fNetbeuiSelectedNew) == $(fNetbeuiSelected)
  7620. ifstr(i) $(fTcpIpSelectedNew) == $(fTcpIpSelected)
  7621. ifstr(i) $(fIpxSelectedNew) == $(fIpxSelected)
  7622. ifstr(i) $(fNetbeuiAllowedNew) == $(fNetbeuiAllowed)
  7623. ifstr(i) $(fTcpIpAllowedNew) == $(fTcpIpAllowed)
  7624. ifstr(i) $(fIpxAllowedNew) == $(fIpxAllowed)
  7625. set Status = STATUS_SUCCESSFUL
  7626. Debug-Output "UpdateSelectedProtocols: Nothing changed"
  7627. goto UpdateSelectedProtocolsEnd
  7628. endif
  7629. endif
  7630. endif
  7631. endif
  7632. endif
  7633. endif
  7634. Shell "" SaveSelectedProtocols $(fNetbeuiSelectedNew) $(fTcpIpSelectedNew) +
  7635. $(fIpxSelectedNew) $(fNetbeuiAllowedNew) +
  7636. $(fTcpIpAllowedNew) $(fIpxAllowedNew) $(dwRouterType)
  7637. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  7638. Debug-Output "error shelling SaveSelectedProtocols."
  7639. goto UpdateSelectedProtocolsEnd
  7640. endif
  7641. Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  7642. Debug-Output "error returned by SaveSelectedProtocols."
  7643. goto UpdateSelectedProtocolsEnd
  7644. endif
  7645. ; the protocols are chosen for either dialout or dialin.
  7646. ; let us just 'OR' the values to determine which protocols are relevant
  7647. ifstr(i) $(fNetbeuiSelectedNew) == TRUE
  7648. set fNetbeuiChosen = TRUE
  7649. else
  7650. set fNetbeuiChosen = $(fNetbeuiAllowedNew)
  7651. endif
  7652. ifstr(i) $(fTcpIpSelectedNew) == TRUE
  7653. set fTcpIpChosen = TRUE
  7654. else
  7655. set fTcpIpChosen = $(fTcpIpAllowedNew)
  7656. endif
  7657. ifstr(i) $(fIpxSelectedNew) == TRUE
  7658. set fIpxChosen = TRUE
  7659. else
  7660. set fIpxChosen = $(fIpxAllowedNew)
  7661. endif
  7662. Shell "" UpdateNetCardInfo $(fNetbeuiChosen) $(fTcpIpChosen) +
  7663. $(fIpxChosen)
  7664. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  7665. Debug-Output "error shelling UpdateNetCardInfo."
  7666. goto UpdateSelectedProtocolsEnd
  7667. endif
  7668. Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  7669. Debug-Output "error returned by UpdateNetCardInfo."
  7670. goto UpdateSelectedProtocolsEnd
  7671. endif
  7672. set Status = STATUS_SUCCESSFUL
  7673. ; remove the services we installed, if we discover that tcp/ip or ipx are
  7674. ; not selected any more.
  7675. ifstr(i) $(fNetbeuiAllowedNew) == FALSE
  7676. Debug-Output "UpdateSelectedProtocols: Removing RemoteAccess NBF dependency"
  7677. OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\RemoteAccess\Parameters" $(!MAXIMUM_ALLOWED) KeyParams
  7678. ifstr $(KeyParams) != ""
  7679. SetRegValue $(KeyParams) {NetBiosGatewayEnabled, 0,+
  7680. $(!REG_VT_DWORD), 0 }
  7681. CloseRegKey $(KeyParams)
  7682. endif
  7683. Shell "" RemoveServiceDependency "RemoteAccess" "NBF"
  7684. endif
  7685. ifstr(i) $(fTcpIpChosen) == FALSE
  7686. Debug-Output "UpdateSelectedProtocols: Removing RasArp service"
  7687. shell "" RemoveRasArpService
  7688. endif
  7689. ifstr(i) $(fIpxAllowedNew) == FALSE
  7690. Debug-Output "UpdateSelectedProtocols: Removing IPX router and SAP"
  7691. shell "" RemoveNwlnkRipService
  7692. shell "" RemoveIsnSapService
  7693. Shell "" RemoveServiceDependency "RemoteAccess" "NWLNKIPX"
  7694. ifstr(i) $($R0) == STATUS_FAILED
  7695. Debug-Output "UpdateSelectedProtocols: error removing service dependency of RemoteAccess on NWLNKIPX"
  7696. endif
  7697. endif
  7698. UpdateSelectedProtocolsEnd = +
  7699. Debug-Output "UpdateSelectedProtocols: exit"
  7700. return $(Status) $(fNetbeuiChosen) $(fTcpIpChosen) $(fIpxChosen) $(dwRouterType)
  7701. [UpgradeIsdnInfo]
  7702. ; upgrade the ISDN info from the NT3.1 format to the TAPI DEVICES format
  7703. ; NOTE that this routine is not generic, but assumes that PCIMAC was the
  7704. ; the only ISDN device installed for NT3.1. This assumption is valid.
  7705. ; First check to see if SOFTWARE\Microsoft\RAS\Medias\ISDN key exists.
  7706. ; if it does, then map this information to ...RAS\TAPI DEVICES format.
  7707. Debug-Output "UpgradeIsdnInfo entry."
  7708. set Status = STATUS_FAILED
  7709. Set KeyNull = ""
  7710. set RasKeyName = $(!NTN_SoftwareBase)"\Microsoft\Ras"
  7711. set TapiName = $(!NTN_SoftwareBase)"\Microsoft\Ras\Tapi Devices"
  7712. set RasIsdnName = $(!NTN_SoftwareBase)"\Microsoft\Ras\MEDIA\ISDN"
  7713. set RasManParamName = $(!NTN_ServiceBase)"\RasMan\Parameters"
  7714. set PcimacName = "HARDWARE\DEVICEMAP\TAPI DEVICES\PCIMAC"
  7715. ; Check if we are dealing with a NT3.1 system by checking to see if the
  7716. ; RAS\MEDIAS\ISDN key is present and if ISDN ports are actually configured
  7717. ; by enumerating the RAS\MEDIAS\ISDN key.
  7718. set KeyIsdn = $(KeyNull)
  7719. OpenRegKey $(!REG_H_LOCAL) "" $(RasIsdnName) $(!MAXIMUM_ALLOWED) KeyIsdn
  7720. ifstr $(KeyIsdn) != $(KeyNull)
  7721. EnumRegKey $(KeyIsdn) PortList
  7722. ifint $(RegLastError) != 0
  7723. Debug-Output "UpgradeIsdnInfo: error enumerating MEDIAS\ISDN key."
  7724. CloseRegKey $(KeyIsdn)
  7725. set Status = STATUS_SUCCESSFUL
  7726. goto UpgradeIsdnInfoEnd
  7727. endif
  7728. QueryListSize IsdnPorts $(PortList)
  7729. ifint $(IsdnPorts) == 0
  7730. ; no configured ISDN ports, just return success
  7731. set Status = STATUS_SUCCESSFUL
  7732. CloseRegKey $(KeyIsdn)
  7733. goto UpgradeIsdnInfoEnd
  7734. endif
  7735. set MediaType = "ISDN"
  7736. set Addresses = {}
  7737. OpenRegKey $(!REG_H_LOCAL) "" $(PcimacName) +
  7738. $(!MAXIMUM_ALLOWED) KeyPcimac
  7739. ifstr $(KeyPcimac) != $(KeyNull)
  7740. GetRegValue $(KeyPcimac), "Address", AddressList
  7741. ifint $(RegLastError) == 0
  7742. set Addresses = *($(AddressList), 4)
  7743. endif
  7744. GetRegValue $(KeyPcimac), "Media Type", MediaValue
  7745. ifint $(RegLastError) == 0
  7746. set MediaType = *($(MediaValue), 4)
  7747. endif
  7748. CloseRegKey $(KeyPcimac)
  7749. else
  7750. Debug-Output "UpgradeIsdnInfo: error opening DEVICEMAP\TAPI DEVICES\PCIMAC key."
  7751. CloseRegKey $(KeyIsdn)
  7752. goto UpgradeIsdnInfoEnd
  7753. endif
  7754. set AddressList = {}
  7755. set NameList = {}
  7756. set UsageList = {}
  7757. set index = 1
  7758. forlistdo $(PortList)
  7759. set Address = *($(Addresses), $(index))
  7760. set-add index = $(index) , 1
  7761. set AddressList = >($(AddressList), $(Address))
  7762. set PortName = *($($), 1)
  7763. set NameList = >($(NameList), Pcimac$(PortName))
  7764. OpenRegKey $(KeyIsdn) "" $(PortName) $(!MAXIMUM_ALLOWED) KeyPort
  7765. ifstr $(KeyPort) != $(KeyNull)
  7766. GetRegValue $(KeyPcimac), "Usage", UsageValue
  7767. ifint $(RegLastError) == 0
  7768. set Usage = *($(UsageValue), 4)
  7769. set UsageList = >($(UsageList), $(Usage))
  7770. else
  7771. Debug-Output "UpgradeIsdnInfo: error reading usage "$(PortName)
  7772. set UsageList = >($(UsageList), "Client")
  7773. endif
  7774. CloseRegKey $(KeyPort)
  7775. else
  7776. Debug-Output "UpgradeIsdnInfo: error opening key "$(PortName)
  7777. set UsageList = >($(UsageList), "Client")
  7778. endif
  7779. endforlistdo
  7780. set KeyTapi = $(KeyNull)
  7781. CreateRegKey $(!REG_H_LOCAL) +
  7782. {$(TapiName),$(NoTitle),GenericClass} +
  7783. "" $(!MAXIMUM_ALLOWED) "" KeyTapi
  7784. ifstr $(KeyTapi) != $(KeyNull)
  7785. CreateRegKey $(KeyTapi) +
  7786. {"Pcimac" ,$(NoTitle),GenericClass} +
  7787. "" $(!MAXIMUM_ALLOWED) "" KeyPcimac
  7788. ifstr $(KeyPcimac) != $(KeyNull)
  7789. Debug-Output "UpgradeIsdnInfo: MediaType "$(MediaType)
  7790. Debug-Output "UpgradeIsdnInfo: Addresses "$(AddressList)
  7791. Debug-Output "UpgradeIsdnInfo: Names "$(NameList)
  7792. Debug-Output "UpgradeIsdnInfo: Usage "$(UsageList)
  7793. SetRegValue $(KeyPcimac) {"Media Type", 0, +
  7794. $(!REG_VT_SZ),$(MediaType)}
  7795. SetRegValue $(KeyPcimac) {"Address", 0, +
  7796. $(!REG_VT_MULTI_SZ),$(AddressList)}
  7797. SetRegValue $(KeyPcimac) {"Friendly Name", 0, +
  7798. $(!REG_VT_MULTI_SZ),$(NameList)}
  7799. SetRegValue $(KeyPcimac) {"Usage", 0, +
  7800. $(!REG_VT_MULTI_SZ),$(UsageList)}
  7801. CloseRegKey $(KeyPcimac)
  7802. else
  7803. Debug-Output "UpgradeIsdnInfo: error creating RAS\TAPI DEVICES\Pcimac key"
  7804. endif
  7805. else
  7806. Debug-Output "UpgradeIsdnInfo: error creating RAS\TAPI DEVICES key"
  7807. endif
  7808. CloseRegKey $(KeyIsdn)
  7809. ; now blow away the RAS\Media key because we don't need it any more.
  7810. OpenRegKey $(!REG_H_LOCAL) "" $(RasKeyName) +
  7811. $(!MAXIMUM_ALLOWED) KeyRas
  7812. ifstr $(KeyRas) != $(KeyNull)
  7813. DeleteRegTree $(KeyRas) "Media"
  7814. CloseRegKey $(KeyRas)
  7815. endif
  7816. ; now modify the Medias parameter in Services\Rasman to contain
  7817. ; rasser (if serial ports are configured) and
  7818. ; rastapi (for the new tapi devices configured)
  7819. set KeyRasman = $(KeyNull)
  7820. OpenRegKey $(!REG_H_LOCAL) "" $(RasManParamName) +
  7821. $(!MAXIMUM_ALLOWED) KeyRasman
  7822. ifstr $(KeyRasman) != $(KeyNull)
  7823. GetRegValue $(KeyRasman), "Medias", MediaList
  7824. ifint $(RegLastError) == 0
  7825. set Medias = *($(MediaList), 4)
  7826. else
  7827. Debug-Output "UpgradeIsdnInfo: error reading Medias value "
  7828. endif
  7829. set NewMedias = {}
  7830. forlistdo $(Medias)
  7831. ifstr(i) $($) != "ISDN"
  7832. set NewMedias = >($(NewMedias), $($))
  7833. endif
  7834. endforlistdo
  7835. set NewMedias = >($(NewMedias), "rastapi")
  7836. Debug-Output "UpgradeIsdnInfo: NewMedias "$(NewMedias)
  7837. SetRegValue $(KeyRasman) {"Medias", 0, +
  7838. $(!REG_VT_MULTI_SZ),$(NewMedias)}
  7839. CloseRegKey $(KeyRasman)
  7840. else
  7841. Debug-Output "UpgradeIsdnInfo: error opening Services\Rasman\Parameters key"
  7842. goto UpgradeIsdnInfoEnd
  7843. endif
  7844. set Status = STATUS_SUCCESSFUL
  7845. else
  7846. set Status = STATUS_SUCCESSFUL
  7847. endif
  7848. UpgradeIsdnInfoEnd = +
  7849. Debug-Output "UpgradeIsdnInfo exit."
  7850. return $(Status)
  7851. [UpdateNetCardInfo]
  7852. ; Remove the netcards and NdisWan adapter corresponding to the removed protocol
  7853. ; and update the list of adapters in services\asyncmac\parameters
  7854. Debug-Output "UpdateNetCardInfo: entry"
  7855. set Status = STATUS_FAILED
  7856. Set KeyNull = ""
  7857. set fNetbeuiChosen = $($0)
  7858. set fTcpIpChosen = $($1)
  7859. set fIpxChosen = $($2)
  7860. set RasAsyMacParamKeyName = $(!NTN_ServiceBase)"\AsyncMac\Parameters"
  7861. OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) KeyNetcards
  7862. ifstr $(KeyNetcards) == $(KeyNull)
  7863. Debug-Output "UpdateNetCardInfo: could not open Netcards key"
  7864. goto UpdateNetCardInfoEnd
  7865. endif
  7866. EnumRegKey $(KeyNetcards) NetcardsList
  7867. set RemoveList = {}
  7868. ForListDo $(NetcardsList)
  7869. set KeyName = *($($),1)
  7870. OpenRegKey $(KeyNetcards) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  7871. ifstr $(Card) == $(KeyNull)
  7872. Debug-Output "OEMNSVRA.INF: could not open netcard key"
  7873. CloseRegKey $(KeyNetcards)
  7874. goto UpdateNetCardInfoEnd
  7875. endif
  7876. GetRegValue $(Card), "ProductName" ProductNameInfo
  7877. set CardProductName = *($(ProductNameInfo), 4)
  7878. ifstr(i) $(fNetbeuiChosen) == FALSE
  7879. ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINName)
  7880. set RemoveList = >($(RemoveList), +
  7881. {$(!ProductNDISWANName),+
  7882. $(!NetworkCardKeyName)"\"$(KeyName)})
  7883. else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTName)
  7884. set RemoveList = >($(RemoveList), +
  7885. {$(!ProductNDISWANName),+
  7886. $(!NetworkCardKeyName)"\"$(KeyName)})
  7887. endif
  7888. endif
  7889. ifstr(i) $(fTcpIpChosen) == FALSE
  7890. ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINIPName)
  7891. set RemoveList = >($(RemoveList), +
  7892. {$(!ProductNDISWANName),+
  7893. $(!NetworkCardKeyName)"\"$(KeyName)})
  7894. else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTIPName)
  7895. set RemoveList = >($(RemoveList), +
  7896. {$(!ProductNDISWANName),+
  7897. $(!NetworkCardKeyName)"\"$(KeyName)})
  7898. endif
  7899. endif
  7900. ifstr(i) $(fIpxChosen) == FALSE
  7901. ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINOUTIPXName)
  7902. set RemoveList = >($(RemoveList), +
  7903. {$(!ProductNDISWANName),+
  7904. $(!NetworkCardKeyName)"\"$(KeyName)})
  7905. endif
  7906. endif
  7907. CloseRegKey $(Card)
  7908. EndForListDo
  7909. CloseRegKey $(KeyNetcards)
  7910. QueryListSize NetCards $(RemoveList)
  7911. ifint $(NetCards) != 0
  7912. ForListDo $(RemoveList)
  7913. debug-output "Removing hardware component: "$($)
  7914. Shell "utility.inf", RemoveHardwareComponent, +
  7915. $(!Manufacturer), *($($),1), *($($),2)
  7916. EndForListDo
  7917. endif
  7918. ; now update the asyncmac info
  7919. OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacParamKeyName) $(!MAXIMUM_ALLOWED) KeyMacParams
  7920. ifstr $(KeyMacParams) == $(KeyNull)
  7921. Debug-Output "UpdateNetCardInfo: could not open AsyncMac Params key"
  7922. goto UpdateNetCardInfoEnd
  7923. endif
  7924. set NewValueList = {}
  7925. ifstr(i) $(fNetbeuiChosen) == FALSE
  7926. set NewValueList = >($(NewValueList), +
  7927. {DialinNBF, $(NoTitle), $(!REG_VT_DWORD), 0})
  7928. set NewValueList = >($(NewValueList), +
  7929. {DialoutNBF, $(NoTitle), $(!REG_VT_DWORD), 0})
  7930. endif
  7931. ifstr(i) $(fTcpIpChosen) == FALSE
  7932. set NewValueList = >($(NewValueList), +
  7933. {DialinIP, $(NoTitle), $(!REG_VT_DWORD), 0 })
  7934. set NewValueList = >($(NewValueList), +
  7935. {DialoutIP, $(NoTitle), $(!REG_VT_DWORD), 0 })
  7936. endif
  7937. ifstr(i) $(fIpxChosen) == FALSE
  7938. set NewValueList = >($(NewValueList), +
  7939. {DialinoutIPX, $(NoTitle), $(!REG_VT_DWORD), 0})
  7940. endif
  7941. Shell "utility.inf", AddValueList, $(KeyMacParams), $(NewValueList)
  7942. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  7943. Debug-Output "UpdateNetCardInfo:AddValueList bombed out"
  7944. goto UpdateNetCardInfoEnd
  7945. endif
  7946. set RegistryErrorIndex = $($R0)
  7947. CloseRegKey $(KeyMacParams)
  7948. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  7949. goto UpdateNetCardInfoEnd
  7950. endif
  7951. set Status = STATUS_SUCCESSFUL
  7952. UpdateNetCardInfoEnd =+
  7953. Debug-Output "UpdateNetcardInfo: Exit"
  7954. return $(Status)
  7955. [UpdateNdisWanInfo]
  7956. ; Update NdisWan netrules to reflect the new protocols (IP/IPX) support
  7957. ; Also add new block rules to NdisWan dialin/dialout adapters in the
  7958. ; Microsoft\Windows NT\CurrentVersion\NetworkCards key
  7959. ; Also modify RasMan\Linkage\OtherDependencies from RasHub to NdisWan.
  7960. ; This routine is invoked during Upgrade of RAS
  7961. Debug-Output "UpdateNdisWanNetInfo: entry"
  7962. set Status = STATUS_FAILED
  7963. Set KeyNull = ""
  7964. set NdisWanName = $(!NTN_SoftwareBase)"\Microsoft\NdisWan\CurrentVersion"
  7965. set NdisWanRulesName = $(!NTN_SoftwareBase)"\Microsoft\NdisWan\CurrentVersion\NetRules"
  7966. set NdisWanSvcName = $(!NTN_ServiceBase)"\NdisWan"
  7967. set RasManLinkageName = $(!NTN_ServiceBase)"\RasMan\Linkage"
  7968. ; first rename all RasHub to NdisWan in the software section
  7969. OpenRegKey $(!REG_H_LOCAL) "" $(NdisWanName) $(!MAXIMUM_ALLOWED) KeyNdisWan
  7970. ifstr $(KeyNdisWan) != $(KeyNull)
  7971. SetRegValue $(KeyNdisWan) {Description, 0, +
  7972. $(!REG_VT_SZ),$(!ProductNDISWANDescription)}
  7973. SetRegValue $(KeyNdisWan) {PathName, 0, +
  7974. $(!REG_VT_SZ),$(!ProductNDISWANImagePath)}
  7975. SetRegValue $(KeyNdisWan) {ServiceName, 0, +
  7976. $(!REG_VT_SZ),$(!ProductNDISWANName)}
  7977. SetRegValue $(KeyNdisWan) {Title, 0, +
  7978. $(!REG_VT_SZ),$(!ProductNDISWANTitle)}
  7979. CloseRegKey $(KeyNdisWan)
  7980. else
  7981. Debug-Output "UpdateNdisWanInfo: could not open NdisWan key"
  7982. endif
  7983. ; now change the net rules
  7984. OpenRegKey $(!REG_H_LOCAL) "" $(NdisWanRulesName) $(!MAXIMUM_ALLOWED) KeyRules
  7985. ifstr $(KeyRules) != $(KeyNull)
  7986. SetRegValue $(KeyRules) {bindable, 0, +
  7987. $(!REG_VT_MULTI_SZ),$(!NetRuleNDISWANBindable)}
  7988. SetRegValue $(KeyRules) {bindform, 0, +
  7989. $(!REG_VT_SZ),$(!NetRuleNDISWANBindForm)}
  7990. SetRegValue $(KeyRules) {class, 0, +
  7991. $(!REG_VT_MULTI_SZ),$(!NetRuleNDISWANClass)}
  7992. SetRegValue $(KeyRules) {type, 0, +
  7993. $(!REG_VT_SZ),$(!NetRuleNDISWANType)}
  7994. ;Modified on 9/24/96 by Ramc - changed NDISWAN to ROUTING
  7995. SetRegValue $(KeyRules) {InfOption, 0, +
  7996. $(!REG_VT_SZ), "RAS"}
  7997. CloseRegKey $(KeyRules)
  7998. else
  7999. Debug-Output "UpdateNdisWanInfo: could not open NdisWan NetRules key"
  8000. endif
  8001. ; finally update the DisplayName and ImagePath in the services area
  8002. ; also set the start type to autostart and change the group to
  8003. ; NDISWAN & remove all dependencies because NdisWan doesn't need them
  8004. ; anymore.
  8005. OpenRegKey $(!REG_H_LOCAL) "" $(NdisWanSvcName) $(!MAXIMUM_ALLOWED) KeyService
  8006. ifstr $(KeyService) != $(KeyNull)
  8007. SetRegValue $(KeyService) {DisplayName, 0, +
  8008. $(!REG_VT_SZ),$(!ProductNDISWANDisplayName)}
  8009. SetRegValue $(KeyService) {ImagePath, 0, +
  8010. $(!REG_VT_EXPAND_SZ),$(!ProductNDISWANImagePath)}
  8011. SetRegValue $(KeyService) {Start, 0, $(!REG_VT_DWORD),2}
  8012. SetRegValue $(KeyService) {Group, 0, $(!REG_VT_SZ), "NDISWAN"}
  8013. DeleteRegValue $(KeyService) "DependOnService"
  8014. DeleteRegValue $(KeyService) "DependOnGroup"
  8015. OpenRegKey $(KeyService) "" "Linkage" $(!MAXIMUM_ALLOWED) KeyLinkage
  8016. ifstr $(KeyLinkage) != $(KeyNull)
  8017. DeleteRegValue $(KeyLinkage) "OtherDependencies"
  8018. CloseRegKey $(KeyLinkage)
  8019. endif
  8020. CloseRegKey $(KeyService)
  8021. else
  8022. Debug-Output "UpdateNdisWanInfo: could not open NdisWan services key"
  8023. endif
  8024. ;; ; now set the RasMan\Linkage\OtherDependencies from RasHub to nothing
  8025. ;; ; because NdisWan will autostart.
  8026. ;; DON't just set OtherDependencies to nothing, instead use RemoveServiceDependency routine
  8027. ;; to do the right thing, because some other dependency could be present.
  8028. Shell "" RemoveServiceDependency "RasMan" "RasHub"
  8029. set Status = STATUS_SUCCESSFUL
  8030. UpdateNdisWanInfoEnd =+
  8031. Debug-Output "UpdateNdisWanInfo: Exit"
  8032. return $(Status)
  8033. [UpdateAsyncMacNetRules]
  8034. ; Update AsyncMac netrules to prevent blood hound from binding to asyncmac -
  8035. ; this support was added for NT 3.5 beta
  8036. Debug-Output "UpdateAsyncMacNetRules: entry"
  8037. set Status = STATUS_FAILED
  8038. Set KeyNull = ""
  8039. set AsyncMacRulesName = $(!NTN_SoftwareBase)"\Microsoft\AsyncMac\CurrentVersion\NetRules"
  8040. OpenRegKey $(!REG_H_LOCAL) "" $(AsyncMacRulesName) $(!MAXIMUM_ALLOWED) KeyRules
  8041. ifstr $(KeyRules) != $(KeyNull)
  8042. set Status = STATUS_SUCCESSFUL
  8043. SetRegValue $(KeyRules) {bindable, 0, +
  8044. $(!REG_VT_MULTI_SZ),$(!NetRuleRASASYMACBindable)}
  8045. CloseRegKey $(KeyRules)
  8046. else
  8047. Debug-Output "UpdateAsyncMacNetRules: could not open NdisWan NetRules key"
  8048. endif
  8049. Debug-Output "UpdateAsyncMacNetRules: Exit"
  8050. return $(Status)
  8051. [UpdateAsyncMacParameters]
  8052. ; If DialinNBF and DialoutNBF don't already exist in
  8053. ; Services\AsyncMac\Parameters, then add these values setting them equal
  8054. ; to Dialin and Dialout ports, respectively. While at it, delete the
  8055. ; Dialin and Dialout keys as well.
  8056. ; This routine is invoked during upgrade of RAS
  8057. Debug-Output "UpdateAsyncMacParameters: entry"
  8058. set Status = STATUS_SUCCESSFUL
  8059. Set KeyNull = ""
  8060. set RasAsyMacParamKeyName = $(!NTN_ServiceBase)"\AsyncMac\Parameters"
  8061. OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacParamKeyName) $(!MAXIMUM_ALLOWED) KeyMacParams
  8062. ifstr $(KeyMacParams) != $(KeyNull)
  8063. GetRegValue $(KeyMacParams), "DialinNBF" DialinNBFInfo
  8064. Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  8065. ; no DialinNBF variable
  8066. GetRegValue $(KeyMacParams), "Dialin" DialinNBFInfo
  8067. set PrevNumDialinNBF = *($(DialinNBFInfo), 4)
  8068. SetRegValue $(KeyMacParams) {DialinNBF, 0, +
  8069. $(!REG_VT_DWORD),$(PrevNumDialinNBF)}
  8070. ; delete the old key if we succefully added the new key
  8071. Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  8072. Debug-Output "UpdateAsyncMacParameters: deleting dialin key"
  8073. DeleteRegValue $(KeyMacParams) "Dialin"
  8074. endif
  8075. endif
  8076. GetRegValue $(KeyMacParams), "DialoutNBF" DialoutNBFInfo
  8077. Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  8078. ; no DialoutNBF variable
  8079. GetRegValue $(KeyMacParams), "Dialout" DialoutNBFInfo
  8080. set PrevNumDialoutNBF = *($(DialoutNBFInfo), 4)
  8081. SetRegValue $(KeyMacParams) {DialoutNBF, 0, +
  8082. $(!REG_VT_DWORD),$(PrevNumDialoutNBF)}
  8083. ; delete the old key if we succefully added the new key
  8084. Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  8085. Debug-Output "UpdateAsyncMacParameters: deleting dialout key"
  8086. DeleteRegValue $(KeyMacParams) "Dialout"
  8087. endif
  8088. endif
  8089. CloseRegKey $(KeyMacParams)
  8090. else
  8091. Debug-Output "OEMNSVRA.INF: could not open AsyncMac Params key"
  8092. endif
  8093. Debug-Output "UpdateAsyncMacParameters: Exit"
  8094. return $(Status)
  8095. [UpdateAsyncMacStartType]
  8096. ; change the AsyncMac start type from KernelAuto to KernelAutoStart
  8097. Debug-Output "UpdateAsyncMacStartType: entry"
  8098. set Status = STATUS_SUCCESSFUL
  8099. Set KeyNull = ""
  8100. set RasAsyMacKeyName = $(!NTN_ServiceBase)"\AsyncMac"
  8101. OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacKeyName) $(!MAXIMUM_ALLOWED) KeyMac
  8102. ifstr $(KeyMac) != $(KeyNull)
  8103. GetRegValue $(KeyMac), "Start" StartValue
  8104. Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  8105. set Start = *($(StartValue), 4)
  8106. ifint $(Start) == 3
  8107. set Start = 2
  8108. SetRegValue $(KeyMac) {Start, 0, $(!REG_VT_DWORD), $(Start)}
  8109. endif
  8110. endif
  8111. CloseRegKey $(KeyMac)
  8112. else
  8113. Debug-Output "OEMNSVRA.INF: could not open AsyncMac key"
  8114. endif
  8115. Debug-Output "UpdateAsyncMacStartType: Exit"
  8116. return $(Status)
  8117. [UpdatePerfmonInfo]
  8118. ; add the performance key to Services\RemoteAccess key and load the perf
  8119. ; counters to the registry
  8120. ; this routine is invoked during ras upgrade
  8121. Debug-Output "UpdatePerfmonInfo: entry"
  8122. set Status = STATUS_FAILED
  8123. Set KeyNull = ""
  8124. set RemoteAccessService = $(!NTN_ServiceBase)"\RemoteAccess"
  8125. OpenRegKey $(!REG_H_LOCAL) "" $(RemoteAccessService) $(!MAXIMUM_ALLOWED) KeyService
  8126. ifstr $(KeyService) != $(KeyNull)
  8127. Shell "" UpdatePerfmonInfoHelper $(KeyService)
  8128. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  8129. Debug-Output "error shelling UpdatePerfmonInfoHelper."
  8130. goto UpdatePerfmonInfoEnd
  8131. endif
  8132. Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  8133. Debug-Output "error returned by UpdatePerfmonInfo."
  8134. goto UpdatePerfmonInfoEnd
  8135. endif
  8136. CloseRegKey $(KeyService)
  8137. set Status = STATUS_SUCCESSFUL
  8138. else
  8139. Debug-Output "UpdatePerfmonInfo: error opening RemoteAccess service key"
  8140. endif
  8141. UpdatePerfmonInfoEnd =+
  8142. Debug-Output "UpdatePerfmonInfo: Exit"
  8143. return $(Status)
  8144. [UpdatePerfmonInfoHelper]
  8145. ; helper routine used by UpdatePerfmonInfo routine. This routine creates
  8146. ; the performance key if it doesn't exist, and adds the performance parameters.
  8147. ; It also loads the perf counters to the registry.
  8148. ; the first parameter is the service key
  8149. Debug-Output "UpdatePerfmonInfoHelper: entry"
  8150. set Status = STATUS_FAILED
  8151. Set KeyNull = ""
  8152. set ServiceKey = $($0)
  8153. set KeyPerformance = $(KeyNull)
  8154. OpenRegKey $(ServiceKey) "" $(!RasPerfKeyName) $(!MAXIMUM_ALLOWED) KeyPerformance
  8155. ifstr $(KeyPerformance) == $(KeyNull)
  8156. CreateRegKey $(ServiceKey) {$(!RasPerfKeyName),$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyPerformance
  8157. OpenRegKey $(ServiceKey) "" $(!RasPerfKeyName) $(!MAXIMUM_ALLOWED) KeyPerformance
  8158. ifstr $(KeyPerformance) == $(KeyNull)
  8159. Debug-Output "Error creating Performance key"
  8160. goto UpdatePerfmonInfoHelperEnd
  8161. endif
  8162. endif
  8163. set NewValueList = +
  8164. {{Library ,$(NoTitle),$(!REG_VT_SZ),$(!RasPerfLibraryName)},+
  8165. {Open, $(NoTitle),$(!REG_VT_SZ),$(!RasPerfOpenFunction)},+
  8166. {Close, $(NoTitle),$(!REG_VT_SZ),$(!RasPerfCloseFunction)},+
  8167. {Collect, $(NoTitle),$(!REG_VT_SZ),$(!RasPerfCollectFunction)}}
  8168. Shell "Utility.Inf", AddValueList, $(KeyPerformance), $(NewValueList)
  8169. ifint $($ShellCode) != $(!SHELL_CODE_OK)
  8170. Debug-Output "UpdatePerfmonInfoHelper: error shelling AddValueList"
  8171. goto UpdatePerfmonInfoHelperEnd
  8172. endif
  8173. set RegistryErrorIndex = $($R0)
  8174. Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  8175. Debug-Output "UpdatePerfmonInfoHelper: AddValueList bombed out"
  8176. goto UpdatePerfmonInfoHelperEnd
  8177. endif
  8178. CloseRegKey $(KeyPerformance)
  8179. set Status = STATUS_SUCCESSFUL
  8180. UpdatePerfmonInfoHelperEnd =+
  8181. Debug-Output "UpdatePerfmonInfoHelper: Exit"
  8182. return $(Status)
  8183. [RenameRasHubToNdisWan]
  8184. ; Rename all occurences of RasHub to NdisWan at
  8185. ; SOFTWARE\Microsoft\WindowsNT\CurrentVersion\NetworkCards
  8186. ; for upgrading to NT3.5.
  8187. ; Also, rename some of the RasHub references in Software\Microsoft\NdisWan
  8188. ; as well as in the services area of the registry.
  8189. ;
  8190. Debug-Output "RenameRasHubToNdisWan: entry"
  8191. set Status = STATUS_FAILED
  8192. Set KeyNull = ""
  8193. OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) KeyNetcards
  8194. ifstr $(KeyNetcards) == $(KeyNull)
  8195. Debug-Output "RenameRasHubToNdisWan: could not open Netcards key"
  8196. goto RenameRasHubToNdisWanEnd
  8197. endif
  8198. EnumRegKey $(KeyNetcards) NetcardsList
  8199. ForListDo $(NetcardsList)
  8200. set KeyName = *($($),1)
  8201. OpenRegKey $(KeyNetcards) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  8202. ifstr $(Card) == $(KeyNull)
  8203. Debug-Output "RenameRasHubToNdisWan: could not open netcard key"
  8204. CloseRegKey $(KeyNetcards)
  8205. goto RenameRasHubToNdisWanEnd
  8206. endif
  8207. GetRegValue $(Card), "ProductName" ProductNameInfo
  8208. set CardProductName = *($(ProductNameInfo), 4)
  8209. ifstr(i) $(CardProductName) == $(!ProductRASHUBDIALINName)
  8210. set ThisOption = DIALIN
  8211. else-ifstr(i) $(CardProductName) == $(!ProductRASHUBDIALOUTName)
  8212. set ThisOption = DIALOUT
  8213. else-ifstr(i) $(CardProductName) == $(!ProductRASHUBDIALINIPName)
  8214. set ThisOption = DIALINIP
  8215. else-ifstr(i) $(CardProductName) == $(!ProductRASHUBDIALOUTIPName)
  8216. set ThisOption = DIALOUTIP
  8217. else-ifstr(i) $(CardProductName) == $(!ProductRASHUBDIALINOUTIPXName)
  8218. set ThisOption = DIALINOUTIPX
  8219. else
  8220. goto endloop
  8221. endif
  8222. SetRegValue $(Card) {ProductName, 0, +
  8223. $(!REG_VT_SZ),$(!ProductNDISWAN$(ThisOption)Name)}
  8224. SetRegValue $(Card) {Description, 0, +
  8225. $(!REG_VT_SZ),$(!ProductNDISWANDescription)}
  8226. SetRegValue $(Card) {ServiceName, 0, $(!REG_VT_SZ), +
  8227. $(!ProductNDISWANName)$(KeyName)}
  8228. SetRegValue $(Card) {Title, 0, $(!REG_VT_SZ),+
  8229. "["$(KeyName)"] "$(!ProductNDISWANTitle)}
  8230. OpenRegKey $(Card) "" "NetRules" $(!MAXIMUM_ALLOWED) NetRules
  8231. ifstr $(NetRules) == $(KeyNull)
  8232. CloseRegKey $(KeyNetCards)
  8233. CloseRegKey $(Card)
  8234. Debug-Output "RenameRasHubToNdisWan: could not open "$(KeyName)"\NetRules key"
  8235. goto RenameRasHubToNdisWanEnd
  8236. Endif
  8237. ;Modified on 9/24/96 by Ramc - changed NDISWAN to ROUTING
  8238. SetRegValue $(NetRules) {InfOption, 0, +
  8239. $(!REG_VT_SZ), "RAS"}
  8240. SetRegValue $(NetRules) {block, 0, +
  8241. $(!REG_VT_MULTI_SZ),$(!NetRuleHardware$(ThisOption)Block)}
  8242. SetRegValue $(NetRules) {class, 0, +
  8243. $(!REG_VT_MULTI_SZ),$(!NetRuleHardware$(ThisOption)Class)}
  8244. SetRegValue $(NetRules) {type, 0, +
  8245. $(!REG_VT_SZ),$(!NetRuleHardware$(ThisOption)Type)}
  8246. Set TempProdName = """"$(!ProductNDISWANName)$(KeyName)""""
  8247. Set TempBindForm = $(TempProdName)$(!NetRuleHardwareNDISWANBindForm)
  8248. SetRegValue $(NetRules) {bindform, 0, $(!REG_VT_SZ),$(TempBindForm)}
  8249. CloseRegKey $(NetRules)
  8250. endloop=+
  8251. CloseRegKey $(Card)
  8252. EndForListDo
  8253. CloseRegKey $(KeyNetcards)
  8254. set Status = STATUS_SUCCESSFUL
  8255. RenameRasHubToNdisWanEnd =+
  8256. Debug-Output "RenameRasHubToNdisWan: Exit"
  8257. return $(Status)
  8258. [UpgradeIpxInfo]
  8259. ; This routine is invoked during upgrade.
  8260. ; If RAS is configured for NWLNKIPX, then rename the IPXROUTER
  8261. ; key to NWLNKRIP and rename occurances of isnrip.sys to nwlnkrip.sys.
  8262. ; Change the RemoteAccess service dependency to depend on NWLNKRIP service.
  8263. ; Add the NwlnkRip\Parameters\UseRef key to indicate RAS is using the service.
  8264. ; If SAP agent was installed by RAS, remove and install
  8265. ; the service by shelling the OEMNSVSA.INF file so that SAP
  8266. ; agent can be shared by NCP server.
  8267. ; Also if NWLNRIP service was installed by RAS, reinstall it using the
  8268. ; common installer.
  8269. ; And add some parameters to Services\NwlnkIpx\Parameters.
  8270. Debug-Output "UpgradeIpxInfo: entry"
  8271. set PORTSDLGHANDLE = $($0)
  8272. set RasProtocolsName = $(!NTN_SoftwareBase)"\Microsoft\Ras\Protocols"
  8273. set SapAgentName = $(!NTN_SoftwareBase)"\Microsoft\NWSAPAGENT"
  8274. set NwlnkRipName = $(!NTN_SoftwareBase)"\Microsoft\NWLNKRIP"
  8275. set IpxRouterName = $(!NTN_ServiceBase)"\IpxRouter"
  8276. OpenRegKey $(!REG_H_LOCAL) "" +
  8277. $(RasProtocolsName) $(!MAXIMUM_ALLOWED) KeyProtocols
  8278. ifstr $(KeyProtocols) != ""
  8279. set fIpxAllowed = 0
  8280. GetRegValue $(KeyProtocols) "fIpxAllowed" IpxList
  8281. ifint $(RegLastError) == 0
  8282. set fIpxAllowed = *($(IpxList), 4)
  8283. endif
  8284. ifint $(fIpxAllowed) != 0
  8285. Debug-Output "UpgradeIpxInfo: RAS is configured for IPX dialin"
  8286. ; check to see if the IpxRouter service exists
  8287. set KeyRouter = ""
  8288. OpenRegKey $(!REG_H_LOCAL) "" +
  8289. $(IpxRouterName) $(!MAXIMUM_ALLOWED) KeyRouter
  8290. ifstr $(KeyRouter) != ""
  8291. CloseRegKey $(KeyRouter)
  8292. Debug-Output "Renaming IpxRouter to NwlnkRip..."
  8293. LibraryProcedure Result $(PORTSDLGHANDLE) RenameIpxRouterToNwlnkRip
  8294. Shell "" RemoveServiceDependency "RemoteAccess" "IpxRouter"
  8295. ; Shell "" AddServiceDependency "RemoteAccess" "NwlnkRip"
  8296. Debug-Output "Renaming IpxRouter to NwlnkRip done..."
  8297. endif
  8298. ; ; now add Parameters\UseRef to indicate that RAS is using
  8299. ; ; NwlnkRip service
  8300. ; OpenRegKey $(!REG_H_LOCAL) "" $(!RasIsnRipKeyName) +
  8301. ; $(!MAXIMUM_ALLOWED) KeyService
  8302. ; ifstr $(KeyService) != ""
  8303. ; OpenRegKey $(KeyService) "" "Parameters" +
  8304. ; $(!MAXIMUM_ALLOWED) KeyParams
  8305. ; ifstr(i) $(KeyParams) != ""
  8306. ; ; add the NetbiosRouting parameter (if it is not already there)
  8307. ; ; and enable the WAN bit - this allows wan->lan type 20 broadcast
  8308. ;
  8309. ; GetRegValue $(KeyParams) "NetbiosRouting" NetbiosRoutingInfo
  8310. ; Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  8311. ; set NetbiosRouting = *($(NetbiosRoutingInfo), 4)
  8312. ; else
  8313. ; ; not defined, so set the default value
  8314. ; set NetbiosRouting = 2
  8315. ; endif
  8316. ;
  8317. ; set NetbiosRouting = *($(NetbiosRoutingInfo), 4)
  8318. ; ; Now enable the WAN bit
  8319. ; ifint $(NetbiosRouting) == 0
  8320. ; set NetbiosRouting = 2
  8321. ; else-ifint $(NetbiosRouting) == 1
  8322. ; set NetbiosRouting = 3
  8323. ; endif
  8324. ;
  8325. ; SetRegValue $(KeyParams) {"NetbiosRouting" , 0, $(!REG_VT_DWORD), $(NetbiosRouting)}
  8326. ; endif
  8327. ;
  8328. ; OpenRegKey $(KeyService) "" "Parameters\UseRef" +
  8329. ; $(!MAXIMUM_ALLOWED) KeyUseRef
  8330. ; ifstr(i) $(KeyUseRef) == ""
  8331. ; ifstr(i) $(KeyParams) != ""
  8332. ; CreateRegKey $(KeyParams) {"UseRef", 0, GenericClass} +
  8333. ; "" $(!MAXIMUM_ALLOWED) "" KeyUseRef
  8334. ; CloseRegKey $(KeyParams)
  8335. ; endif
  8336. ; endif
  8337. ; ifstr(i) $(KeyUseRef) != ""
  8338. ; SetRegValue $(KeyUseRef) {"RAS" , 0, $(!REG_VT_SZ), "1"}
  8339. ; CloseRegKey $(KeyUseRef)
  8340. ; endif
  8341. ; CloseRegKey $(KeyService)
  8342. ; endif
  8343. ; ; if SAP agent was installed by RAS, remove and install it using
  8344. ; ; the common SAP agent installer.
  8345. ; OpenRegKey $(!REG_H_LOCAL) "" $(SapAgentName) +
  8346. ; $(!MAXIMUM_ALLOWED) KeyService
  8347. ; ifstr $(KeyService) == ""
  8348. ; OpenRegKey $(!REG_H_LOCAL) "" $(!RasIsnSapKeyName) +
  8349. ; $(!MAXIMUM_ALLOWED) KeySap
  8350. ; Ifstr(i) $(KeySap) != ""
  8351. ; ; remove the service using DeleteService
  8352. ; Shell "utility.inf", RemoveService +
  8353. ; $(!ProductRASISNSAPName) "YES"
  8354. ; Shell "" InstallIsnSapService
  8355. ; endif
  8356. ; CloseRegKey $(KeySap)
  8357. ; else
  8358. ; CloseRegKey $(KeyService)
  8359. ; endif
  8360. ; ; if NWLNKRIP was installed by RAS, reinstall it using
  8361. ; ; the common NWLNKRIP service installer. We don't remove it first
  8362. ; ; (unlike the SAP agent) because the NWLNKRIP installer
  8363. ; ; creates the SOFTWARE registry key on our behalf and we want
  8364. ; ; to retain the parameters created earlier.
  8365. ; Modified by RamC on 10/11/96 - routing related changes
  8366. ; we don't install nwlnkrip service any more because it
  8367. ; is part of router service now.
  8368. ;
  8369. ; OpenRegKey $(!REG_H_LOCAL) "" $(NwlnkRipName) +
  8370. ; $(!MAXIMUM_ALLOWED) KeyService
  8371. ; ifstr $(KeyService) == ""
  8372. ; OpenRegKey $(!REG_H_LOCAL) "" $(!RasIsnRipKeyName) +
  8373. ; $(!MAXIMUM_ALLOWED) KeyRip
  8374. ; Ifstr(i) $(KeyRip) != ""
  8375. ; Shell "" InstallNwlnkRipService
  8376. ; CloseRegKey $(KeyRip)
  8377. ; else
  8378. ; CloseRegKey $(KeyService)
  8379. ; endif
  8380. ; set some parameters in the NWLNKIPX\Parameters area
  8381. OpenRegKey $(!REG_H_LOCAL) "" +
  8382. $(!NTN_ServiceBase)"\NWLNKIPX\Parameters" +
  8383. $(!MAXIMUM_ALLOWED) KeyIpxParameters
  8384. ifstr $(KeyIpxParameters) != $(KeyNull)
  8385. ; add the parameters only if they don't already exist
  8386. GetRegValue $(KeyIpxParameters), "SingleNetworkActive" +
  8387. SingleNetworkActive
  8388. ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  8389. SetRegValue $(KeyIpxParameters) +
  8390. {SingleNetworkActive, 0, $(!REG_VT_DWORD), 1}
  8391. endif
  8392. GetRegValue $(KeyIpxParameters), "DisableDialoutSap" +
  8393. DisableDialoutSap
  8394. ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  8395. SetRegValue $(KeyIpxParameters) +
  8396. {DisableDialoutSap, 0, $(!REG_VT_DWORD), 1}
  8397. endif
  8398. GetRegValue $(KeyIpxParameters), "DisableDialinNetbios" +
  8399. DisableDialinNetbios
  8400. ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  8401. SetRegValue $(KeyIpxParameters) +
  8402. {DisableDialinNetbios, 0, $(!REG_VT_DWORD), 1}
  8403. endif
  8404. CloseRegKey $(KeyIpxParameters)
  8405. Endif
  8406. else
  8407. Debug-Output "OEMNSVRA.INF: error opening NWLNKIPX\Parameters key"
  8408. endif
  8409. endif
  8410. CloseRegKey $(KeyProtocols)
  8411. else
  8412. Debug-Output "UpgradeIpxInfo: error opening RAS\Protocols key"
  8413. endif
  8414. Debug-Output "UpgradeIpxInfo: exit"
  8415. return
  8416. [SaveTcpipInfo]
  8417. ; copy the Tcpip information from SOFTWARE\Microsoft\RAS\Protocols\Ip to
  8418. ; services\remoteaccess\parameters\Ip
  8419. ; unless the caller wants the IP info to be removed
  8420. Debug-Output "SaveTcpipInfo: entry - AddIpInfo = "$($0)
  8421. set AddTcpInfo = $($0)
  8422. set Status = STATUS_FAILED
  8423. Set KeyNull = ""
  8424. set RasIpKeyName = $(!NTN_SoftwareBase)"\Microsoft\Ras\Protocols\Ip"
  8425. set RasSvrParamKeyName = $(!NTN_ServiceBase)"\RemoteAccess\Parameters"
  8426. OpenRegKey $(!REG_H_LOCAL) "" $(RasIpKeyName) $(!MAXIMUM_ALLOWED) RasIpKey
  8427. ifstr $(RasIpKey) != $(KeyNull)
  8428. OpenRegKey $(!REG_H_LOCAL) "" $(RasSvrParamKeyName) $(!MAXIMUM_ALLOWED) KeySrvParams
  8429. ifstr $(KeySrvParams) == $(KeyNull)
  8430. Debug-Output "SaveTcpipInfo: could not open RasSvr Params key"
  8431. CloseRegKey $(RasIpKey)
  8432. return $(Status)
  8433. endif
  8434. ifstr(i) $(AddTcpInfo) == TRUE
  8435. CreateRegKey $(KeySrvParams) {"Ip",$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" RemoteIpKey
  8436. OpenRegKey $(KeySrvParams) "" "Ip" $(!MAXIMUM_ALLOWED) RemoteIpKey
  8437. ifstr $(RemoteIpKey) != $(KeyNull)
  8438. EnumRegValue $(RasIpKey) NewValueList
  8439. Shell "utility.inf", AddValueList, $(RemoteIpKey), $(NewValueList)
  8440. CloseRegKey $(RemoteIpKey)
  8441. endif
  8442. else
  8443. ; no dialin ports configured, so remove IP info
  8444. Debug-Output "SaveTpcipInfo: removing ip info"
  8445. DeleteRegTree $(KeySrvParams) "IP"
  8446. endif
  8447. CloseRegKey $(RasIpKey)
  8448. CloseRegKey $(KeySrvParams)
  8449. endif
  8450. Debug-Output "SaveTcpipInfo: exit"
  8451. set Status = STATUS_SUCCESSFUL
  8452. return $(Status)
  8453. [SaveIpxInfo]
  8454. ; copy the IPX information from SOFTWARE\Microsoft\RAS\Protocols\Ipx to
  8455. ; services\remoteaccess\parameters\Ipx
  8456. ; unless the caller wants the IPX info to be removed
  8457. Debug-Output "SaveIpxInfo: entry RouterInstalled= "$($0)" AddIpxInfo = "$($1)
  8458. set RouterInstalled = $($0)
  8459. set AddIpxInfo = $($1)
  8460. set Status = STATUS_FAILED
  8461. Set KeyNull = ""
  8462. set RasIpxKeyName = $(!NTN_SoftwareBase)"\Microsoft\Ras\Protocols\Ipx"
  8463. set RasSvrParamKeyName = $(!NTN_ServiceBase)"\RemoteAccess\Parameters"
  8464. OpenRegKey $(!REG_H_LOCAL) "" $(RasIpxKeyName) $(!MAXIMUM_ALLOWED) RasIpxKey
  8465. ifstr $(RasIpxKey) != $(KeyNull)
  8466. OpenRegKey $(!REG_H_LOCAL) "" $(RasSvrParamKeyName) +
  8467. $(!MAXIMUM_ALLOWED) KeySrvParams
  8468. ifstr $(KeySrvParams) == $(KeyNull)
  8469. Debug-Output "SaveTcpipInfo: could not open RasSvr Params key"
  8470. CloseRegKey $(RasIpxKey)
  8471. return $(Status) $(fRouterInstalled)
  8472. endif
  8473. ifstr(i) $(AddIpxInfo) == TRUE
  8474. CreateRegKey $(KeySrvParams) {"Ipx",$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" RemoteIpxKey
  8475. OpenRegKey $(KeySrvParams) "" "Ipx" $(!MAXIMUM_ALLOWED) RemoteIpxKey
  8476. ifstr $(RemoteIpxKey) != $(KeyNull)
  8477. EnumRegValue $(RasIpxKey) NewValueList
  8478. Shell "utility.inf", AddValueList, $(RemoteIpxKey), $(NewValueList)
  8479. SetRegValue $(RemoteIpxKey) {RouterInstalled, 0,$(!REG_VT_DWORD), $(RouterInstalled)}
  8480. CloseRegKey $(RemoteIpxKey)
  8481. endif
  8482. else
  8483. Debug-Output "SaveIpxInfo: removing ipx info"
  8484. DeleteRegTree $(KeySrvParams) "IPX"
  8485. endif
  8486. CloseRegKey $(KeySrvParams)
  8487. CloseRegKey $(RasIpxKey)
  8488. endif
  8489. Debug-Output "SaveIpxInfo: exit"
  8490. set Status = STATUS_SUCCESSFUL
  8491. return $(Status)
  8492. [AddServiceDependency]
  8493. ; This routine adds the service dependency
  8494. ; Input: $($0) is the dependent service
  8495. ; $($1) is the service $($0) depends on
  8496. Debug-Output "AddServiceDependency: entry"
  8497. set Status = STATUS_FAILED
  8498. Set KeyNull = ""
  8499. set DependentService = $(!NTN_ServiceBase)\$($0)
  8500. set DependentName = $($0)
  8501. set DependOn = $($1)
  8502. set ServiceKey = $(KeyNull)
  8503. OpenRegKey $(!REG_H_LOCAL) "" $(DependentService)"\Linkage" $(!MAXIMUM_ALLOWED) ServiceKey
  8504. ifstr(i) $(ServiceKey) != $(KeyNull)
  8505. GetRegValue $(ServiceKey) "OtherDependencies" ServicesList
  8506. ifint $(RegLastError) != 0
  8507. set ServiceValues = {}
  8508. else
  8509. set ServiceValues = *($(ServicesList),4)
  8510. endif
  8511. debug-output "AddServiceDependency: Old OtherDependencies: "$(ServiceValues)
  8512. ifstr(i) $(ServiceValues) == {}
  8513. Set ServiceValues = {$(DependOn)}
  8514. else-ifstr(i) $(ServiceValues) == ""
  8515. Set ServiceValues = {$(DependOn)}
  8516. else-ifcontains(i) $(DependOn) in $(ServiceValues)
  8517. ; It is already there!! something is wrong, but it doesn't matter
  8518. return STATUS_SUCCESSFUL
  8519. else
  8520. ; Add to the dependcy list
  8521. Set ServiceValues = >($(ServiceValues), $(DependOn))
  8522. endif
  8523. debug-output "AddServiceDependency: New OtherDependencies: "$(ServiceValues)
  8524. SetRegValue $(ServiceKey) {OtherDependencies, 0,+
  8525. $(!REG_VT_MULTI_SZ), $(ServiceValues)}
  8526. CloseRegKey $(ServiceKey)
  8527. set Status = STATUS_SUCCESSFUL
  8528. else
  8529. Debug-Output "AddServiceDependency: error opening service "$(DependentService)"\Linkage"
  8530. endif
  8531. set KeyService = $(KeyNull)
  8532. OpenRegKey $(!REG_H_LOCAL) "" $(DependentService) $(!MAXIMUM_ALLOWED) KeyService
  8533. ifstr $(KeyService) != $(KeyNull)
  8534. set newDependList = {$(DependOn)}
  8535. GetRegValue $(KeyService) "DependOnService" ServiceList
  8536. ifint $(RegLastError) == 0
  8537. Debug-Output "AddServiceDependency: old DependOnService List "*($(ServiceList), 4)
  8538. ForListDo *($(ServiceList),4)
  8539. ifstr(i) $($) != $(DependOn)
  8540. set newDependList = >($(newDependList), $($))
  8541. endif
  8542. EndForListDo
  8543. endif
  8544. GetRegValue $(KeyService) "DependOnGroup" GrpList
  8545. ifint $(RegLastError) == 0
  8546. Debug-Output "AddServiceDependency: old DependOnGroup List "*($(GrpList), 4)
  8547. ForListDo *($(GrpList),4)
  8548. set grp = "+"$($)
  8549. set newDependList = >($(newDependList), $(grp))
  8550. EndForListDo
  8551. endif
  8552. Debug-Output "OEMNSVRA.INF: AddServiceDependency: new Dependency List "$(newDependList)
  8553. LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, $(DependentName) $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), "", "", $(newDependList), "", "", ""
  8554. CloseRegKey $(KeyService)
  8555. else
  8556. Debug-Output "AddServiceDependency: failed to open service linkage key"$(DependentService)
  8557. endif
  8558. Debug-Output "AddServiceDependency: exit"
  8559. return $(Status)
  8560. [RemoveServiceDependency]
  8561. ; This routine removes the service dependency
  8562. ; Input: $($0) is the dependent service
  8563. ; $($1) is the service $($0) should not depend on
  8564. Debug-Output "RemoveServiceDependency: entry"
  8565. set Status = STATUS_FAILED
  8566. Set KeyNull = ""
  8567. set DependentService = $(!NTN_ServiceBase)\$($0)
  8568. set DependentName = $($0)
  8569. set DependOn = $($1)
  8570. OpenRegKey $(!REG_H_LOCAL) "" $(DependentService)"\Linkage" $(!MAXIMUM_ALLOWED) ServiceKey
  8571. ifstr(i) $(ServiceKey) != $(KeyNull)
  8572. GetRegValue $(ServiceKey) "OtherDependencies" ServicesList
  8573. ifint $(RegLastError) != 0
  8574. set ServiceValues = {}
  8575. else
  8576. set ServiceValues = *($(ServicesList),4)
  8577. endif
  8578. debug-output "RemoveServiceDependency: old OtherDependencies list:"$(ServicesList)
  8579. set ServiceValues = *($(ServicesList),4)
  8580. debug-output "ServiceValues: "$(ServiceValues)
  8581. ifcontains(i) $(DependOn) in $(ServiceValues)
  8582. ; Remove RasArp from the dependcy list
  8583. set NewServiceValues = {}
  8584. ForListDo $(ServiceValues)
  8585. ifstr(i) $($) != $(DependOn)
  8586. set NewServiceValues = >($(NewServiceValues), $($))
  8587. endif
  8588. EndForListDo
  8589. debug-output "RemoveServiceDependency: new OtherDependencies list: "$(NewServiceValues)
  8590. SetRegValue $(ServiceKey) {OtherDependencies, 0,+
  8591. $(!REG_VT_MULTI_SZ), $(NewServiceValues)}
  8592. else
  8593. ; something wrong...
  8594. endif
  8595. CloseRegKey $(ServiceKey)
  8596. set Status = STATUS_SUCCESSFUL
  8597. else
  8598. Debug-Output "RemoveServiceDependency: error opening service "$(DependentService)"\Linkage"
  8599. endif
  8600. set KeyService = $(KeyNull)
  8601. OpenRegKey $(!REG_H_LOCAL) "" $(DependentService) $(!MAXIMUM_ALLOWED) KeyService
  8602. ifstr $(KeyService) != $(KeyNull)
  8603. set newDependList = {}
  8604. GetRegValue $(KeyService) "DeleteFlag" DeleteFlagValue
  8605. ; make sure the service is not marked for deletion
  8606. ifint $(RegLastError) != 0
  8607. GetRegValue $(KeyService) "DependOnService" ServiceList
  8608. ifint $(RegLastError) == 0
  8609. Debug-Output "RemoveServiceDependency: old DependOnService List "*($(ServiceList), 4)
  8610. ifcontains(i) $(DependOn) in *($(ServiceList),4)
  8611. ForListDo *($(ServiceList),4)
  8612. ifstr(i) $($) != $(DependOn)
  8613. set newDependList = >($(newDependList), $($))
  8614. endif
  8615. EndForListDo
  8616. ; now get any existing group dependencies
  8617. GetRegValue $(KeyService) "DependOnGroup" GrpList
  8618. ifint $(RegLastError) == 0
  8619. ForListDo *($(GrpList),4)
  8620. set grp = "+"$($)
  8621. set newDependList = >($(newDependList), $(grp))
  8622. EndForListDo
  8623. endif
  8624. Debug-Output "OEMNSVRA.INF:RemoveServiceDependency: new DependOnService List "$(newDependList)
  8625. LibraryProcedure Result, $(!LIBHANDLE), +
  8626. SetupChangeServiceConfig, $(DependentName) +
  8627. $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), +
  8628. $(!SERVICE_NO_CHANGE), "", "", +
  8629. $(newDependList), "", "", ""
  8630. endif
  8631. endif
  8632. endif
  8633. CloseRegKey $(KeyService)
  8634. else
  8635. Debug-Output "RemoveServiceDependency: failed to open service linkage key"$(DependentService)
  8636. endif
  8637. Debug-Output "RemoveServiceDependency: exit"
  8638. return $(Status)
  8639. [SetLanOnlyMode]
  8640. ; This routine removes sets Router\Parameters\LanOnlyMode value to the
  8641. ; value passed as parameter 0
  8642. ; Input: $($0) is the value for LanOnlyMode
  8643. Debug-Output "SetLanOnlyMode: entry"
  8644. set Status = STATUS_FAILED
  8645. Set KeyNull = ""
  8646. set RouterParam = $(!NTN_ServiceBase)"\Router\Parameters"
  8647. set LanOnlyModeValue = $($0)
  8648. OpenRegKey $(!REG_H_LOCAL) "" $(RouterParam) $(!MAXIMUM_ALLOWED) KeyRtrParam
  8649. ifstr(i) $(KeyRtrParam) != $(KeyNull)
  8650. SetRegValue $(KeyRtrParam) {LanOnlyMode, $(NoTitle), $(!REG_VT_DWORD), $(LanOnlyModeValue)}
  8651. CloseRegKey $(KeyRtrParam)
  8652. set Status = STATUS_SUCCESSFUL
  8653. else
  8654. Debug-Output "SetLanOnlyMode: failed to open Router\parameters key"$(RouterParam)
  8655. endif
  8656. Debug-Output "SetLanOnlyMode: exit"
  8657. return $(Status)
  8658. ;-----------------------------------------------------------------------
  8659. ; ROUTINE: QueryUserQuit
  8660. ;
  8661. ; DESCRIPTION: This routine queries whether the user wants to quit setup
  8662. ;
  8663. ; INPUTS: None
  8664. ;
  8665. ; OUTPUTS: $R0: Status: STATUS_SUCCESSFUL |
  8666. ; STATUS_FAILED
  8667. ;
  8668. ; $R1: UserAction: OK | CANCEL
  8669. ;
  8670. ;------------------------------------------------------------------------
  8671. [QueryUserQuit]
  8672. set Status = STATUS_FAILED
  8673. set UserAction = CANCEL
  8674. ;
  8675. ; read in quit message
  8676. ;
  8677. set STF_MB_TEXT = "The changes will not be saved. "+
  8678. "Are you sure you want to exit Setup."
  8679. read-syms ExitWarningDlg$(!STF_LANGUAGE)
  8680. ui start "ExitWarning"
  8681. ifstr(i) $(DLGEVENT) == "YES"
  8682. set Status = STATUS_SUCCESSFUL
  8683. set UserAction = "OK"
  8684. else-ifstr(i) $(DLGEVENT) == "NO"
  8685. set Status = STATUS_SUCCESSFUL
  8686. set UserAction = "CANCEL"
  8687. else
  8688. endif
  8689. fin_QueryUserQuit = +
  8690. Return $(Status) $(UserAction)
  8691. ;----------------------------------------------
  8692. ; EXIT Remote Access Service warning dialog
  8693. ;----------------------------------------------
  8694. ;-----------------------------------------------------------------------
  8695. ; ROUTINE: QueryRasUpgrade
  8696. ;
  8697. ; DESCRIPTION: This routine queries whether the user wants to upgrade to
  8698. ; the new Ras version.
  8699. ;
  8700. ; INPUTS: $0: ProductTitle
  8701. ; $1: InstalledVersion
  8702. ; $2: new version
  8703. ;
  8704. ; OUTPUTS: $R0: Status: STATUS_SUCCESSFUL |
  8705. ; STATUS_FAILED
  8706. ;
  8707. ; $R1: UserAction: OK | CANCEL
  8708. ;
  8709. ;------------------------------------------------------------------------
  8710. [QueryRasUpgrade]
  8711. set Status = STATUS_FAILED
  8712. set UserAction = CANCEL
  8713. ;
  8714. ; read in quit message
  8715. ;
  8716. read-syms RasUpgrade$(!STF_LANGUAGE)
  8717. set Text = $($0)$(Ver)$($1)$(Text1)$(Ver)$($2)$(Text2)$(Text3)
  8718. set STF_MB_TEXT = $(Text)
  8719. read-syms ExitWarningDlg$(!STF_LANGUAGE)
  8720. ui start "RasUpgrade"
  8721. ifstr(i) $(DLGEVENT) == "YES"
  8722. set Status = STATUS_SUCCESSFUL
  8723. set UserAction = "OK"
  8724. else-ifstr(i) $(DLGEVENT) == "NO"
  8725. set Status = STATUS_SUCCESSFUL
  8726. set UserAction = "CANCEL"
  8727. else
  8728. endif
  8729. fin_QueryRasUpgrade = +
  8730. Return $(Status) $(UserAction)
  8731. ;-----------------------------------------------
  8732. ; Input DIALOGS
  8733. ;-----------------------------------------------
  8734. [CP-List]
  8735. NBFCP = "%SystemRoot%\SYSTEM32\RASNBFCP.DLL"
  8736. IPCP = "%SystemRoot%\SYSTEM32\RASIPCP.DLL"
  8737. IPXCP = "%SystemRoot%\SYSTEM32\RASIPXCP.DLL"
  8738. ;ATALKCP = "%SystemRoot%\SYSTEM32\RASATCP.DLL"
  8739. PAP = "%SystemRoot%\SYSTEM32\RASPAP.DLL"
  8740. CHAP = "%SystemRoot%\SYSTEM32\RASCHAP.DLL"
  8741. SPAP = "%SystemRoot%\SYSTEM32\RASSPAP.DLL"
  8742. CBCP = "%SystemRoot%\SYSTEM32\RASCBCP.DLL"
  8743. COMPCP = "%SystemRoot%\SYSTEM32\RASCCP.DLL"
  8744. [Files-RemoveList]
  8745. ; Note that not all RAS files are removed when RAS is
  8746. ; removed.
  8747. ; rascfg.dll, rasphone.exe, rasphone.hlp, rasphone.cnt
  8748. ; rasadmin.exe, rasadmin.hlp, rasadmin.cnt
  8749. ; all files in system32\ras directory are not removed
  8750. ; because these are the files copied to the computer
  8751. ; during text mode setup and should always be present
  8752. ; so that ras can be setup.
  8753. ;
  8754. ; BUGBUG
  8755. ; Even the list below is not complete. Don't want to
  8756. ; mess with this so close to NT 4.0 rtm, but this should
  8757. ; be fixed for next release.
  8758. RASADMINDLL = $(!STF_WINDOWSSYSPATH)\RASADMIN.DLL
  8759. RASGTWYDLL = $(!STF_WINDOWSSYSPATH)\RASGTWY.DLL
  8760. RASGPRXYDLL = $(!STF_WINDOWSSYSPATH)\RASGPRXY.DLL
  8761. RASSRVEXE = $(!STF_WINDOWSSYSPATH)\RASSRV.EXE
  8762. RASCTRSDLL = $(!STF_WINDOWSSYSPATH)\RASCTRS.DLL
  8763. RASCTRSINI = $(!STF_WINDOWSSYSPATH)\RASCTRS.INI
  8764. RASCTRNMH = $(!STF_WINDOWSSYSPATH)\RASCTRNM.H
  8765. RASSPRXYEXE = $(!STF_WINDOWSSYSPATH)\RASSPRXY.EXE
  8766. RASSAUTHDLL = $(!STF_WINDOWSSYSPATH)\RASSAUTH.DLL
  8767. RASDIALEXE = $(!STF_WINDOWSSYSPATH)\RASDIAL.EXE
  8768. RASPHONEHLP = $(!STF_WINDOWSSYSPATH)\RASPHONE.HLP
  8769. RASGLOSSHLP = $(!STF_WINDOWSSYSPATH)\RASGLOSS.HLP
  8770. RASAPI32DLL = $(!STF_WINDOWSSYSPATH)\RASAPI32.DLL
  8771. RASCAUTHDLL = $(!STF_WINDOWSSYSPATH)\RASCAUTH.DLL
  8772. RASADMINHLP = $(!STF_WINDOWSSYSPATH)\RASADMIN.HLP
  8773. RASMANDLL = $(!STF_WINDOWSSYSPATH)\RASMAN.DLL
  8774. RASMANEXE = $(!STF_WINDOWSSYSPATH)\RASMAN.EXE
  8775. RASSERDLL = $(!STF_WINDOWSSYSPATH)\RASSER.DLL
  8776. RASIPXCPDLL = $(!STF_WINDOWSSYSPATH)\RASIPXCP.DLL
  8777. RASPPPDLL = $(!STF_WINDOWSSYSPATH)\RASPPP.DLL
  8778. RASPPPENDLL = $(!STF_WINDOWSSYSPATH)\RASPPPEN.DLL
  8779. RASPAPDLL = $(!STF_WINDOWSSYSPATH)\RASPAP.DLL
  8780. RASCHAPDLL = $(!STF_WINDOWSSYSPATH)\RASCHAP.DLL
  8781. RASSPAPDLL = $(!STF_WINDOWSSYSPATH)\RASSPAP.DLL
  8782. RASIPCPDLL = $(!STF_WINDOWSSYSPATH)\RASIPCP.DLL
  8783. RASIPHLPDLL = $(!STF_WINDOWSSYSPATH)\RASIPHLP.DLL
  8784. RASNBFCPDLL = $(!STF_WINDOWSSYSPATH)\RASNBFCP.DLL
  8785. RASNBIPCDLL = $(!STF_WINDOWSSYSPATH)\RASNBIPC.DLL
  8786. RASCCPDLL = $(!STF_WINDOWSSYSPATH)\RASCCP.DLL
  8787. RASCBCPDLL = $(!STF_WINDOWSSYSPATH)\RASCBCP.DLL
  8788. ASYNCMACSYS = $(!STF_WINDOWSSYSPATH)\DRIVERS\ASYNCMAC.SYS
  8789. NDISWANSYS = $(!STF_WINDOWSSYSPATH)\DRIVERS\NDISWAN.SYS
  8790. RASARPSYS = $(!STF_WINDOWSSYSPATH)\DRIVERS\RASARP.SYS