home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 November / pcwk_11_98a.iso / Pelnepl / Outlook / PL / nt4sp3 / i386 / oemnsvra.srv < prev    next >
INI File  |  1997-06-17  |  284KB  |  6,287 lines

  1. [Identification]
  2.     OptionType = NetService
  3. [Options]
  4.     RAS
  5. [GeneralConstants]
  6.     Chosen       = "ON"
  7.     NotChosen    = "OFF"
  8.     TRUE         = 1
  9.     FALSE        = 0
  10.     NoTitle      = 0
  11.     FLibraryErrCtl = 1
  12.     OldVersionExisted = $(FALSE)
  13. [FileConstants]
  14.     HandleNull   = ""
  15.     PORTSDLGHANDLE = $(HandleNull)
  16.     RasServerOption = "Server"
  17.     RasClientOption = "Client"
  18.     RasAdminOption  = "Admin"
  19.     RasClientAndServerOption = "ClientAndServer"
  20.     !Manufacturer        = "Microsoft"
  21.     !ProductMajorVersion = "4"
  22.     !ProductMinorVersion = "0"
  23.     ProductVersion       = $(!ProductMajorVersion)"."$(!ProductMinorVersion)
  24.     ProductOpSupport     = 134 
  25.     NetEventDLL = "%SystemRoot%\System32\netevent.dll"
  26.     IoLogMsgDll = "%SystemRoot%\System32\drivers\IoLogMsg.dll"
  27.     !RasMsgDll   = "%SystemRoot%\System32\rasmsg.dll"
  28.     !RasEventTypeSupported = 31
  29.     !HideComponent = 1
  30.     HideBindings  = 0
  31.     fReviewBindings = 1
  32.     !RasInfName     = "OEMNSVRA.INF"
  33.     ProductFullInfName = $(!STF_CWDDIR)$(!RasInfName)
  34.     RasDir      = $(!STF_CWDDIR)RAS
  35.     ProductPath = $(RasDir)"\"
  36.     ProductRASName        = "RAS"
  37.     ProductRASImagePath   = "%SystemRoot%\system32\ras"
  38.     ProductRASSvcType     = "service"
  39.     NetRuleRASClass       = "classRasService ""basic"""
  40.     NetRuleRASType        = "RasService classRasService"
  41.     NetRuleRASUse         = "system"
  42.     !ProductPCIMACName     = "PCIMAC"
  43.     ProductRASSVRName       = "RemoteAccess"
  44.     ProductRASSVRImagePath  = "%SystemRoot%\system32\rassrv.exe"
  45.     ProductRASSVRSvcType    = "service"
  46.     NetRuleRASSVRClass      = "classRasServer ""basic"""
  47.     NetRuleRASSVRType       = "RasServer classRasServer"
  48.     NetRuleRASSVRUse        = $(ProductRASSVRSvcType)
  49.     NetRuleRASSVRBindForm   = """RasServer"" yes yes container"
  50.     NetRuleRASSVRBindable    = {"classRasServer netBiosTransport non non 100",+
  51.                                 "classRasServer ipxTransport non non 100"}
  52.     ProductRASMANName       = "RasMan"
  53.     ProductRASMANImagePath  = "%SystemRoot%\system32\rasman.exe"
  54.     ProductRASMANSvcType    = "service"
  55.     NetRuleRASMANClass      = "classRasManager ""basic"""
  56.     NetRuleRASMANType       = "RasManager classRasManager"
  57.     NetRuleRASMANUse        = $(ProductRASMANSvcType)
  58.     NetRuleRASMANBindForm   = """RasManager"" yes no container"
  59.     NetRuleRASMANBindable   = ""
  60.     !ProductRASARPName       = "RasArp"
  61.     !ProductRASARPImagePath  = "\SystemRoot\system32\drivers\rasarp.sys"
  62.     !ProductRASISNRIPName       = "NwlnkRip"
  63.     !ProductRASISNSAPName       = "NwSapAgent"
  64.     !ProductRASISNRIPImagePath  = "\SystemRoot\system32\drivers\nwlnkrip.sys"
  65.     !ProductRASISNSAPImagePath  = "%SystemRoot%\system32\services.exe"
  66.     !ProductRASAUTODIALName       = "RasAuto"
  67.     !ProductRASAUTODIALImagePath  = "%SystemRoot%\system32\rasman.exe"
  68.     !ProductRASAUTODIALSvcType    = "service"
  69.     !ProductRASACDName       = "RasAcd"
  70.     !ProductRASACDImagePath  = "\SystemRoot\system32\drivers\rasacd.sys"
  71.     !ProductNDISWANName        = "NdisWan"
  72.     !ProductNDISWANImagePath = "\SystemRoot\system32\drivers\ndiswan.sys"
  73.     ProductNDISWANSvcType   = "kernel"
  74.     ProductNDISWANType        = "transport"
  75.     !NetRuleNDISWANType        = "ndisWanDrv ndisWanTransport"
  76.     !NetRuleNDISWANClass     = {"ndisWanTransport basic"}
  77.     NetRuleNDISWANUse        = $(ProductNDISWANType)" yes yes"
  78.     !NetRuleNDISWANBindForm  = """NdisWan"" yes no container"
  79.     !NetRuleNDISWANBindable  = +
  80.           {"rasCapableTransport ndisWanAdapterDialIn non non 100",+
  81.            "rasCapableTransport ndisWanAdapterDialOut non non 100",+
  82.            "tcpipTransport ndisWanAdapterDialInIP non non 100",+
  83.            "tcpipTransport ndisWanAdapterDialOutIP non non 100",+
  84.            "netbtTransport ndisWanAdapterDialInIP non non 100",+
  85.            "netbtTransport ndisWanAdapterDialOutIP non non 100",+
  86.            "ipxTransport ndisWanAdapterDialInOutIPX non non 100",+
  87.            "bhService    ndisWanAdapterBH non non 100",+
  88.            "ndisWanTransport ndisWanAdapterBH non non 100",+
  89.            "ndisWanTransport ndisWanAdapterDialIn non non 100",+
  90.            "ndisWanTransport ndisWanAdapterDialOut non non 100",+
  91.            "ndisWanTransport ndisWanAdapterDialInIP non non 100",+
  92.            "ndisWanTransport ndisWanAdapterDialOutIP non non 100",+
  93.            "ndisWanTransport ndisWanAdapterDialInOutIPX non non 100"}
  94.     ProductRASASYMACName      = "AsyncMac"
  95.     ProductRASASYMACImagePath = "\SystemRoot\system32\drivers\asyncmac.sys"
  96.     ProductRASASYMACType      = "driver"
  97.     ProductRASASYMACSvcType   = "kernel"
  98.     NetRuleRASASYMACType      = "rasAsyMacDrv rasAsyMacDriver"
  99.     NetRuleRASASYMACClass      = {"rasAsyMacDriver basic"}
  100.     NetRuleRASASYMACUse      = $(ProductRASASYMACType)
  101.     NetRuleRASASYMACBindForm  = """RasAsyMac"" yes no container"
  102.     !NetRuleRASASYMACBindable  = +
  103.                        {"rasAsyMacDriver rasAsyMacAdapter non non 100"}
  104.     !ProductRASHUBDIALINName        = "RasHubDialin"
  105.     !ProductRASHUBDIALOUTName        = "RasHubDialout"
  106.     !ProductRASHUBDIALINIPName      = "RasHubDialinIp"
  107.     !ProductRASHUBDIALOUTIPName     = "RasHubDialoutIp"
  108.     !ProductRASHUBDIALINOUTIPXName  = "RasHubDialinoutIpx"
  109.     !ProductNDISWANDIALINName          = "NdisWanDialin"
  110.     !ProductNDISWANDIALOUTName          = "NdisWanDialout"
  111.     !ProductNDISWANDIALINIPName       = "NdisWanDialinIp"
  112.     !ProductNDISWANDIALOUTIPName      = "NdisWanDialoutIp"
  113.     !ProductNDISWANDIALINOUTIPXName   = "NdisWanDialinoutIpx"
  114.     !NetRuleHardwareBHType      = "ndisWanBH ndisWanAdapterBH"
  115.     !NetRuleHardwareBHClass     = {"ndisWanAdapterBH basic"}
  116.     !NetRuleHardwareBHBindForm  = " yes yes container"
  117.     !NetRuleHardwareNDISWANBindForm = " yes yes container"
  118.     !NetRuleHardwareDIALINType      = "ndiswandialin ndisWanAdapterDialIn"
  119.     !NetRuleHardwareDIALINClass      = {"ndisWanAdapterDialIn basic"}
  120.     !NetRuleHardwareDIALINBlock    = {"lanmanServer ndisWanAdapterDialIn",+
  121.                      "tcpipTransport ndisWanAdapterDialIn",+
  122.                      "netbtTransport ndisWanAdapterDialIn",+
  123.                      "ipxTransport ndisWanAdapterDialin",+
  124.                      "lanmanWorkstation ndisWanAdapterDialIn"}
  125.     !NetRuleHardwareDIALINIPType     = "ndiswandialinIP ndisWanAdapterDialInIP"
  126.     !NetRuleHardwareDIALINIPClass    = {"ndisWanAdapterDialInIP basic"}
  127.     !NetRuleHardwareDIALINIPBlock    = {"lanmanServer ndisWanAdapterDialInIP",+
  128.                       "nbfTransport ndisWanAdapterDialinIP",+
  129.                       "ipxTransport ndisWanAdapterDialinIP",+
  130.                       "lanmanWorkstation ndisWanAdapterDialInIP"}
  131.     !NetRuleHardwareDIALOUTType       = "ndiswandialout ndisWanAdapterDialOut"
  132.     !NetRuleHardwareDIALOUTClass    = {"ndisWanAdapterDialOut basic"}
  133.     !NetRuleHardwareDIALOUTBlock    = {"ipxTransport ndisWanAdapterDialOut"}
  134.     !NetRuleHardwareDIALOUTIPType     = "ndiswandialoutIP ndisWanAdapterDialOutIP"
  135.     !NetRuleHardwareDIALOUTIPClass    = {"ndisWanAdapterDialOutIP basic"}
  136.     !NetRuleHardwareDIALOUTIPBlock    = {"ipxTransport ndisWanAdapterDialOutIP",+
  137.                     "nbfTransport ndisWanAdapterDialOutIP"}
  138.     !NetRuleHardwareDIALINOUTIPXType = "ndiswandialinoutIPX ndisWanAdapterDialInOutIPX"
  139.     !NetRuleHardwareDIALINOUTIPXClass = {"ndisWanAdapterDialInOutIPX basic"}
  140.     !NetRuleHardwareDIALINOUTIPXBlock = {"nbfTransport ndisWanAdapterDialInOutIPX",+
  141.                     "tcpipTransport ndisWanAdapterDialInOutIPX",+
  142.                     "netbtTransport ndisWanAdapterDialInOutIPX"}
  143.     NetRuleHardwareRASASYMACType     = "rasAsyMac rasAsyMacAdapter"
  144.     NetRuleHardwareRASASYMACBindForm = " yes yes container"
  145.     NetRuleHardwareRASASYMACClass     = {"rasAsyMacAdapter basic"}
  146.     !ProductNDISTAPIName        = "NdisTapi"
  147.     !ProductNDISTAPIImagePath   = "\SystemRoot\system32\drivers\ndistapi.sys"
  148.     !RasPerfKeyName             = "Performance"
  149.     !RasPerfLibraryName         = "rasctrs.dll"
  150.     !RasPerfOpenFunction        = "OpenRasPerformanceData"
  151.     !RasPerfCloseFunction       = "CloseRasPerformanceData"
  152.     !RasPerfCollectFunction     = "CollectRasPerformanceData"
  153.     !RasCounterFileName         = "rasctrs.ini"
  154.     ProductKeyBase  = $(!NTN_SoftwareBase)"\"$(!Manufacturer)
  155.     ProductKeyName           = $(!NTN_SoftwareBase)"\"$(!Manufacturer)"\"$(ProductRASName)"\CurrentVersion"
  156.     !NetworkCardKeyName      = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards"
  157.     RasSvrKeyName            = $(!NTN_ServiceBase)"\"$(ProductRASSVRName)
  158.     RasSvrParamKeyName       = $(!NTN_ServiceBase)"\"$(ProductRASSVRName)"\Parameters"
  159.     !RasManSvcKeyName        = $(!NTN_ServiceBase)"\"$(ProductRASMANName)
  160.     !RasAcdKeyName           = $(!NTN_ServiceBase)"\"$(!ProductRASACDName)
  161.     !RasArpKeyName           = $(!NTN_ServiceBase)"\"$(!ProductRASARPName)
  162.     !RasIsnRipKeyName        = $(!NTN_ServiceBase)"\"$(!ProductRASISNRIPName)
  163.     !RasIsnSapKeyName        = $(!NTN_ServiceBase)"\"$(!ProductRASISNSAPName)
  164.     !NdisTapiKeyName         = $(!NTN_ServiceBase)"\"$(!ProductNDISTAPIName)
  165.     !RasManKeyName           = $(!NTN_SoftwareBase)"\"$(!Manufacturer)"\"$(ProductRASMANName)"\CurrentVersion"
  166.     !RasAutodialKeyName       = $(!NTN_ServiceBase)"\"$(!ProductRASAUTODIALName)
  167.     RasManParamKeyName       = $(!NTN_ServiceBase)"\"$(ProductRASMANName)"\Parameters"
  168.     RasManLinkageKeyName     = $(!NTN_ServiceBase)"\"$(ProductRASMANName)"\Linkage"
  169.     NdisWanParamKeyName      = $(!NTN_ServiceBase)"\"$(!ProductNDISWANName)"\Parameters"
  170.     NdisWanLinkageKeyName    = $(!NTN_ServiceBase)"\"$(!ProductNDISWANName)"\Linkage"
  171.     RasAsyMacKeyName         = $(!NTN_ServiceBase)"\"$(ProductRASASYMACName)
  172.     RasAsyMacParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductRASASYMACName)"\Parameters"
  173.     RasMacLinkageKeyName     = $(!NTN_ServiceBase)"\"$(ProductRASASYMACName)"\Linkage"
  174.     RasTapiDevicesKeyName    = $(!NTN_SoftwareBase)"\"$(!Manufacturer)"\"$(ProductRASName)"\TAPI DEVICES"
  175.     LinkageKeyName           = $(!NTN_ServiceBase)"\"$(Product$(Option)Name)"\Linkage"
  176.     !ProductNDISWANKeyName   = $(!NTN_SoftwareBase)"\"$(!Manufacturer)"\"$(!ProductNDISWANName)"\CurrentVersion"
  177.     ProductRASASYMACKeyName  = $(!NTN_SoftwareBase)"\"$(!Manufacturer)"\"$(ProductRASASYMACName)"\CurrentVersion"
  178.     RasProtocolsKeyName      = $(!NTN_SoftwareBase)"\"$(!Manufacturer)"\"$(ProductRASName)"\PROTOCOLS"
  179.     !UtilityInf     = "UTILITY.INF"
  180.     subroutninf    = "SUBROUTN.INF"
  181.     RascfgDll      = "RASCFG.DLL"
  182.     Exit_Code      = 0
  183.     ShellCode      = 0
  184.     from      = ""
  185.     to        = ""
  186.     ExitCodeOk     = 0
  187.     ExitCodeCancel = 1
  188.     ExitCodeFatal  = 2
  189.     KeyNull         = ""
  190.     !MAXIMUM_ALLOWED   = 33554432
  191.     !SERVICE_NO_CHANGE = 4294967295
  192.     RegistryErrorIndex = NO_ERROR
  193.     ServerSize  = 820116
  194.     ClientSize  = 634260
  195.     AdminSize   = 513962
  196.     FInstallServer = $(Chosen)
  197.     FInstallClient = $(Chosen)
  198.     FInstallAdmin  = $(Chosen)
  199. [UiVars]
  200.     VolumeList      = {} ? $(!LIBHANDLE) GetHardDriveLetters
  201.     VolumeFreeList  = {} ? $(!LIBHANDLE) GetHardDriveFreeSpace
  202.     VolumeFSList    = {} ? $(!LIBHANDLE) GetHardDriveFileSystems
  203.     DestVolume      = ""
  204.     MinHelpID   = 25000
  205.     MaxHelpID   = 25999
  206. [SystemVars]
  207.     !STF_PROCESSOR      = "" ? $(!LIBHANDLE) GetProcessor
  208.     !STF_PLATFORM       = "" ? $(!LIBHANDLE) GetPlatform
  209.     !STF_WINDOWSPATH    = "" ? $(!LIBHANDLE) GetWindowsNtDir
  210.     !STF_NTPATH         = $(!STF_WINDOWSPATH)
  211.     !STF_WINDOWSSYSPATH = "" ? $(!LIBHANDLE) GetWindowsNtSysDir
  212.     !STF_COMPUTERNAME   = "" ? $(!LIBHANDLE) GetMyComputerName
  213.     !STF_USERNAME       = "" ? $(!LIBHANDLE) GetMyUserName
  214.     !STF_FLOPPYLIST     = {} ? $(!LIBHANDLE) GetFloppyDriveLetters
  215.     !STF_UNUSEDDRIVES   = {} ? $(!LIBHANDLE) GetUnusedDrives
  216.     !STF_LANGUAGE       = "" ? $(!LIBHANDLE) GetLanguage
  217.     !STF_BUSTYPE        = "" ? $(!LIBHANDLE) GetMyBusType
  218.     !STF_BUSTYPELIST    = "" ? $(!LIBHANDLE) GetMyBusTypeList
  219.     !NTN_SoftwareBase   = "Software"
  220.     !NTN_ServiceBase    = "System\CurrentControlSet\Services"
  221.     !NTN_ScUseRegistry  = "NO"
  222. [AvailableSystemMemory]
  223.     SystemMemory    = "" ? $(!LIBHANDLE) GetMemorySize
  224.     MinSystemMemory = 2048
  225. [date]
  226.     !CurrentDate = {} ? $(!LIBHANDLE) GetSystemDate
  227. [HelpContextIDs]
  228.     HC_RASOPTIONS     = 25020
  229.     HC_CLIENTACCESS   = 25021
  230.     HC_INSTALLOVER1   = 25022
  231.     HC_INSTALLOVER2   = 25023
  232. [Identify]
  233.     read-syms Identification
  234.     set Status     = STATUS_SUCCESSFUL
  235.     set Identifier = $(OptionType)
  236.     set Media      = #("Source Media Descriptions", 1, 1)
  237.     Return $(Status) $(Identifier) $(Media)
  238. [ReturnOptions]
  239.     set Status        = STATUS_FAILED
  240.     set OptionList     = {}
  241.     set OptionTextList = {}
  242.     set LanguageList = ^(LanguagesSupported, 1)
  243.     Ifcontains(i) $($0) in $(LanguageList)
  244.         goto returnoptions
  245.     Else
  246.         set Status = STATUS_NOLANGUAGE
  247.         goto finish_ReturnOptions
  248.     Endif
  249. returnoptions = +
  250.     set OptionList     = ^(Options, 1)
  251.     set OptionTextList = ^(OptionsText$($0), 1)
  252.     set Status         = STATUS_SUCCESSFUL
  253. finish_ReturnOptions = +
  254.     Return $(Status) $(OptionList) $(OptionTextList)
  255. [Shell Commands]
  256.     set Exit_Code = $(!STF_ERROR_GENERAL)
  257.     LoadLibrary "x" $(!STF_SRCDIR)\setupdll.dll !LIBHANDLE
  258.     LoadLibrary "x" $(!STF_SRCDIR)\ncpa.cpl !NCPA_HANDLE
  259.     ifstr(i) $(!LIBHANDLE) == ""
  260.        Debug-Output "OEMNSVRA.INF: unable to load setupdll.dll"
  261.        Shell subroutn.inf, SetupMessage $(!STF_LANGUAGE) "FATAL" $(UnableToLoadSetupdll)
  262.        set Exit_Code = STATUS_USERCANCEL
  263.        exit
  264.     endif
  265.     ifstr(i) $(!NCPA_HANDLE) == ""
  266.        Debug-Output "OEMNSVRA.INF: unable to load ncpa.cpl"
  267.        Shell subroutn.inf, SetupMessage $(!STF_LANGUAGE) "FATAL" $(UnableToLoadNcpaCpl)
  268.        set Exit_Code = STATUS_USERCANCEL
  269.        exit
  270.     endif
  271.     ifstr(i) $(RAS_INSTALL_MODE) == ""
  272.        set RAS_INSTALL_MODE = install
  273.     endif
  274.     read-syms SystemVars
  275.     detect    SystemVars
  276.     read-syms RasErrors$(!STF_LANGUAGE)
  277.     OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\ProductOptions" 33554432 KeyProductOption
  278.     ifstr(i) $(KeyProductOption) != ""
  279.         GetRegValue $(KeyProductOption) "ProductType" ProductTypeList
  280.         set TempProductType = *($(ProductTypeList),4)
  281.         ifstr(i) $(TempProductType) == "winnt"
  282.             set !STF_PRODUCT = WINNT
  283.         else-ifstr(i) $(TempProductType) == "lanmannt"
  284.             set !STF_PRODUCT = LANMANNT
  285.         else-ifstr(i) $(TempProductType) == "servernt"
  286.             set !STF_PRODUCT = SERVERNT
  287.         else
  288.             Debug-Output "OEMNSVRA.INF: invalid Product Type "$(TempProductType)
  289.             Shell subroutn.inf, SetupMessage $(!STF_LANGUAGE) "FATAL" $(UnknownProductType)
  290.             set Exit_Code = STATUS_USERCANCEL
  291.             exit
  292.         endif
  293.         CloseRegKey $(KeyProductOptions)
  294.     else
  295.         Debug-Output "OEMNSVRA.INF: unable to determine Product Type "
  296.         Shell subroutn.inf, SetupMessage $(!STF_LANGUAGE) "FATAL" $(NoProductType)
  297.         set Exit_Code = STATUS_USERCANCEL
  298.         exit
  299.     endif
  300.     Debug-Output "OEMNSVRA.INF: Product Type "$(!STF_PRODUCT)
  301.     ifstr(i) $(RAS_INSTALL_MODE) != "install"
  302.        ifstr(i) $(RAS_INSTALL_MODE) != "configure"
  303.           ifstr(i) $(RAS_INSTALL_MODE) != "deinstall"
  304.              Debug-Output "OEMNSVRA.INF: Invalid RAS_INSTALL_MODE "$(RAS_INSTALL_MODE)
  305.              Shell subroutn.inf, SetupMessage $(!STF_LANGUAGE) "WARNING" $(InvalidMode)
  306.              set Exit_Code = STATUS_USERCANCEL
  307.              exit
  308.           endif
  309.        endif
  310.     endif
  311.     set !NTN_InstallMode = $(RAS_INSTALL_MODE)
  312.     Shell "" InstallOption $(!STF_LANGUAGE) "RAS" $(!STF_SRCDIR) "YES" "YES" "YES"
  313.     ifint $($ShellCode) != $( !SHELL_CODE_OK)
  314.        Debug-Output "OEMNSVRA.INF: Failed to shell out to InstallOption"
  315.        exit
  316.     endif
  317.     set Exit_Code = $($R0)
  318.     ifstr(i) $($R0) == STATUS_SUCCESSFUL
  319.        set Exit_Code = 1
  320.     endif
  321.     Debug-Output "Oemnsvra.inf: install returned "$($R0)
  322.     FreeLibrary $(!LIBHANDLE)
  323.     FreeLibrary $(!NCPA_HANDLE)
  324.     exit
  325. [InstallOption]
  326.     Debug-Output "In InstallOption section"
  327.     set Status   = STATUS_FAILED
  328.     set Option      = $($1)
  329.     set SourceDir   = $($2)
  330.     set AddCopy     = $($3)
  331.     set DoCopy      = $($4)
  332.     set DoConfig    = $($5)
  333.     set LanguageList = ^(LanguagesSupported, 1)
  334.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  335.         Return STATUS_NOLANGUAGE
  336.     endif
  337.     StartWait
  338.     set-subst LF = "\n"
  339.     read-syms UiVars
  340.     detect    UiVars
  341.     set !STF_NTPATH = $(!STF_WINDOWSSYSPATH)
  342.     GetDriveInPath !STF_NTDRIVE $(!STF_WINDOWSSYSPATH)
  343.     read-syms GeneralConstants
  344.     read-syms FileConstants
  345.     read-syms DialogConstants$(!STF_LANGUAGE)
  346.     read-syms FileConstants$(!STF_LANGUAGE)
  347.     read-syms RasErrors$(!STF_LANGUAGE)
  348.     detect date
  349.     read-syms HelpContextIDs
  350.     SetHelpFile $(!STF_CWDDIR)rassetup.hlp $(MinHelpID) $(MaxHelpID)
  351.     set-title  $(FunctionTitle)
  352.     set to   = Begin
  353.     set from = Begin
  354.     set CommonStatus = STATUS_SUCCESSFUL
  355.     Debug-Output "OEMNSVRA.INF: STF_CWDDIR is: "$(!STF_CWDDIR)
  356.     Debug-Output "OEMNSVRA.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  357.     Debug-Output "OEMNSVRA.INF: Option is: "$(Option)
  358.     Debug-Output "OEMNSVRA.INF: NTN_SoftwareBase is: "$(!NTN_SoftwareBase)
  359.     Debug-Output "OEMNSVRA.INF: NTN_ServiceBase is: "$(!NTN_ServiceBase)
  360. Begin = +
  361.     set !NETCARD_LIST    = {}
  362.     set ServerInstalled = FALSE
  363.     set ClientInstalled = FALSE
  364.     set AdminInstalled  = FALSE
  365.     set DoServer     = TRUE
  366.     set DoClient     = TRUE
  367.     set DoAdmin      = TRUE
  368.     set DoServerOnly = FALSE
  369.     set DoClientOnly = FALSE
  370.     set DoAdminOnly  = FALSE
  371.     set DoRas        = FALSE
  372.     set DoRasSvr     = FALSE
  373.     set DoRasMan     = FALSE
  374.     set DoNdisWan     = FALSE
  375.     set DoRasAsyMac  = FALSE
  376.     IfStr(i) $(!NTN_InstallMode)    ==    deinstall
  377.         Set StartLabel = RemoveRas
  378.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  379.         set StartLabel = UpgradeRas
  380.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  381.         set StartLabel = ConfigureRas
  382.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  383.         set StartLabel = BindingsRas
  384.     else
  385.         set StartLabel = InstallRas
  386.     endif
  387.     set from = Begin
  388.     set to = end
  389.     goto $(StartLabel)
  390. InstallRas = +
  391.     StartWait
  392.     Debug-Output "In InstallRas Section"
  393.     Debug-Output "Origin is "$(!NTN_Origination)
  394.     Debug-Output "Install Mode "$(!NTN_InstallMode)
  395.     Debug-Output "Install phase "$(!NTN_InstallPhase)
  396.     Debug-Output "Copy Flag is "$(DoCopy)
  397.     Debug-Output "Option is "$(Option)
  398.     Debug-Output "SrcDir is "$(SourceDir)
  399.     Debug-Output "STF_WINDOWSPATH is "$(!STF_WINDOWSPATH)
  400.     Debug-Output "Context Inf name "$(STF_CONTEXTINFNAME)
  401.     Debug-Output "!STF_UNATTENDED is "$(!STF_UNATTENDED)
  402.     Debug-Output "!STF_GUI_UNATTENDED is "$(!STF_GUI_UNATTENDED)
  403.     Debug-Output "!STF_UNATTENDED_SECTION is "$(!STF_UNATTENDED_SECTION)
  404.     set RasComponentsList = {} 
  405.     set NumInstalled = 0       
  406.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(!MAXIMUM_ALLOWED) KeyProduct
  407.     Ifstr $(KeyProduct) != $(KeyNull)
  408.         Ifstr(i) $(!NTN_InstallPhase) == primary
  409.            set CommonStatus = STATUS_USERCANCEL
  410.            goto end
  411.         EndIf
  412.         GetRegValue $(KeyProduct) "MajorVersion" VersionInfo
  413.         set VersionMajor = *($(VersionInfo), 4)
  414.         GetRegValue $(KeyProduct) "MinorVersion" VersionInfo
  415.         set VersionMinor = *($(VersionInfo), 4)
  416.         set InstalledVersion = $(VersionMajor)"."$(VersionMinor)
  417.         ifstr(i) $(ProductVersion) != $(InstalledVersion)
  418.             Shell "" QueryRasUpgrade $(ProductRASTitle) $(InstalledVersion) +
  419.                                      $(ProductVersion)
  420.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  421.                goto ShellCodeError
  422.             endif
  423.             Ifstr(i) $($R1) == "OK"
  424.                 set from = InstallRas
  425.                 set to   = InstallRas1
  426.                 goto RemoveRas
  427.             else
  428.                 goto end
  429.             endif
  430.         endif
  431.         shell "" QueryComponentsInstalled $(ProductKeyName)
  432.         Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  433.             Set RasComponentsList = $($R1)
  434.             Set InstalledFlags = $($R2)
  435.             Set ServerInstalled = *($(InstalledFlags),1)
  436.             Set ClientInstalled = *($(InstalledFlags),2)
  437.             Set AdminInstalled  = *($(InstalledFlags),3)
  438.         Endif
  439.         Debug-Output "Installed List is "$(RasComponentsList)
  440.         Debug-Output "Installed Flags is "$(InstalledFlags)
  441.         QueryListSize NumInstalled $(RasComponentsList)
  442.         ifint $(NumInstalled) == 3
  443.             read-syms VerExists$(!STF_LANGUAGE)
  444.             set Text = $(Product$(Option)Title)$(Ver)$(ProductVersion)+
  445.                        $(Text1)
  446.             Shell $(subroutninf), SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(Text)
  447.             Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  448.                 Goto fatal
  449.             Else-Ifstr(i) $($R0) == STATUS_FAILED
  450.                 Goto fatal
  451.             Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  452.                 Goto end
  453.             Endif
  454.             goto end
  455.         endif
  456.         CloseRegKey $(KeyProduct)
  457.     else
  458. InstallRas1 =+
  459.        set fRemoveRas   = TRUE
  460.     endif
  461.     goto memorycheck
  462. setupabort = +
  463.     read-syms SetupAbortDlg$(!STF_LANGUAGE)
  464.     ui start "SetupAbort"
  465.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  466.         ui pop 1
  467.         Exit
  468.     else
  469.         ui pop 1
  470.         Exit
  471.     endif
  472. memorycheck = +
  473.     read-syms AvailableSystemMemory
  474.     detect AvailableSystemMemory
  475.     Debug-Output "Available Memory is "$(SystemMemory)
  476.     IfInt $(SystemMemory) < $(MinSystemMemory)
  477.         read-syms FatalErrorMem$(!STF_LANGUAGE)
  478.         shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "FATAL" $(Fatal)
  479.         goto setupabort
  480.     Else
  481.         goto InstallNetwork
  482.     EndIf
  483. InstallNetwork =+
  484.     ifstr(i) $(DoServer) == FALSE
  485.        ifstr(i) $(DoClient) == FALSE
  486.            goto CopyResources
  487.        endif
  488.     endif
  489.     goto CopyResources
  490. CopyResources = +
  491.     ifstr(i) $(!NTN_InstallMode) == "install"
  492.         Ifstr(i) $(DoCopy) == "YES"
  493.            Shell $(!UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SourceDir) YES
  494.            Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  495.                Goto ShellCodeError
  496.            Else-Ifstr(i) $($R0) == STATUS_FAILED
  497.                Shell $(!UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  498.                ifint $($ShellCode) != $(!SHELL_CODE_OK)
  499.                    goto ShellCodeError
  500.                endif
  501.                set Error = $($R0)
  502.                goto fatal
  503.            Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  504.                Goto end
  505.            Endif
  506.            Set !STF_SRCDIR = $($R1)
  507.            Set SourceDir  = $($R1)
  508.            Debug-Output "SrcDir "$(SourceDir)
  509.         endif
  510.         Debug-Output "OEMNSVRA.INF: Copying files"
  511.         Install InstallResources
  512.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  513.             goto filecopycancel
  514.         endif
  515.         install InstallRasFiles
  516.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  517.             goto filecopycancel
  518.         endif
  519.     endif
  520.     StartWait
  521.     ifstr(i) $(DoAdminOnly) == TRUE
  522.         goto CommonCode
  523.     endif
  524.     goto PortsConfigure
  525. ConfigureRas = +
  526.     set OldVersionExisted = $(TRUE)
  527.     read-syms StatusDeterminingConfig$(!STF_LANGUAGE)
  528.     shell $(subroutninf) PushBillBoard NETSTATUSDLG $(ReadingConfig)
  529.     Set BillboardVisible = 1
  530.     StartWait
  531.     shell "" QueryComponentsInstalled
  532.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  533.         Set InstalledComps = $($R1)
  534.         Set InstalledFlags = $($R2)
  535.         Set DoServer      = *($(InstalledFlags),1)
  536.         Set DoClient      = *($(InstalledFlags),2)
  537.         Set DoAdmin       = *($(InstalledFlags),3)
  538.         Set DoServerOnly  = *($(InstalledFlags),4)
  539.         Set DoClientOnly  = *($(InstalledFlags),5)
  540.         Set DoAdminOnly   = *($(InstalledFlags),6)
  541.     Endif
  542.     Set ServerInstalled = $(DoServer)
  543.     Set ClientInstalled = $(DoClient)
  544.     Set AdminInstalled  = $(DoAdmin)
  545.     Debug-Output "DoServer "$(DoServer)
  546.     Debug-Output "DoClient "$(DoClient)
  547.     Debug-Output "DoAdmin "$(DoAdmin)
  548.     Debug-Output "DoServerOnly "$(DoServerOnly)
  549.     Debug-Output "DoClientOnly "$(DoClientOnly)
  550.     Debug-Output "DoAdminOnly "$(DoAdminOnly)
  551.     Ifint $(BillboardVisible) != 0
  552.         Shell "subroutn.inf" PopBillboard
  553.         Set BillboardVisible = 0
  554.     Endif
  555.     ifstr(i) $(DoAdminOnly) == TRUE
  556.         read-syms NoConfigAdmin$(!STF_LANGUAGE)
  557.         shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "STATUS" $(NoConfigAdmin)
  558.         goto end
  559.     endif
  560.     goto PortsConfigure
  561. PortsConfigure = +
  562.     StartWait
  563.     read-syms StatusDeterminingConfig$(!STF_LANGUAGE)
  564.     shell $(subroutninf) PushBillBoard NETSTATUSDLG $(ReadingConfig)
  565.     Set BillboardVisible = 1
  566.     LoadLibrary "x" $(!STF_CWDDIR)rascfg.dll PORTSDLGHANDLE
  567.     set Result = {}
  568.     set fNetcardInstalled = FALSE
  569.     shell "" IsNetcardInstalled
  570.     ifstr(i) $($R0) == STATUS_SUCCESSFUL
  571.         set fNetcardInstalled = $($R1)
  572.     endif
  573.     Debug-Output "fNetcardInstalled Option "$(fNetcardInstalled)
  574. CheckProtocolsInstalled =+
  575.     shell "" QueryInstalledProtocols
  576.     ifstr(i) $($R0) == STATUS_SUCCESSFUL
  577.         set fNetbeuiInstalled = $($R1)
  578.         set fTcpIpInstalled   = $($R2)
  579.         set fIpxInstalled     = $($R3)
  580.     else
  581.         read-syms QueryInstalledProtocolsError$(!STF_LANGUAGE)
  582.         shell $(subroutninf) SetupMessage $(!STF_LANGUAGE) "FATAL" $(Text)
  583.         goto end
  584.     endif
  585.     Ifint $(BillboardVisible) != 0
  586.         Shell "subroutn.inf" PopBillboard
  587.         Set BillboardVisible = 0
  588.     Endif
  589.     Debug-Output "!STF_UNATTENDED is "$(!STF_UNATTENDED)
  590.     Debug-Output "!STF_GUI_UNATTENDED is "$(!STF_GUI_UNATTENDED)
  591.     Debug-Output "!STF_UNATTENDED_SECTION is "$(!STF_UNATTENDED_SECTION)
  592.     LibraryProcedure Result, $(PORTSDLGHANDLE), RasPortsConfig $(!STF_HWND) +
  593.                      $(!NTN_InstallMode) $(fNetcardInstalled) $(ProductPath) +
  594.                      $(fNetbeuiInstalled) $(fTcpIpInstalled) $(fIpxInstalled) +
  595.                      $(!STF_GUI_UNATTENDED) $(!STF_UNATTENDED) $(!STF_UNATTENDED_SECTION)
  596.     StartWait
  597.     set NewNumPorts   = 0
  598.     set NewNumTapiPorts = 0
  599.     set NewNumDialoutNBF = 0
  600.     set NewNumDialinNBF  = 0
  601.     set NewNumDialinIP = 0
  602.     set NewNumDialoutIP = 0
  603.     set NewNumDialinoutIPX = 0
  604.     set fSerialInstalled = FALSE
  605.     set fUnimodemInstalled = FALSE
  606.     set fOtherInstalled = FALSE
  607.     set fNetbeuiChosen = FALSE
  608.     set fTcpIpChosen = FALSE
  609.     set fIpxChosen = FALSE
  610.     set fNetbeuiSelected = FALSE
  611.     set fTcpIpSelected = FALSE
  612.     set fIpxSelected = FALSE
  613.     set fNetbeuiAllowed = FALSE
  614.     set fTcpIpAllowed = FALSE
  615.     set fIpxAllowed = FALSE
  616.     set NewNumPorts       = *($(Result),1)
  617.     set NewNumTapiPorts   = *($(Result),2)
  618.     set NewNumPortsList = {}
  619.     set NullString   = ""
  620.     Debug-Output "PortsConfigure returned: "$(Result)
  621.     Debug-Output "PortsConfigure NewNumPorts: "$(NewNumPorts)
  622.     Debug-Output "PortsConfigure NewNumTapiPorts: "$(NewNumTapiPorts)
  623.     ifstr(i) $(NewNumPorts) == "EXITSETUP"
  624.         Debug-Output "PortsConfigre User selected ExitSetup."
  625.         goto RemoveDiskFiles
  626.     else-ifstr(i) $(NewNumPorts) == "NOPORTS"
  627.         Debug-Output "PortsConfigre: No serial ports detected."
  628.         shell $(subroutninf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorNoPorts)
  629.         goto RemoveDiskFiles
  630.     else-ifstr(i) $(NewNumPorts) == "BADARGS"
  631.         Debug-Output "PortsConfigre: bad arguments to dll."
  632.         shell $(subroutninf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorBadArgs)
  633.         goto RemoveDiskFiles
  634.     else-ifstr(i) $(NewNumPorts) == "FAILURE"
  635.         Debug-Output "PortsConfigre: Unknown failure."
  636.         shell $(subroutninf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorUnknown)
  637.         goto RemoveDiskFiles
  638.     endif
  639.     goto PortsConfigure1
  640. RemoveDiskFiles = +
  641.     set CommonStatus = STATUS_USERCANCEL
  642.     ifstr(i) $(!NTN_InstallMode) == "install"
  643.         goto filecopycancel
  644.     endif
  645.     goto end
  646. PortsConfigure1 = +
  647.     set NewNumDialoutNBF = *($(Result),3)
  648.     Debug-Output "PortsConfigure NewNumDialoutNBF: "$(NewNumDialoutNBF)
  649.     set NewNumDialinNBF  = *($(Result),4)
  650.     Debug-Output "PortsConfigure NewNumDialinNBF: "$(NewNumDialinNBF)
  651.     set fSerialInstalled = *($(Result),5)
  652.     Debug-Output "PortsConfigure fSerialInstalled: "$(fSerialInstalled)
  653.     set fUnimodemInstalled = *($(Result),6)
  654.     Debug-Output "PortsConfigure fUnimodemInstalled: "$(fUnimodemInstalled)
  655.     set fOtherInstalled = *($(Result),7)
  656.     Debug-Output "PortsConfigure fOtherInstalled: "$(fOtherInstalled)
  657.     ifstr(i) $(fSerialInstalled) == TRUE
  658.         set NewNumPortsList = >($(NewNumPortsList), $(NullString)$(NewNumPorts)$(NullString))
  659.     else-ifstr(i) $(fOtherInstalled) == TRUE
  660.         set NewNumPortsList = >($(NewNumPortsList), $(NullString)$(NewNumPorts)$(NullString))
  661.     else-ifstr(i) $(fUnimodemInstalled) == TRUE
  662.         set NewNumPortsList = >($(NewNumPortsList), $(NullString)$(NewNumPorts)$(NullString))
  663.     endif
  664.     set fNetbeuiSelected = *($(Result),8)
  665.     Debug-Output "PortsConfigure NetbeuiSelected: "$(fNetbeuiSelected)
  666.     set fTcpIpSelected = *($(Result),9)
  667.     Debug-Output "PortsConfigure TcpIpSelected: "$(fTcpIpSelected)
  668.     set fIpxSelected = *($(Result),10)
  669.     Debug-Output "PortsConfigure IpxSelected: "$(fIpxSelected)
  670.     set fNetbeuiAllowed = *($(Result),11)
  671.     Debug-Output "PortsConfigure NetbeuiAllowed: "$(fNetbeuiAllowed)
  672.     set fTcpIpAllowed = *($(Result),12)
  673.     Debug-Output "PortsConfigure TcpIpAllowed: "$(fTcpIpAllowed)
  674.     set fIpxAllowed = *($(Result),13)
  675.     Debug-Output "PortsConfigure IpxAllowed: "$(fIpxAllowed)
  676.     ifstr(i) $(fNetbeuiSelected) == TRUE
  677.         set fNetbeuiChosen = TRUE
  678.     else
  679.         set fNetbeuiChosen = $(fNetbeuiAllowed)
  680.     endif
  681.     ifstr(i) $(fTcpIpSelected) == TRUE
  682.         set fTcpIpChosen = TRUE
  683.     else
  684.         set fTcpIpChosen = $(fTcpIpAllowed)
  685.     endif
  686.     ifstr(i) $(fIpxSelected) == TRUE
  687.         set fIpxChosen = TRUE
  688.     else
  689.         set fIpxChosen = $(fIpxAllowed)
  690.     endif
  691.     ifstr(i) $(fTcpIpSelected) == TRUE
  692.         set NewNumDialoutIP = $(NewNumDialoutNBF)
  693.     endif
  694.     ifint $(NewNumDialinNBF) != 0
  695.          ifstr(i) $(fTcpIpAllowed) == TRUE
  696.              set NewNumDialinIP = 1
  697.          endif
  698.     endif
  699.     Debug-Output "NewNumDialinIP: "$(NewNumDialinIP)
  700.     Debug-Output "NewNumDialoutIP: "$(NewNumDialoutIP)
  701.     ifstr(i) $(fIpxChosen) == TRUE
  702.         set NewNumDialinoutIPX = 1
  703.         Debug-Output "IPX Selected - NewNumDialinoutIPX: "$(NewNumDialinoutIPX)
  704.     endif
  705.     ifstr(i) $(fIpxAllowed) == TRUE
  706.         set EnableIpxRouter = 1
  707.     else
  708.         set EnableIpxRouter = 0
  709.     endif
  710.     ifstr(i) $(fNetbeuiAllowed) == FALSE
  711.          set NewNumDialinNBF = 0
  712.     endif
  713.     ifstr(i) $(fNetbeuiSelected) == FALSE
  714.         set NewNumDialoutNBF = 0
  715.     endif
  716.     Debug-Output "NewNumDialinNbf: "$(NewNumDialinNBF)
  717.     Debug-Output "NewNumDialoutNbf: "$(NewNumDialoutNBF)
  718.     set NetBiosGtwyEnabled = 0
  719.     set EnableIpRouter     = 0
  720.     set EnableWanRouter    = 0
  721.     Shell "" GetNetworkAccess
  722.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  723.         Debug-Output "error shelling GetNetworkAccess."
  724.         goto ShellCodeError
  725.     endif
  726.     set NetBiosGtwyEnabled = $($R1)
  727.     set EnableIpRouter     = $($R2)
  728.     set EnableWanRouter    = $($R3)
  729.     ifint $(NetBiosGtwyEnabled) == 0
  730.         ifstr(i) $(fNetbeuiAllowed) == TRUE
  731.             set-add NewNumDialoutNBF  = $(NewNumDialoutNBF), $(NewNumDialinNBF)
  732.             set     NewNumDialinNBF = 0
  733.             Debug-Output "Mapped dialin ports to dialout ports "$(NewNumDialoutNBF)
  734.         endif
  735.     endif
  736.     set NewNumDialin = 0
  737.     set NewNumDialout = 0
  738.     set-add NewNumDialin = $(NewNumDialinNBF), $(NewNumDialinIP)
  739.     ifstr(i) $(fIpxAllowed) == TRUE
  740.         set-add NewNumDialin = $(NewNumDialin), $(NewNumDialinoutIPX)
  741.     endif
  742.     set-add NewNumDialout = $(NewNumDialoutNBF), $(NewNumDialoutIP)
  743.     ifstr(i) $(fIpxSelected) == TRUE
  744.         set-add NewNumDialout = $(NewNumDialout), $(NewNumDialinoutIPX)
  745.     endif
  746.     ifstr(i) $(fNetcardInstalled) == FALSE
  747.         ifint $(NewNumDialin) != 0
  748.             ifstr(i) $(!STF_INSTALL_MODE) != EXPRESS
  749.                read-syms InstallLoopback$(!STF_LANGUAGE)
  750.                Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "STATUS", $(Message)
  751.             else
  752.                set AddCopy  = YES
  753.                set DoCopy   = YES
  754.                set DoConfig = YES
  755.                set SaveNTN_InstallMode = $(!NTN_InstallMode)
  756.                set !NTN_InstallMode = install
  757.                Shell "oemnadlb.inf" InstallOption $(!STF_LANGUAGE) "LOOP" $(!STF_SRCDIR) $(AddCopy) $(DoCopy) $(DoConfig)
  758.                set !NTN_InstallMode = $(SaveNTN_InstallMode)
  759.                Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  760.                    Debug-Output "OEMNSVRA.INF: INF oemnadlb.inf SHELL ERROR!"
  761.                    read-syms InstallLoopback$(!STF_LANGUAGE)
  762.                    Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "STATUS", $(Error)
  763.                Endif
  764.             EndIf
  765.         endif
  766.     endif
  767.     goto CommonCode
  768. CommonCode = +
  769.     ifstr(i) $(OldVersionExisted) == $(TRUE)
  770.         ifstr(i) $(!NTN_InstallMode) == configure
  771.            goto WriteParameters
  772.         endif
  773.     endif
  774.     QueryListSize ListCount $(RasComponentsList)
  775.     ifint $(ListCount) == 0
  776.         goto FirstTimeInstall
  777.     else
  778.         ifstr(i) $(DoServer) == TRUE
  779.             ifstr(i) $(ClientInstalled) == FALSE
  780.                 ifstr(i) $(AdminInstalled) == FALSE
  781.                    set DoRas    = TRUE
  782.                 endif
  783.                 set DoRasSvr     = TRUE
  784.                 set DoRasMan     = TRUE
  785.                 set DoNdisWan    = TRUE
  786.                 set DoRasAsyMac  = TRUE
  787.             else
  788.                 set DoRasSvr     = TRUE
  789.             endif
  790.             set RasComponentsList = >($(RasComponentsList), $(RasServerOption))
  791.         endif
  792.         ifstr(i) $(DoClient) == TRUE
  793.             ifstr(i) $(ServerInstalled) == FALSE
  794.                 ifstr(i) $(AdminInstalled) == FALSE
  795.                     set DoRas    = TRUE
  796.                 endif
  797.                 set DoRasMan     = TRUE
  798.                 set DoNdisWan    = TRUE
  799.                 set DoRasAsyMac  = TRUE
  800.             endif
  801.             set RasComponentsList = >($(RasComponentsList), $(RasClientOption))
  802.         endif
  803.         ifstr(i) $(DoAdmin) == TRUE
  804.             ifstr(i) $(ServerInstalled) == FALSE
  805.                 ifstr(i) $(ClientInstalled) == FALSE
  806.                     set DoRas = TRUE
  807.                 endif
  808.             endif
  809.             set RasComponentsList = >($(RasComponentsList), $(RasAdminOption))
  810.         endif
  811.         shell "" UpdateComponentsInstalled $(RasComponentsList) $(ProductKeyName)
  812.         goto FirstTimeInstall-1
  813.     endif
  814. FirstTimeInstall =+
  815.     ifstr(i) $(DoServer) == TRUE
  816.         set DoRas             = TRUE
  817.         set DoRasSvr          = TRUE
  818.         set DoRasMan          = TRUE
  819.         set DoRasAutodial     = TRUE
  820.         set DoNdisWan         = TRUE
  821.         set DoRasAsyMac       = TRUE
  822.         set RasComponentsList = >($(RasComponentsList), $(RasServerOption))
  823.     endif
  824.     ifstr(i) $(DoClient) == TRUE
  825.         set DoRas             = TRUE
  826.         set DoRasMan          = TRUE
  827.         set DoRasAutodial     = TRUE
  828.         set DoNdisWan         = TRUE
  829.         set DoRasAsyMac       = TRUE
  830.         set RasComponentsList = >($(RasComponentsList), $(RasClientOption))
  831.     endif
  832.     ifstr(i) $(DoAdmin) == TRUE
  833.         set DoRas             = TRUE
  834.         set RasComponentsList = >($(RasComponentsList), $(RasAdminOption))
  835.     endif
  836. FirstTimeInstall-1 = +
  837.     ifstr(i) $(DoRas) == TRUE
  838.         StartWait
  839.         read-syms StatusUpdatingRegistry$(!STF_LANGUAGE)
  840.         shell $(subroutninf) PushBillBoard NETSTATUSDLG $(CreatingRas)
  841.         Set BillboardVisible = 1
  842.         set ThisOption = RAS
  843.         Shell $(!UtilityInf), InstallSoftwareProduct, $(!Manufacturer),+
  844.               $(Product$(ThisOption)Name), $(!RasInfName)
  845.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  846.               Debug-Output "InstallSoftware bombed out."
  847.               goto ShellCodeError
  848.         endif
  849.         set RegistryErrorIndex = $($R0)
  850.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  851.             Debug-Output "REGISTRY GOODAL"
  852.             CloseRegKey $($R1)
  853.             CloseRegKey $($R2)
  854.             goto fatalregistry
  855.         endif
  856.         Set SoftProductKey    = $($R1)
  857.         Set SoftNetRuleKey    = $($R2)
  858.         set NewValueList = +
  859.             {{Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)},+
  860.              {SoftwareType,$(NoTitle),$(!REG_VT_SZ),+
  861.               $(Product$(ThisOption)SvcType)},+
  862.              {Title,$(NoTitle),$(!REG_VT_SZ), $(Product$(ThisOption)Title)},+
  863.              {Description,$(NoTitle),$(!REG_VT_SZ),+
  864.               $(Product$(ThisOption)Description)},+
  865.              {PathName,$(NoTitle),$(!REG_VT_SZ),+
  866.               $(Product$(ThisOption)ImagePath)},+
  867.              {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMajorVersion)},+
  868.              {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMinorVersion)},+
  869.              {RasComponents,$(NoTitle),$(!REG_VT_MULTI_SZ),$(RasComponentsList)},+
  870.              {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}, +
  871.              {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)}}
  872.         Shell $(!UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  873.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  874.             CloseRegKey $(SoftProductKey)
  875.             CloseRegKey $(SoftNetRuleKey)
  876.             goto ShellCodeError
  877.         endif
  878.         set RegistryErrorIndex = $($R0)
  879.         CloseRegKey $(SoftProductKey)
  880.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  881.            CloseRegKey $(SoftNetRuleKey)
  882.            goto fatalregistry
  883.         endif
  884.         set NewValueList = +
  885.             {{class, $(NoTitle), $(!REG_VT_SZ), $(NetRule$(ThisOption)Class)},+
  886.              {type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  887.              {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)}, +
  888.              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  889.              {Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)}}
  890.         Shell  $(!UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  891.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  892.             goto ShellCodeError
  893.         endif
  894.         set RegistryErrorIndex = $($R0)
  895.         CloseRegKey $(SoftNetRuleKey)
  896.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  897.             goto fatalregistry
  898.         endif
  899.     endif 
  900.     ifstr(i) $(DoRasSvr) == TRUE
  901.         set ThisOption = RASSVR
  902.         set RasSpecificString = $(Product$(ThisOption)Name)
  903.         Shell $(!UtilityInf), AddSoftwareComponent, $(!Manufacturer), +
  904.               $(Product$(ThisOption)Name), $(Product$(ThisOption)Name), +
  905.               $(Product$(ThisOption)DisplayName), +
  906.               $(!RasInfName), $(Product$(ThisOption)ImagePath),+
  907.               "service", "Network", {"LanmanServer","RasMan"}, "", +
  908.               $(!RasMsgDll), $(!RasEventTypeSupported)
  909.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  910.             Debug-Output "DoRasSvr: AddSoftware bombed out"
  911.             goto ShellCodeError
  912.         endif
  913.         set RegistryErrorIndex = $($R0)
  914.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  915.             Debug-Output "DoRasSvr: Registry Error "$(RegistryErrorIndex)
  916.             CloseRegKey $($R1)
  917.             CloseRegKey $($R2)
  918.             CloseRegKey $($R3)
  919.             CloseRegKey $($R4)
  920.             CloseRegKey $($R5)
  921.             goto fatalregistry
  922.         endif
  923.         Set SoftProductKey    = $($R1)
  924.         Set SoftNetRuleKey    = $($R2)
  925.         set SoftServiceKey    = $($R3)
  926.         Set SoftParamsKey     = $($R4)
  927.         Set SoftLinkageKey    = $($R5)
  928.         set NewValueList = +
  929.             {{Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)},+
  930.              {ServiceName,$(NoTitle),$(!REG_VT_SZ),+
  931.               $(Product$(ThisOption)Name)},+
  932.              {SoftwareType,$(NoTitle),$(!REG_VT_SZ),+
  933.               $(Product$(ThisOption)SvcType)},+
  934.              {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  935.              {Description,$(NoTitle),$(!REG_VT_SZ),+
  936.               $(Product$(ThisOption)Description)},+
  937.              {PathName,$(NoTitle),$(!REG_VT_SZ),+
  938.               $(Product$(ThisOption)ImagePath)},+
  939.              {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMajorVersion)},+
  940.              {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMinorVersion)},+
  941.              {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  942.              {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(!HideComponent)}}
  943.         Shell  $(!UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  944.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  945.             Debug-Output "DoRasSvr:product: AddValueList bombed out"
  946.             goto ShellCodeError
  947.         endif
  948.         set RegistryErrorIndex = $($R0)
  949.         CloseRegKey $(SoftProductKey)
  950.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  951.             Debug-Output "DoRasSvr: Registry Error "$(RegistryErrorIndex)
  952.             CloseRegKey $(SoftServiceKey)
  953.             CloseRegKey $(SoftNetRuleKey)
  954.             CloseRegKey $(SoftLinkageKey)
  955.             CloseRegKey $(SoftParamsKey)
  956.             goto fatalregistry
  957.         endif
  958.         set NewValueList = +
  959.             {{class, $(NoTitle), $(!REG_VT_SZ), $(NetRule$(ThisOption)Class)},+
  960.              {type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  961.              {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)}, +
  962.              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  963.              {bindform,$(NoTitle),$(!REG_VT_SZ),+
  964.               $(NetRule$(ThisOption)BindForm)}, +
  965.              {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  966.               $(NetRule$(ThisOption)Bindable)}, +
  967.              {Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)}}
  968.         Shell  $(!UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  969.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  970.             Debug-Output "DoRasSvr:netrules: AddValueList bombed out"
  971.             goto ShellCodeError
  972.         endif
  973.         set RegistryErrorIndex = $($R0)
  974.         CloseRegKey $(SoftNetRuleKey)
  975.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  976.             CloseRegKey $(SoftServiceKey)
  977.             CloseRegKey $(SoftLinkageKey)
  978.             CloseRegKey $(SoftParamsKey)
  979.             Debug-Output "DoRasSvr: Registry Error "$(RegistryErrorIndex)
  980.             goto fatalregistry
  981.         endif
  982.         set RasDependencies = {"LanmanServer","RasMan"}
  983.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NetBios" $(!MAXIMUM_ALLOWED) KeyNetBios
  984.         ifstr $(KeyNetBios) != $(KeyNull)
  985.             set RasDependencies = >($(RasDependencies),"NetBios")
  986.         endif
  987.         Debug-Output "DoRasSvr: Adding RasDependencies "$(RasDependencies)
  988.         set NewValueList = +
  989.             {{OtherDependencies, $(NoTitle), $(!REG_VT_MULTI_SZ),+
  990.               $(RasDependencies)}}
  991.         Shell  $(!UtilityInf), AddValueList, $(SoftLinkageKey), $(NewValueList)
  992.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  993.             Debug-Output "DoRasSvr:Linkage: AddValueList bombed out"
  994.             goto ShellCodeError
  995.         endif
  996.         set RegistryErrorIndex = $($R0)
  997.         CloseRegKey $(SoftLinkageKey)
  998.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  999.             CloseRegKey $(SoftServiceKey)
  1000.             Debug-Output "DoRasSvr: Registry Error "$(RegistryErrorIndex)
  1001.             goto fatalregistry
  1002.         endif
  1003.         set NewValueList = +
  1004.             {{AuthenticateRetries, $(NoTitle), $(!REG_VT_DWORD), 2},+
  1005.             {AuthenticateTime, $(NoTitle), $(!REG_VT_DWORD), 120},+
  1006.             {Autodisconnect, $(NoTitle), $(!REG_VT_DWORD), 20},+
  1007.             {EnableAudit, $(NoTitle), $(!REG_VT_DWORD), 1},+
  1008.             {CallbackTime, $(NoTitle), $(!REG_VT_DWORD), 2}}
  1009.         Shell  $(!UtilityInf), AddValueList, $(SoftParamsKey), $(NewValueList)
  1010.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1011.              Debug-Output "AddValueList bombed out"
  1012.              goto ShellCodeError
  1013.         endif
  1014.         set RegistryErrorIndex = $($R0)
  1015.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1016.             CloseRegKey $(SoftServiceKey)
  1017.             goto fatalregistry
  1018.         endif
  1019.         OpenRegKey $(SoftParamsKey) "" "NetBiosGateway" $(!MAXIMUM_ALLOWED) KeyNetbiosGtwy
  1020.         ifstr $(KeyNtbiosGtwy) == $(KeyNull)
  1021.             CreateRegKey $(SoftParamsKey) {"NetBiosGateway",$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyNetbiosGtwy
  1022.             OpenRegKey $(SoftParamsKey) "" "NetBiosGateway" $(!MAXIMUM_ALLOWED) KeyNetbiosGtwy
  1023.         endif
  1024.         set NewValueList = +
  1025.             {{EnableBroadcast, $(NoTitle), $(!REG_VT_DWORD), 0},+
  1026.             {EnableNetbiosSessionsAuditing, $(NoTitle), $(!REG_VT_DWORD), 0},+
  1027.             {MaxDynMem, $(NoTitle), $(!REG_VT_DWORD), 655350},+
  1028.             {MaxNames, $(NoTitle), $(!REG_VT_DWORD), 255},+
  1029.             {MaxSessions, $(NoTitle), $(!REG_VT_DWORD), 255},+
  1030.             {MulticastForwardRate, $(NoTitle), $(!REG_VT_DWORD), 5},+
  1031.             {SizWorkbuf, $(NoTitle), $(!REG_VT_DWORD), 4500},+
  1032.             {RemoteListen, $(NoTitle), $(!REG_VT_DWORD), 1},+
  1033.             {NameUpdateTime, $(NoTitle), $(!REG_VT_DWORD), 120},+
  1034.             {MaxDgBufferedPerGroupName, $(NoTitle), $(!REG_VT_DWORD), 10},+
  1035.             {RcvDgSubmittedPerGroupName, $(NoTitle), $(!REG_VT_DWORD), 3},+
  1036.             {DisableMcastFwdWhenSessionTraffic, $(NoTitle), $(!REG_VT_DWORD), 1},+
  1037.             {MaxBcastDgBuffered, $(NoTitle), $(!REG_VT_DWORD), 32},+
  1038.             {NumRecvQueryIndications, $(NoTitle), $(!REG_VT_DWORD), 3}}
  1039.         Shell  $(!UtilityInf), AddValueList, $(KeyNetbiosGtwy), $(NewValueList)
  1040.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1041.              Debug-Output "AddValueList bombed out"
  1042.              goto ShellCodeError
  1043.         endif
  1044.         set RegistryErrorIndex = $($R0)
  1045.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1046.             CloseRegKey $(SoftServiceKey)
  1047.             goto fatalregistry
  1048.         endif
  1049.         CloseRegKey $(KeyNetbiosGtwy)
  1050.         CloseRegKey $(SoftParamsKey)
  1051.         Shell "" UpdatePerfmonInfoHelper $(SoftServiceKey)
  1052.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1053.             Debug-Output "error shelling UpdatePerfmonInfoHelper."
  1054.             goto ShellCodeError
  1055.         endif
  1056.         Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  1057.             Debug-Output "error returned by UpdatePerfmonInfoHelper."
  1058.         endif
  1059.         CloseRegKey $(SoftServiceKey)
  1060.     endif 
  1061. InstallRasMan = +
  1062.     ifstr(i) $(DoRasMan) == TRUE
  1063.         set ThisOption = RASMAN
  1064.         set RasSpecificString = $(Product$(ThisOption)Name)
  1065.         Shell $(!UtilityInf), AddSoftwareComponent, $(!Manufacturer), +
  1066.               $(Product$(ThisOption)Name), $(Product$(ThisOption)Name), +
  1067.               $(Product$(ThisOption)DisplayName), +
  1068.               $(!RasInfName), $(Product$(ThisOption)ImagePath), "serviceshare",+
  1069.               "Network", {}, "", $(!RasMsgDll), $(!RasEventTypeSupported)
  1070.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1071.             Debug-Output "AddSoftware bombed out"
  1072.             goto ShellCodeError
  1073.         endif
  1074.         set RegistryErrorIndex = $($R0)
  1075.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1076.             CloseRegKey $($R1)
  1077.             CloseRegKey $($R2)
  1078.             CloseRegKey $($R3)
  1079.             CloseRegKey $($R4)
  1080.             CloseRegKey $($R5)
  1081.             goto fatalregistry
  1082.         endif
  1083.         Set SoftProductKey    = $($R1)
  1084.         Set SoftNetRuleKey    = $($R2)
  1085.         CloseRegKey $($R3)
  1086.         Set SoftParamsKey     = $($R4)
  1087.         CloseRegKey $($R5)
  1088.         set NewValueList = +
  1089.             {{Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)},+
  1090.              {ServiceName,$(NoTitle),$(!REG_VT_SZ),+
  1091.               $(Product$(ThisOption)Name)},+
  1092.              {SoftwareType,$(NoTitle),$(!REG_VT_SZ),+
  1093.               $(Product$(ThisOption)SvcType)},+
  1094.              {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  1095.              {Description,$(NoTitle),$(!REG_VT_SZ),+
  1096.               $(Product$(ThisOption)Description)},+
  1097.              {PathName,$(NoTitle),$(!REG_VT_SZ),+
  1098.               $(Product$(ThisOption)ImagePath)},+
  1099.              {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMajorVersion)},+
  1100.              {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMinorVersion)},+
  1101.              {Review, $(NoTitle), $(!REG_VT_DWORD), $(fReviewBindings)}, +
  1102.              {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  1103.              {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(!HideComponent)}}
  1104.         Shell  $(!UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  1105.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1106.             Debug-Output "AddValueList bombed out"
  1107.             goto ShellCodeError
  1108.         endif
  1109.         set RegistryErrorIndex = $($R0)
  1110.         CloseRegKey $(SoftProductKey)
  1111.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1112.             CloseRegKey $(SoftNetRuleKey)
  1113.             CloseRegKey $(SoftParamsKey)
  1114.             goto fatalregistry
  1115.         endif
  1116.         set NewValueList = +
  1117.             {{class, $(NoTitle), $(!REG_VT_SZ), $(NetRule$(ThisOption)Class)},+
  1118.              {type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  1119.              {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)}, +
  1120.              {bindform,$(NoTitle),$(!REG_VT_SZ),+
  1121.               $(NetRule$(ThisOption)BindForm)}, +
  1122.              {bindable,$(NoTitle),$(!REG_VT_SZ),+
  1123.               $(NetRule$(ThisOption)Bindable)}, +
  1124.              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  1125.              {Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)}}
  1126.         Shell  $(!UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  1127.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1128.             Debug-Output "AddValueList bombed out"
  1129.             goto ShellCodeError
  1130.         endif
  1131.         set RegistryErrorIndex = $($R0)
  1132.         CloseRegKey $(SoftNetRuleKey)
  1133.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1134.             goto fatalregistry
  1135.         endif
  1136.         set NewValueList = {{Logging, $(NoTitle), $(!REG_VT_DWORD), 0}}
  1137.         Shell  $(!UtilityInf), AddValueList, $(SoftParamsKey), $(NewValueList)
  1138.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1139.              Debug-Output "AddValueList bombed out"
  1140.              goto ShellCodeError
  1141.         endif
  1142.         set RegistryErrorIndex = $($R0)
  1143.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1144.             goto fatalregistry
  1145.         endif
  1146.         CloseRegKey $(SoftParamsKey)
  1147.         Shell "" AddServiceDependency "RasMan" "tapisrv"
  1148.     endif 
  1149.     ifstr(i) $(DoRasAutodial) == TRUE
  1150.         set ThisOption = RASAUTODIAL
  1151.         set RasSpecificString = $(!Product$(ThisOption)Name)
  1152.         Shell "" InstallSoftwareAndService $(ThisOption)
  1153.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1154.              Debug-Output "Error shelling InstallSoftwareAndService for "$(ThisOption)
  1155.              goto ShellCodeError
  1156.         endif
  1157.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  1158.              Debug-Output "Error from InstallSoftwareAndService for"$(ThisOption)
  1159.              goto end
  1160.         endif
  1161.         set DisableAutoDial = FALSE
  1162.         ifint $(NewNumDialout) == 0
  1163.            set DisableAutoDial = TRUE
  1164.         endif
  1165.         ifstr(i) $(DisableAutoDial) == TRUE
  1166.            OpenRegKey $(!REG_H_LOCAL) "" $(!RasAutodialKeyName) $(!MAXIMUM_ALLOWED) KeyAutodial
  1167.            ifstr $(KeyAutodial) == $(KeyNull)
  1168.              Debug-Output "OEMNSVRA.INF: could not open RasAuto key"
  1169.            else
  1170.              SetRegValue $(KeyAutodial) {Start, $(NoTitle), $(!REG_VT_DWORD), 4}
  1171.              CloseRegKey $(KeyAutodial)
  1172.            endif
  1173.         endif
  1174.         Shell "" InstallRasAcdService
  1175.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1176.              Debug-Output "Error shelling InstallRasAcdService"
  1177.              goto ShellCodeError
  1178.         endif
  1179.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  1180.              Debug-Output "Error from InstallRasAcdService"
  1181.              goto end
  1182.         endif
  1183.         Shell "" AddServiceDependency "RasAuto" "RasMan"
  1184.     endif 
  1185.     ifstr(i) $(DoNdisWan) == TRUE
  1186.         set ThisOption = NDISWAN
  1187.         set RasSpecificString = $(Product$(ThisOption)Name)
  1188.         Shell $(!UtilityInf), AddSoftwareComponent, $(!Manufacturer), +
  1189.               $(!Product$(ThisOption)Name), $(!Product$(ThisOption)Name), +
  1190.               $(!Product$(ThisOption)DisplayName), +
  1191.               $(!RasInfName), $(!Product$(ThisOption)ImagePath),+
  1192.               "kernelautostart", "NDISWAN", {}, "", +
  1193.               $(!RasMsgDll), $(!RasEventTypeSupported)
  1194.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1195.             Debug-Output "AddSoftware bombed out"
  1196.             goto ShellCodeError
  1197.         endif
  1198.         set RegistryErrorIndex = $($R0)
  1199.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1200.             CloseRegKey $($R1)
  1201.             CloseRegKey $($R2)
  1202.             CloseRegKey $($R3)
  1203.             CloseRegKey $($R4)
  1204.             CloseRegKey $($R5)
  1205.             goto fatalregistry
  1206.         endif
  1207.         Set SoftProductKey    = $($R1)
  1208.         Set SoftNetRuleKey    = $($R2)
  1209.         CloseRegKey $($R3)
  1210.         CloseRegKey $($R4)
  1211.         CloseRegKey $($R5)
  1212.         set NewValueList = +
  1213.             {{Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)},+
  1214.              {ServiceName,$(NoTitle),$(!REG_VT_SZ),+
  1215.               $(!Product$(ThisOption)Name)},+
  1216.              {SoftwareType,$(NoTitle),$(!REG_VT_SZ),+
  1217.               $(Product$(ThisOption)Type)},+
  1218.              {Title,$(NoTitle),$(!REG_VT_SZ),$(!Product$(ThisOption)Title)},+
  1219.              {Description,$(NoTitle),$(!REG_VT_SZ),+
  1220.               $(!Product$(ThisOption)Description)},+
  1221.              {PathName,$(NoTitle),$(!REG_VT_SZ),+
  1222.               $(!Product$(ThisOption)ImagePath)},+
  1223.              {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMajorVersion)},+
  1224.              {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMinorVersion)},+
  1225.              {BindControl,$(NoTitle),$(!REG_VT_DWORD),$(HideBindings)},+
  1226.              {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  1227.              {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(!HideComponent)}}
  1228.         Shell  $(!UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  1229.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1230.             Debug-Output "AddValueList bombed out"
  1231.             goto ShellCodeError
  1232.         endif
  1233.         set RegistryErrorIndex = $($R0)
  1234.         CloseRegKey $(SoftProductKey)
  1235.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1236.             CloseRegKey $(SoftNetRuleKey)
  1237.             goto fatalregistry
  1238.         endif
  1239.         set NewValueList = +
  1240.         {{class, $(NoTitle), $(!REG_VT_MULTI_SZ), $(!NetRule$(ThisOption)Class)},+
  1241.              {type,$(NoTitle),$(!REG_VT_SZ),$(!NetRule$(ThisOption)Type)},+
  1242.              {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)}, +
  1243.              {bindform,$(NoTitle),$(!REG_VT_SZ),+
  1244.               $(!NetRule$(ThisOption)BindForm)}, +
  1245.              {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  1246.               $(!NetRule$(ThisOption)Bindable)}, +
  1247.              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  1248.              {Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)}}
  1249.         Shell  $(!UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  1250.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1251.             Debug-Output "AddValueList bombed out"
  1252.             goto ShellCodeError
  1253.         endif
  1254.         set RegistryErrorIndex = $($R0)
  1255.         CloseRegKey $(SoftNetRuleKey)
  1256.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1257.             goto fatalregistry
  1258.         endif
  1259.         Shell "" InstallNdisWanBHAdapter
  1260.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1261.            Debug-Output "Cannot add NdisWan Blood hound adapter"
  1262.            goto ShellCodeError
  1263.         endif
  1264.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  1265.              set RegistryErrorIndex = $($R0)
  1266.              Debug-Output "Error installing NdisWan Blood hound adapter"
  1267.              goto fatalregistry
  1268.         endif
  1269.         Shell "" AddNDISWANToServiceGroupOrder
  1270.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1271.            Debug-Output "Cannot add NDISWAN to ServiceGroupOrder"
  1272.            goto ShellCodeError
  1273.         endif
  1274. DoNdisWanEnd = +
  1275.     endif 
  1276.     ifstr(i) $(DoRasAsyMac) == TRUE
  1277.         set ThisOption = RASASYMAC
  1278.         set RasSpecificString = $(Product$(ThisOption)Name)
  1279.         ifstr(i) $(fSerialInstalled) == TRUE
  1280.             set AsySoftwareType = "kernelautostart"
  1281.         else-ifstr(i) $(fOtherInstalled) == TRUE
  1282.             set AsySoftwareType = "kernelautostart"
  1283.         else-ifstr(i) $(fUnimodemInstalled) == TRUE
  1284.             set AsySoftwareType = "kernelautostart"
  1285.         else
  1286.             set AsySoftwareType = "kerneldisable"
  1287.         endif
  1288.         Shell $(!UtilityInf), AddSoftwareComponent, $(!Manufacturer), +
  1289.               $(Product$(ThisOption)Name), $(Product$(ThisOption)Name), +
  1290.               $(Product$(ThisOption)DisplayName), +
  1291.               $(!RasInfName), $(Product$(ThisOption)ImagePath), $(AsySoftwareType),+
  1292.               "NDIS", {}, "", $(!RasMsgDll), $(!RasEventTypeSupported)
  1293.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1294.             Debug-Output "AddSoftware bombed out"
  1295.             goto ShellCodeError
  1296.         endif
  1297.         set RegistryErrorIndex = $($R0)
  1298.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1299.             CloseRegKey $($R1)
  1300.             CloseRegKey $($R2)
  1301.             CloseRegKey $($R3)
  1302.             CloseRegKey $($R4)
  1303.             CloseRegKey $($R5)
  1304.             goto fatalregistry
  1305.         endif
  1306.         Set SoftProductKey    = $($R1)
  1307.         Set SoftNetRuleKey    = $($R2)
  1308.         CloseRegKey $($R3)
  1309.         CloseRegKey $($R4)
  1310.         CloseRegKey $($R5)
  1311.         set NewValueList = +
  1312.             {{Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)},+
  1313.              {ServiceName,$(NoTitle),$(!REG_VT_SZ),+
  1314.               $(Product$(ThisOption)Name)},+
  1315.              {SoftwareType,$(NoTitle),$(!REG_VT_SZ),+
  1316.           $(Product$(ThisOption)Type)},+
  1317.              {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  1318.              {Description,$(NoTitle),$(!REG_VT_SZ),+
  1319.               $(Product$(ThisOption)Description)},+
  1320.              {PathName,$(NoTitle),$(!REG_VT_SZ),+
  1321.               $(Product$(ThisOption)ImagePath)},+
  1322.              {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMajorVersion)},+
  1323.              {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMinorVersion)},+
  1324.              {BindControl,$(NoTitle),$(!REG_VT_DWORD),$(HideBindings)},+
  1325.              {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  1326.              {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(!HideComponent)}}
  1327.         Shell  $(!UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  1328.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1329.             Debug-Output "AddValueList bombed out"
  1330.             goto ShellCodeError
  1331.         endif
  1332.         set RegistryErrorIndex = $($R0)
  1333.         CloseRegKey $(SoftProductKey)
  1334.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1335.             CloseRegKey $(SoftNetRuleKey)
  1336.             goto fatalregistry
  1337.         endif
  1338.         set NewValueList = +
  1339.         {{class, $(NoTitle), $(!REG_VT_MULTI_SZ), $(NetRule$(ThisOption)Class)},+
  1340.              {type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  1341.              {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)}, +
  1342.              {bindform,$(NoTitle),$(!REG_VT_SZ),+
  1343.               $(NetRule$(ThisOption)BindForm)}, +
  1344.              {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  1345.               $(!NetRule$(ThisOption)Bindable)}, +
  1346.              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  1347.              {Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)}}
  1348.         Shell  $(!UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  1349.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1350.             Debug-Output "AddValueList bombed out"
  1351.             goto ShellCodeError
  1352.         endif
  1353.         set RegistryErrorIndex = $($R0)
  1354.         CloseRegKey $(SoftNetRuleKey)
  1355.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1356.             goto fatalregistry
  1357.         endif
  1358.         Shell $(!UtilityInf), AddHardwareComponent, +
  1359.               $(Product$(ThisOption)Name),$(!RasInfName),+
  1360.               $(Product$(ThisOption)KeyName)
  1361.         ifint $($R4) != -1
  1362.             Set !NETCARD_LIST = >($(!NETCARD_LIST), +
  1363.                                  {$(Product$(ThisOption)Name),+
  1364.                                  $(!NetworkCardKeyName)"\"$($R4)})
  1365.         endif
  1366.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1367.            Debug-Output "Cannot add hardware component"
  1368.            goto ShellCodeError
  1369.         endif
  1370.         set RegistryErrorIndex = $($R0)
  1371.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1372.             Debug-Output "Registry error: add hardware component"
  1373.             CloseRegKey $($R1)
  1374.             CloseRegKey $($R2)
  1375.             CloseRegKey $($R3)
  1376.             goto fatalregistry
  1377.         endif
  1378.         set KeyNetcard    = $($R1)
  1379.         set KeyParameters = $($R3)
  1380.         set KeyAdapterRules = $($R2)
  1381.         set AdapterNumber = $($R4)
  1382.         set NewValueList = +
  1383.             {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(!Manufacturer)},+
  1384.              {Title,$(NoTitle),$(!REG_VT_SZ),+
  1385.               "["$($R4)"] "$(Product$(ThisOption)Title)},+
  1386.              {Description,$(NoTitle),$(!REG_VT_SZ),+
  1387.               $(Product$(ThisOption)Description)},+
  1388.              {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  1389.               $(Product$(ThisOption)Name)},+
  1390.              {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  1391.              {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  1392.              {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(!HideComponent)}}
  1393.         Shell  $(!UtilityInf), AddValueList, $(KeyNetcard), $(NewValueList)
  1394.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1395.             Debug-Output "ShellCode error"
  1396.             goto ShellCodeError
  1397.         endif
  1398.         CloseRegKey $(KeyNetcard)
  1399.         set TempProdName = """"$(Product$(ThisOption)Name)$(AdapterNumber)""""
  1400.         set TempBindForm = $(TempProdName)$(NetRuleHardware$(ThisOption)BindForm)
  1401.         set NewValueList = +
  1402.             {{type,$(NoTitle),$(!REG_VT_SZ),+
  1403.               $(NetRuleHardware$(ThisOption)Type)},+
  1404.              {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  1405.              {class,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  1406.               $(NetRuleHardware$(ThisOption)Class)}, +
  1407.              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  1408.              {Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)}}
  1409.         Shell  $(!UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  1410.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1411.             Debug-Output "ShellCode error."
  1412.             goto ShellCodeError
  1413.         endif
  1414.         set RegistryErrorIndex = $($R0)
  1415.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1416.             Debug-Output "Resgitry error: add value list."
  1417.             CloseRegKey $(KeyParameters)
  1418.             CloseRegKey $(KeyAdapterRules)
  1419.             goto fatalregistry
  1420.         endif
  1421.         CloseRegKey $(KeyAdapterRules)
  1422.         CloseRegKey $(KeyParameters)
  1423.     endif 
  1424.     Shell "" InstallNdisTapiService
  1425.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1426.          Debug-Output "Error shelling InstallNdisTapiService "
  1427.          goto ShellCodeError
  1428.     endif
  1429.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  1430.          set RegistryErrorIndex = $($R0)
  1431.          Debug-Output "Error installing NdisTapi Service"
  1432.          goto fatalregistry
  1433.     endif
  1434.     goto WriteParameters
  1435. WriteParameters = +
  1436.     ifstr(i) $(DoAdminOnly) == TRUE
  1437.         goto WriteParametersOver
  1438.     endif
  1439.     StartWait
  1440.     read-syms StatusUpdatingRegistry$(!STF_LANGUAGE)
  1441.     shell $(subroutninf) PushBillBoard NETSTATUSDLG $(WritingRasParams)
  1442.     Set BillboardVisible = 1
  1443.     Debug-Output "Writing Registry Parameters."
  1444.     ifstr(i) $(DoServer) != TRUE
  1445.         goto WriteRasMan
  1446.     endif
  1447.     Debug-Output "OEMNSVRA.INF: Product type "$(!STF_PRODUCT)
  1448.     Debug-Output "OEMNSVRA.INF: Total dialin ports "$(NewNumDialin)
  1449.     set RasStartValue = 3
  1450.     ifstr(i) $(!STF_PRODUCT) != "WINNT"
  1451.         ifint $(NewNumDialin) != 0
  1452.             set RasStartValue = 2
  1453.         endif
  1454.     endif
  1455.     set KeySvr = $(KeyNull)
  1456.     OpenRegKey $(!REG_H_LOCAL) "" $(RasSvrKeyName) $(!MAXIMUM_ALLOWED) KeySvr
  1457.     ifstr $(KeySvr) == $(KeyNull)
  1458.         Debug-Output "OEMNSVRA.INF: could not open RemoteAccess key"
  1459.     else
  1460.         ifstr(i) $(!NTN_InstallMode) != install
  1461.             GetRegValue $(KeySvr) "Start" StartList
  1462.             ifint $(RegLastError) == 0
  1463.                 set RasStartValue = *($(StartList), 4)
  1464.             endif
  1465.         endif
  1466.         ifint $(NewNumDialin) == 0
  1467.             ifint $(RasStartValue) != 4
  1468.                 set RasStartValue = 3
  1469.             endif
  1470.         endif
  1471.         Debug-Output "OEMNSVRA.INF: Setting RemoteAccess start type to "$(RasStartValue)
  1472.         SetRegValue $(KeySvr) {Start,$(NoTitle),$(!REG_VT_DWORD),$(RasStartValue)}
  1473.         CloseRegKey $(KeySvr)
  1474.     endif
  1475.     OpenRegKey $(!REG_H_LOCAL) "" $(RasSvrParamKeyName) $(!MAXIMUM_ALLOWED) KeySrvParams
  1476.     ifstr $(KeySrvParams) == $(KeyNull)
  1477.        Debug-Output "OEMNSVRA.INF: could not open RasSvr Params key"
  1478.        set RegistryErrorIndex = UNABLE_OPEN_SERVICE_PARAMETERS
  1479.        goto fatalregistry
  1480.     endif
  1481.     set NewValueList = +
  1482.         {{NetBiosGatewayEnabled, $(NoTitle), $(!REG_VT_DWORD), $(NetBiosGtwyEnabled)}}
  1483.     Shell  $(!UtilityInf), AddValueList, $(KeySrvParams), $(NewValueList)
  1484.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1485.          Debug-Output "AddValueList bombed out"
  1486.          goto ShellCodeError
  1487.     endif
  1488.     set RegistryErrorIndex = $($R0)
  1489.     Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1490.         goto fatalregistry
  1491.     endif
  1492.     CloseRegKey $(KeySrvParams)
  1493. WriteRasMan = +
  1494.     OpenRegKey $(!REG_H_LOCAL) "" $(RasManParamKeyName) $(!MAXIMUM_ALLOWED) KeyRasManParams
  1495.     ifstr $(KeyRasManParams) == $(KeyNull)
  1496.        Debug-Output "OEMNSVRA.INF: could not open RasMan Params key"
  1497.        set RegistryErrorIndex = UNABLE_OPEN_SERVICE_PARAMETERS
  1498.        goto fatalregistry
  1499.     endif
  1500.     set MediaValue = {"rastapi"}
  1501.     ifstr(i) $(fSerialInstalled) == TRUE
  1502.         set MediaValue = >($(MediaValue), "rasser")
  1503.     endif
  1504.     set OtherConfigKey = $(!NTN_SoftwareBase)"\"$(!Manufacturer)"\"$(ProductRASName)"\OTHER DEVICES\CONFIGURED"
  1505.     set KeyOtherMedia = $(KeyNull)
  1506.     OpenRegKey $(!REG_H_LOCAL) "" $(OtherConfigKey) $(!MAXIMUM_ALLOWED)  +
  1507.                KeyOtherMedia
  1508.     ifstr $(KeyOtherMedia) != $(KeyNull)
  1509.         EnumRegKey $(KeyOtherMedia) OtherList
  1510.         Debug-Output "oemnsvra.inf: Other Media list "$(OtherList)
  1511.         ForListDo $(OtherList)
  1512.             set MediaName = *($($),1)
  1513.             set KeyMedia = $(KeyNull)
  1514.             OpenRegKey $(KeyOtherMedia) "" $(MediaName) $(!MAXIMUM_ALLOWED)  +
  1515.                        KeyMedia
  1516.             ifstr $(KeyMedia) != $(KeyNull)
  1517.                 GetRegValue $(KeyMedia), "MediaType" MediaType
  1518.                 Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  1519.                     set MediaTypeValue = *($(MediaType),4)
  1520.                     set MediaValue = >($(MediaValue), $(MediaTypeValue))
  1521.                 endif
  1522.                 CloseRegKey $(KeyMedia)
  1523.             endif
  1524.         EndForListDo
  1525.         CloseRegKey $(KeyOtherMedia)
  1526.     else
  1527.         Debug-Output "oemnsvra.inf: Other Media not configured"
  1528.     endif
  1529.     Debug-Output "Adding Medias as "$(MediaValue)
  1530.     set NewValueList = {{Medias,$(NoTitle),$(!REG_VT_MULTI_SZ),$(MediaValue)}}
  1531.     Shell  $(!UtilityInf), AddValueList, $(KeyRasManParams), $(NewValueList)
  1532.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1533.          Debug-Output "AddValueList bombed out"
  1534.          goto ShellCodeError
  1535.     endif
  1536.     set RegistryErrorIndex = $($R0)
  1537.     Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1538.         goto fatalregistry
  1539.     endif
  1540.     CloseRegKey $(KeyRasManParams)
  1541. WriteNdisWan = +
  1542.     set PrevNumPorts = 0
  1543.     set PrevNumDialin = 0
  1544.     set PrevNumDialout = 0
  1545.     OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacParamKeyName) $(!MAXIMUM_ALLOWED) KeyMacParams
  1546.     ifstr $(KeyMacParams) == $(KeyNull)
  1547.        ifstr(i) $(!NTN_InstallMode) == configure
  1548.           Debug-Output "OEMNSVRA.INF: could not open AsyncMac Params key"
  1549.           set RegistryErrorIndex = UNABLE_OPEN_SERVICE_PARAMETERS
  1550.           goto fatalregistry
  1551.        endif
  1552.        goto WriteNdisWan1
  1553.     endif
  1554.     GetRegValue $(KeyMacParams), "Ports" PortsInfo
  1555.     GetRegValue $(KeyMacParams), "DialinNBF" DialinNBFInfo
  1556.     GetRegValue $(KeyMacParams), "DialoutNBF" DialoutNBFInfo
  1557.     GetRegValue $(KeyMacParams), "DialinIP" DialinIPInfo
  1558.     GetRegValue $(KeyMacParams), "DialoutIP" DialoutIPInfo
  1559.     GetRegValue $(KeyMacParams), "DialinoutIPX" DialinoutIPXInfo
  1560.     set PrevNumPorts         = *($(PortsInfo), 4)
  1561.     set PrevNumDialinNBF     = *($(DialinNBFInfo), 4)
  1562.     set PrevNumDialoutNBF    = *($(DialoutNBFInfo), 4)
  1563.     set PrevNumDialinIP      = *($(DialinIPInfo), 4)
  1564.     set PrevNumDialoutIP     = *($(DialoutIPInfo), 4)
  1565.     set PrevNumDialinoutIPX  = *($(DialinoutIPXInfo), 4)
  1566.     Debug-Output "Ports currently configured "$(PrevNumPorts)
  1567.     Debug-Output "Ports currently dialin NBF "$(PrevNumDialinNBF)
  1568.     Debug-Output "Ports currently dialout NBF "$(PrevNumDialoutNBF)
  1569.     Debug-Output "Ports currently dialin IP "$(PrevNumDialinIP)
  1570.     Debug-Output "Ports currently diaout IP "$(PrevNumDialoutIP)
  1571.     Debug-Output "Ports currently diainout IPX "$(PrevNumDialinoutIPX)
  1572.     CloseRegKey $(KeyMacParams)
  1573. WriteNdisWan1 =+
  1574.     set ThisOption = NDISWAN
  1575.     set RasSpecificString = $(!Product$(ThisOption)Name)
  1576.     OpenRegKey $(!REG_H_LOCAL) "" $(NdisWanParamKeyName) $(!MAXIMUM_ALLOWED) KeyHubParams
  1577.     ifstr $(KeyHubParams) == $(KeyNull)
  1578.        Debug-Output "OEMNSVRA.INF: could not open NdisWan Params key"
  1579.        set RegistryErrorIndex = UNABLE_OPEN_SERVICE_PARAMETERS
  1580.        goto fatalregistry
  1581.     endif
  1582.     set NewValueList = +
  1583.         {{EndPoints, $(NoTitle), $(!REG_VT_MULTI_SZ), $(NewNumPortsList)}}
  1584.     Shell  $(!UtilityInf), AddValueList, $(KeyHubParams), $(NewValueList)
  1585.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1586.          Debug-Output "AddValueList bombed out"
  1587.          goto ShellCodeError
  1588.     endif
  1589.     set RegistryErrorIndex = $($R0)
  1590.     CloseRegKey $(KeyHubParams)
  1591.     Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1592.         goto fatalregistry
  1593.     endif
  1594.     ifint $(PrevNumDialinNBF) == $(NewNumDialinNBF)
  1595.       ifint $(PrevNumDialoutNBF) == $(NewNumDialoutNBF)
  1596.         ifint $(PrevNumDialinIP) == $(NewNumDialinIP)
  1597.           ifint $(PrevNumDialoutIP) == $(NewNumDialoutIP)
  1598.             ifint $(PrevNumDialinoutIPX) == $(NewNumDialinoutIPX)
  1599.               set CommonStatus = STATUS_USERCANCEL
  1600.               goto WriteRasAsyMac
  1601.             endif
  1602.           endif
  1603.         endif
  1604.       endif
  1605.     endif
  1606.     set NumAddDialinNBF      = 0
  1607.     set NumAddDialoutNBF     = 0
  1608.     set NumRemoveDialinNBF   = 0
  1609.     set NumRemoveDialoutNBF  = 0
  1610.     set NumAddDialinIP       = 0
  1611.     set NumAddDialoutIP      = 0
  1612.     set NumRemoveDialinIP    = 0
  1613.     set NumRemoveDialoutIP   = 0
  1614.     ifint $(PrevNumDialinNBF) > $(NewNumDialinNBF)
  1615.         set-sub NumRemoveDialinNBF = $(PrevNumDialinNBF), $(NewNumDialinNBF)
  1616.     else
  1617.         set-sub NumAddDialinNBF = $(NewNumDialinNBF), $(PrevNumDialinNBF)
  1618.     endif
  1619.     ifint $(PrevNumDialoutNBF) > $(NewNumDialoutNBF)
  1620.         set-sub NumRemoveDialoutNBF = $(PrevNumDialoutNBF), $(NewNumDialoutNBF)
  1621.     else
  1622.         set-sub NumAddDialoutNBF = $(NewNumDialoutNBF), $(PrevNumDialoutNBF)
  1623.     endif
  1624.     ifint $(PrevNumDialinIP) > $(NewNumDialinIP)
  1625.         set-sub NumRemoveDialinIP = $(PrevNumDialinIP), $(NewNumDialinIP)
  1626.     else
  1627.         set-sub NumAddDialinIP = $(NewNumDialinIP), $(PrevNumDialinIP)
  1628.     endif
  1629.     ifint $(PrevNumDialoutIP) > $(NewNumDialoutIP)
  1630.         set-sub NumRemoveDialoutIP = $(PrevNumDialoutIP), $(NewNumDialoutIP)
  1631.     else
  1632.         set-sub NumAddDialoutIP = $(NewNumDialoutIP), $(PrevNumDialoutIP)
  1633.     endif
  1634.     ifint $(PrevNumDialinoutIPX) > $(NewNumDialinoutIPX)
  1635.         set-sub NumRemoveDialinoutIPX = $(PrevNumDialinoutIPX), $(NewNumDialinoutIPX)
  1636.     else
  1637.         set-sub NumAddDialinoutIPX = $(NewNumDialinoutIPX), $(PrevNumDialinoutIPX)
  1638.     endif
  1639.     set NumAddTotal = 0
  1640.     set NumRemoveTotal = 0
  1641.     set-add NumAddTotal = $(NumAddDialinNBF), $(NumAddDialoutNBF)
  1642.     set-add NumAddTotal = $(NumAddTotal), $(NumAddDialinIP)
  1643.     set-add NumAddTotal = $(NumAddTotal), $(NumAddDialoutIP)
  1644.     set-add NumAddTotal = $(NumAddTotal), $(NumAddDialinoutIPX)
  1645.     set-add NumRemoveTotal = $(NumRemoveDialinNBF), $(NumRemoveDialoutNBF)
  1646.     set-add NumRemoveTotal = $(NumRemoveTotal), $(NumRemoveDialinIP)
  1647.     set-add NumRemoveTotal = $(NumRemoveTotal), $(NumRemoveDialoutIP)
  1648.     set-add NumRemoveTotal = $(NumRemoveTotal), $(NumRemoveDialinoutIPX)
  1649.     Debug-Output "NumAddDialinNBF = "$(NumAddDialinNBF)
  1650.     Debug-Output "NumAddDialoutNBF = "$(NumAddDialoutNBF)
  1651.     Debug-Output "NumAddDialinIP = "$(NumAddDialinIP)
  1652.     Debug-Output "NumAddDialoutIP = "$(NumAddDialoutIP)
  1653.     Debug-Output "NumAddDialinoutIPX = "$(NumAddDialinoutIPX)
  1654.     Debug-Output "NumAddTotal = "$(NumAddTotal)
  1655.     Debug-Output "NumRemoveDialinNBF = "$(NumRemoveDialinNBF)
  1656.     Debug-Output "NumRemoveDialinIP = "$(NumRemoveDialinIP)
  1657.     Debug-Output "NumRemoveDialinoutIPX = "$(NumRemoveDialinoutIPX)
  1658.     Debug-Output "NumRemoveTotal = "$(NumRemoveTotal)
  1659.     Shell "utility.inf" BaseServiceKey
  1660.     set RegistryErrorIndex = $($R0)
  1661.     Ifstr(i) $(RegistryErrorIndex) == NO_ERROR
  1662.         Debug-Output "OEMNSVRA.INF: Opened the services base key"
  1663.         set ServicesBaseKey = $($R1)
  1664.     else
  1665.         set ServicesBaseKey = $(KeyNull)
  1666.     endif
  1667.     OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(MAXIMUM_ALLOWED) KeyNetcards
  1668.     Ifstr(i) $(RegistryErrorIndex) == NO_ERROR
  1669.         Debug-Output "OEMNSVRA.INF: Opened the networkcardkey "
  1670.     endif
  1671.     set RasAdapterNumber = 1
  1672. AddNdisWanNetCard = +
  1673.      IfInt $(NumAddTotal) == 0
  1674.       goto RemoveNdisWanNetCard
  1675.      else
  1676.           Debug-Output "In the Add if loop. NumAddTotal = "$(NumAddTotal)
  1677.           shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  1678.                                       $(WritingRasParamsAdd)" "$(NumAddTotal)
  1679.           set-sub NumAddTotal = $(NumAddTotal),1
  1680.           Shell $(!UtilityInf), AddHardwareComponent, +
  1681.                $(!Product$(ThisOption)Name),$(!RasInfName),+
  1682.                $(!Product$(ThisOption)KeyName), +
  1683.                $(ServicesBaseKey), $(KeyNetcards), $(RasAdapterNumber)
  1684.           ifint $($R4) != -1
  1685.              Set !NETCARD_LIST = >($(!NETCARD_LIST), +
  1686.                                   {$(!Product$(ThisOption)Name),+
  1687.                                   $(!NetworkCardKeyName)"\"$($R4)})
  1688.              set RasAdapterNumber = $($R4)
  1689.           endif
  1690.           ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1691.              Debug-Output "Cannot add hardware component"
  1692.              goto ShellCodeError
  1693.           endif
  1694.           set RegistryErrorIndex = $($R0)
  1695.           Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1696.               Debug-Output "Registry error: add hardware component"
  1697.               CloseRegKey $($R1)
  1698.               CloseRegKey $($R2)
  1699.               CloseRegKey $($R3)
  1700.               goto fatalregistry
  1701.           endif
  1702.         set KeyNetcard    = $($R1)
  1703.         set KeyParameters = $($R3)
  1704.         set KeyAdapterRules = $($R2)
  1705.         set AdapterNumber = $($R4)
  1706.         set NetcardInfoList = +
  1707.             {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(!Manufacturer)},+
  1708.              {Title,$(NoTitle),$(!REG_VT_SZ),+
  1709.               "["$($R4)"] "$(!Product$(ThisOption)Title)},+
  1710.              {Description,$(NoTitle),$(!REG_VT_SZ),+
  1711.               $(!Product$(ThisOption)Description)},+
  1712.              {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  1713.              {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  1714.              {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(!HideComponent)}}
  1715.         Shell $(!UtilityInf), GetBusTypeNum
  1716.         set BusTypeNum = $($R1)
  1717.         ifint $(NumAddDialinNBF) > 0
  1718.             set-sub NumAddDialinNBF = $(NumAddDialinNBF), 1
  1719.             set NetcardInfoList = >($(NetcardInfoList), +
  1720.                                    {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  1721.                                     $(!Product$(ThisOption)DIALINName)})
  1722.             set ServiceParamList = +
  1723.                         {{EnumExportPref,$(NoTitle),$(!REG_VT_DWORD),0},+
  1724.                         {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeNum)}}
  1725.             set AdapterType = $(!NetRuleHardwareDIALINType)
  1726.             set AdapterClass = $(!NetRuleHardwareDIALINClass)
  1727.             set AdapterBlock = $(!NetRuleHardwareDIALINBlock)
  1728.         else-ifint $(NumAddDialoutNBF) > 0
  1729.             set-sub NumAddDialoutNBF = $(NumAddDialoutNBF), 1
  1730.             set NetcardInfoList = >($(NetcardInfoList), +
  1731.                                  {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  1732.                                   $(!Product$(ThisOption)DIALOUTName)})
  1733.             set ServiceParamList = +
  1734.                          {{EnumExportPref,$(NoTitle),$(!REG_VT_DWORD),1},+
  1735.                          {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeNum)}}
  1736.             set AdapterType = $(!NetRuleHardwareDIALOUTType)
  1737.             set AdapterClass = $(!NetRuleHardwareDIALOUTClass)
  1738.             set AdapterBlock = $(!NetRuleHardwareDIALOUTBlock)
  1739.         else-ifint $(NumAddDialinIP) > 0
  1740.             set-sub NumAddDialinIP = $(NumAddDialinIP), 1
  1741.             set NetcardInfoList = >($(NetcardInfoList), +
  1742.                                  {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  1743.                                   $(!Product$(ThisOption)DIALINIPName)})
  1744.             set ServiceParamList = +
  1745.                          {{EnumExportPref,$(NoTitle),$(!REG_VT_DWORD),0},+
  1746.                          {AutoIPAddress,$(NoTitle),$(!REG_VT_DWORD),1},+
  1747.                          {ServerAdapter,$(NoTitle),$(!REG_VT_DWORD),1},+
  1748.                          {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeNum)}}
  1749.             set AdapterType = $(!NetRuleHardwareDIALINIPType)
  1750.             set AdapterClass = $(!NetRuleHardwareDIALINIPClass)
  1751.             set AdapterBlock = $(!NetRuleHardwareDIALINIPBlock)
  1752.         else-ifint $(NumAddDialoutIP) > 0
  1753.             set-sub NumAddDialoutIP = $(NumAddDialoutIP), 1
  1754.             set NetcardInfoList = >($(NetcardInfoList), +
  1755.                                  {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  1756.                                   $(!Product$(ThisOption)DIALOUTIPName)})
  1757.             set ServiceParamList = +
  1758.                        {{EnumExportPref,$(NoTitle),$(!REG_VT_DWORD),1},+
  1759.                        {AutoIPAddress,$(NoTitle),$(!REG_VT_DWORD),1},+
  1760.                        {ServerAdapter,$(NoTitle),$(!REG_VT_DWORD),0},+
  1761.                        {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeNum)}}
  1762.             set AdapterType = $(!NetRuleHardwareDIALOUTIPType)
  1763.             set AdapterClass = $(!NetRuleHardwareDIALOUTIPClass)
  1764.             set AdapterBlock = $(!NetRuleHardwareDIALOUTIPBlock)
  1765.         else-ifint $(NumAddDialinoutIPX) > 0
  1766.             set-sub NumAddDialinoutIPX = $(NumAddDialinoutIPX), 1
  1767.             set NetcardInfoList = >($(NetcardInfoList), +
  1768.                                  {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  1769.                                   $(!Product$(ThisOption)DIALINOUTIPXName)})
  1770.             set ServiceParamList = +
  1771.                          {{EnumExportPref,$(NoTitle),$(!REG_VT_DWORD),0},+
  1772.                          {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeNum)}}
  1773.             set AdapterType = $(!NetRuleHardwareDIALINOUTIPXType)
  1774.             set AdapterClass = $(!NetRuleHardwareDIALINOUTIPXClass)
  1775.             set AdapterBlock = $(!NetRuleHardwareDIALINOUTIPXBlock)
  1776.         endif
  1777.         Shell  $(!UtilityInf), AddValueList, $(KeyNetcard), $(NetcardInfoList)
  1778.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1779.             Debug-Output "ShellCode error"
  1780.             goto ShellCodeError
  1781.         endif
  1782.         CloseRegKey $(KeyNetcard)
  1783.         set TempProdName = """"$(!Product$(ThisOption)Name)$(AdapterNumber)""""
  1784.         set TempBindForm = $(TempProdName)$(!NetRuleHardware$(ThisOption)BindForm)
  1785.         set AdapterRulesList = +
  1786.             {{type,$(NoTitle),$(!REG_VT_SZ),+
  1787.               $(AdapterType)},+
  1788.              {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)},+
  1789.              {class,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  1790.               $(AdapterClass)},+
  1791.              {block,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  1792.               $(AdapterBlock)},+
  1793.              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)},+
  1794.              {Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)}}
  1795.         Shell  $(!UtilityInf), AddValueList, $(KeyAdapterRules), $(AdapterRulesList)
  1796.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1797.             Debug-Output "ShellCode error."
  1798.             goto ShellCodeError
  1799.         endif
  1800.         set RegistryErrorIndex = $($R0)
  1801.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1802.             Debug-Output "Resgitry error: add value list."
  1803.             CloseRegKey $(KeyParameters)
  1804.             CloseRegKey $(KeyAdapterRules)
  1805.             goto fatalregistry
  1806.         endif
  1807.         CloseRegKey $(KeyAdapterRules)
  1808.         Shell  $(!UtilityInf), AddValueList, $(KeyParameters), $(ServiceParamList)
  1809.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1810.             Debug-Output "ShellCode error."
  1811.             goto ShellCodeError
  1812.         endif
  1813.         CloseRegKey $(KeyParameters)
  1814.     goto AddNdisWanNetCard
  1815.      endif 
  1816. RemoveNdisWanNetCard = +
  1817.      ifstr(i) $(ServicesBaseKey) != $(KeyNull)
  1818.          CloseRegKey $(ServicesBaseKey)
  1819.      endif
  1820.      ifstr(i) $(KeyNetcards) != $(KeyNull)
  1821.          CloseRegKey $(KeyNetcards)
  1822.      endif
  1823.      Ifint $(NumRemoveTotal) == 0
  1824.      goto WriteRasAsyMac
  1825.      endif
  1826.      Debug-Output "Removing NdisWan netcard entry..."
  1827.         OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) KeyNetcards
  1828.         ifstr $(KeyNetcards) == $(KeyNull)
  1829.              Debug-Output "OEMNSVRA.INF: could not open Netcards key"
  1830.              set RegistryErrorIndex = UNABLE_OPEN_NETWORKCARD_SECTION
  1831.              goto fatalregistry
  1832.         endif
  1833.         EnumRegKey $(KeyNetcards) NetcardsList
  1834.         set RemoveDialinList  = {}
  1835.         set RemoveDialinIpList  = {}
  1836.         set RemoveDialoutList = {}
  1837.         set RemoveDialoutIpList = {}
  1838.         set RemoveDialinoutIpxList = {}
  1839.         ForListDo $(NetcardsList)
  1840.            set KeyName = *($($),1)
  1841.            OpenRegKey $(KeyNetcards) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  1842.            ifstr $(Card) == $(KeyNull)
  1843.                Debug-Output "OEMNSVRA.INF: could not open netcard key"
  1844.                set RegistryErrorIndex = UNABLE_OPEN_NETWORKCARD_SECTION
  1845.                goto fatalregistry
  1846.            endif
  1847.            GetRegValue $(Card), "ProductName" ProductNameInfo
  1848.            set CardProductName = *($(ProductNameInfo), 4)
  1849.            ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINName)
  1850.               set RemoveDialinList = >($(RemoveDialinList), +
  1851.                       {$(!ProductNDISWANName),+
  1852.                                        $(!NetworkCardKeyName)"\"$(KeyName)})
  1853.            else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINIPName)
  1854.               set RemoveDialinIpList = >($(RemoveDialinIpList), +
  1855.                     {$(!ProductNDISWANName),+
  1856.                                          $(!NetworkCardKeyName)"\"$(KeyName)})
  1857.            else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTName)
  1858.               set RemoveDialoutList = >($(RemoveDialoutList), +
  1859.                        {$(!ProductNDISWANName),+
  1860.                                         $(!NetworkCardKeyName)"\"$(KeyName)})
  1861.            else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTIPName)
  1862.               set RemoveDialoutIpList = >($(RemoveDialoutIpList), +
  1863.                      {$(!ProductNDISWANName),+
  1864.                                           $(!NetworkCardKeyName)"\"$(KeyName)})
  1865.            else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINOUTIPXName)
  1866.               set RemoveDialinoutIpxList = >($(RemoveDialinoutIpxList), +
  1867.                        {$(!ProductNDISWANName),+
  1868.                                            $(!NetworkCardKeyName)"\"$(KeyName)})
  1869.            endif
  1870.            CloseRegKey $(Card)
  1871.         EndForListDo
  1872.         CloseRegKey $(KeyNetcards)
  1873.         QueryListSize IpNetCards $(RemoveDialinIpList)
  1874.         ifint $(IpNetCards) != 0
  1875.             ForListDo  $(RemoveDialinIpList)
  1876.                 ifint $(NumRemoveDialinIP) == 0
  1877.                     goto RemoveDialinIPX
  1878.                 endif
  1879.                 set-sub NumRemoveDialinIP = $(NumRemoveDialinIP), 1
  1880.                 shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  1881.                                       $(WritingRasParamsRemove)" "$(NumRemoveTotal)
  1882.                 set-sub NumRemoveTotal = $(NumRemoveTotal), 1
  1883.                 debug-output "Removing hardware component: "$($)
  1884.                 Shell $(!UtilityInf), RemoveHardwareComponent, +
  1885.                                      $(!Manufacturer), *($($),1), *($($),2)
  1886.             EndForListDo
  1887.         endif
  1888. RemoveDialinIPX =+
  1889.         QueryListSize IpxNetCards $(RemoveDialinoutIpxList)
  1890.         ifint $(IpxNetCards) != 0
  1891.             ForListDo  $(RemoveDialinoutIpxList)
  1892.                 ifint $(NumRemoveDialinoutIPX) == 0
  1893.                     goto RemoveDialinNBF
  1894.                 endif
  1895.                 set-sub NumRemoveDialinoutIPX = $(NumRemoveDialinoutIPX), 1
  1896.                 debug-output "Removing hardware component: "$($)
  1897.                 shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  1898.                                       $(WritingRasParamsRemove)" "$(NumRemoveTotal)
  1899.                 set-sub NumRemoveTotal = $(NumRemoveTotal), 1
  1900.                 Shell $(!UtilityInf), RemoveHardwareComponent, +
  1901.                                      $(!Manufacturer), *($($),1), *($($),2)
  1902.             EndForListDo
  1903.         endif
  1904. RemoveDialinNBF =+
  1905.         ForListDo  $(RemoveDialinList)
  1906.             ifint $(NumRemoveDialinNBF) == 0
  1907.                 goto RemoveDialout
  1908.             endif
  1909.             set-sub NumRemoveDialinNBF = $(NumRemoveDialinNBF), 1
  1910.             shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  1911.                                   $(WritingRasParamsRemove)" "$(NumRemoveTotal)
  1912.             set-sub NumRemoveTotal = $(NumRemoveTotal), 1
  1913.             debug-output "Removing hardware component: "$($)
  1914.             Shell $(!UtilityInf), RemoveHardwareComponent, $(!Manufacturer),+
  1915.                   *($($),1), *($($),2)
  1916.         EndForListDo
  1917. RemoveDialout = +
  1918.         QueryListSize IpNetCards $(RemoveDialoutIpList)
  1919.         ifint $(IpNetCards) != 0
  1920.             ForListDo  $(RemoveDialoutIpList)
  1921.                 ifint $(NumRemoveDialoutIP) == 0
  1922.                     goto RemoveDialoutNBF
  1923.                 endif
  1924.                 set-sub NumRemoveDialoutIP = $(NumRemoveDialoutIP), 1
  1925.                 shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  1926.                                       $(WritingRasParamsRemove)" "$(NumRemoveTotal)
  1927.                 set-sub NumRemoveTotal = $(NumRemoveTotal), 1
  1928.                 debug-output "Removing hardware component: "$($)
  1929.                 Shell $(!UtilityInf), RemoveHardwareComponent, +
  1930.                                      $(!Manufacturer), *($($),1), *($($),2)
  1931.             EndForListDo
  1932.         endif
  1933. RemoveDialoutNBF =+
  1934.         ForListDo  $(RemoveDialoutList)
  1935.             ifint $(NumRemoveDialoutNBF) == 0
  1936.         goto WriteRasAsyMac
  1937.             endif
  1938.             set-sub NumRemoveDialoutNBF = $(NumRemoveDialoutNBF), 1
  1939.             shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  1940.                                   $(WritingRasParamsRemove)" "$(NumRemoveTotal)
  1941.             set-sub NumRemoveTotal = $(NumRemoveTotal), 1
  1942.             debug-output "Removing hardware component: "$($)
  1943.             Shell $(!UtilityInf), RemoveHardwareComponent, $(!Manufacturer),+
  1944.                   *($($),1), *($($),2)
  1945.         EndForListDo
  1946. WriteRasAsyMac = +
  1947.     ifstr(i) $(fSerialInstalled) == TRUE
  1948.         set AsyStartValue = 2
  1949.     else-ifstr(i) $(fOtherInstalled) == TRUE
  1950.         set AsyStartValue = 2
  1951.     else-ifstr(i) $(fUnimodemInstalled) == TRUE
  1952.         set AsyStartValue = 2
  1953.     else
  1954.         set AsyStartValue = 4
  1955.     endif
  1956.     OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacKeyName) $(!MAXIMUM_ALLOWED) KeyMac
  1957.     ifstr $(KeyMac) == $(KeyNull)
  1958.         Debug-Output "OEMNSVRA.INF: could not open AsyncMac key"
  1959.     else
  1960.         SetRegValue $(KeyMac) {Start,$(NoTitle),$(!REG_VT_DWORD),$(AsyStartValue)}
  1961.         CloseRegKey $(KeyMac)
  1962.     endif
  1963.     ifint $(PrevNumPorts) == $(NewNumPorts)
  1964.       ifint $(PrevNumDialinNBF) == $(NewNumDialinNBF)
  1965.         ifint $(PrevNumDialoutNBF) == $(NewNumDialoutNBF)
  1966.           ifint $(PrevNumDialinIP) == $(NewNumDialinIP)
  1967.             ifint $(PrevNumDialoutIP) == $(NewNumDialoutIP)
  1968.               ifint $(PrevNumDialinoutIPX) == $(NewNumDialinoutIPX)
  1969.                   EndWait
  1970.                   Ifint $(BillboardVisible) != 0
  1971.                       Shell "subroutn.inf" PopBillboard
  1972.                       Set BillboardVisible = 0
  1973.                   Endif
  1974.                   goto WriteProtocolInfo
  1975.               endif
  1976.             endif
  1977.           endif
  1978.         endif
  1979.       endif
  1980.     endif
  1981.     OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacParamKeyName) $(!MAXIMUM_ALLOWED) KeyMacParams
  1982.     ifstr $(KeyMacParams) == $(KeyNull)
  1983.        Debug-Output "OEMNSVRA.INF: could not open AsyncMac Params key"
  1984.        set RegistryErrorIndex = UNABLE_OPEN_SERVICE_PARAMETERS
  1985.        goto fatalregistry
  1986.     endif
  1987.     set NewValueList = +
  1988.         {{Ports, $(NoTitle), $(!REG_VT_DWORD), $(NewNumPorts)},+
  1989.          {DialinNBF, $(NoTitle), $(!REG_VT_DWORD), $(NewNumDialinNBF)},+
  1990.          {DialoutNBF, $(NoTitle), $(!REG_VT_DWORD), $(NewNumDialoutNBF)},+
  1991.          {DialinIP, $(NoTitle), $(!REG_VT_DWORD), $(NewNumDialinIP)},+
  1992.          {DialoutIP, $(NoTitle), $(!REG_VT_DWORD), $(NewNumDialoutIP)},+
  1993.          {DialinoutIPX, $(NoTitle), $(!REG_VT_DWORD), $(NewNumDialinoutIPX)}}
  1994.     Shell  $(!UtilityInf), AddValueList, $(KeyMacParams), $(NewValueList)
  1995.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1996.          Debug-Output "AddValueList bombed out"
  1997.          goto ShellCodeError
  1998.     endif
  1999.     set RegistryErrorIndex = $($R0)
  2000.     CloseRegKey $(KeyMacParams)
  2001.     Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  2002.         goto fatalregistry
  2003.     endif
  2004.     OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) KeyNetcards
  2005.     ifstr $(KeyNetcards) == $(KeyNull)
  2006.          Debug-Output "OEMNSVRA.INF: could not open Netcards key"
  2007.          set RegistryErrorIndex = UNABLE_OPEN_NETWORKCARD_SECTION
  2008.          goto fatalregistry
  2009.     endif
  2010.     EnumRegKey $(KeyNetcards) NetcardsList
  2011.     ForListDo $(NetcardsList)
  2012.        set KeyName = *($($),1)
  2013.        OpenRegKey $(KeyNetcards) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  2014.        ifstr $(Card) == $(KeyNull)
  2015.           Debug-Output "OEMNSVRA.INF: could not open netcard key"
  2016.           set RegistryErrorIndex = UNABLE_OPEN_NETWORKCARD_SECTION
  2017.           goto fatalregistry
  2018.        endif
  2019.        GetRegValue $(Card), "ProductName" ProductNameInfo
  2020.        set CardProductName = *($(ProductNameInfo), 4)
  2021.        ifstr(i) $(CardProductName) == $(ProductRASASYMACName)
  2022.            goto RasMacCardFound
  2023.        endif
  2024.        CloseRegKey $(Card)
  2025.     EndForListDo
  2026.     CloseRegKey $(KeyNetcards)
  2027. RasMacCardFound = +
  2028.     Debug-Output "Shelling to find AsyncMac Service."
  2029.     Shell $(!UtilityInf) FindService, $(Card)
  2030.     CloseRegKey $(Card)
  2031.     ifint $($ShellCode)  != $(!SHELL_CODE_OK)
  2032.         Debug-Output "OEMNSVRA.INF: shell Findservice failed"
  2033.         goto ShellCodeError
  2034.     endif
  2035.     ifstr(i) $($R0) != NO_ERROR
  2036.         Debug-Output "OEMNSVRA.INF: findservice failed."
  2037.         goto fatalregistry
  2038.     endif
  2039.     set KeyParameters = $($R2)
  2040.     CloseRegKey $($R1)
  2041.     Shell $(!UtilityInf), GetBusTypeNum
  2042.     set BusTypeNum = $($R1)
  2043.     set NewValueList = +
  2044.         {{Ports, $(NoTitle), $(!REG_VT_DWORD), $(NewNumPorts)}, +
  2045.          {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeNum)}}
  2046.     Shell  $(!UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  2047.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2048.          Debug-Output "AddValueList bombed out"
  2049.          goto ShellCodeError
  2050.     endif
  2051.     set RegistryErrorIndex = $($R0)
  2052.     CloseRegKey $(KeyParameters)
  2053.     Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  2054.         goto fatalregistry
  2055.     endif
  2056. WriteProtocolInfo =+
  2057.     Shell "" SaveSelectedProtocols $(fNetbeuiSelected) $(fTcpIpSelected) +
  2058.                                    $(fIpxSelected) $(fNetbeuiAllowed) +
  2059.                                    $(fTcpIpAllowed) $(fIpxAllowed)
  2060.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2061.          Debug-Output "Error shelling SaveSelectedProtocols"
  2062.          goto ShellCodeError
  2063.     endif
  2064.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2065.          Debug-Output "Error Saving selected protocols"
  2066.          goto end
  2067.     endif
  2068.     Shell "" WritePPPParameters
  2069.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2070.          Debug-Output "Error shelling WritePPPParameters"
  2071.          goto ShellCodeError
  2072.     endif
  2073.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2074.          Debug-Output "Error from WritePPPParameters"
  2075.          goto end
  2076.     endif
  2077.     ifstr(i) $(fNetbeuiChosen) == TRUE
  2078.         ifstr(i) $(fNetbeuiInstalled) == FALSE
  2079.             Shell "" InstallProtocol "NETBEUI"
  2080.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2081.                  Debug-Output "Error shelling InstallProtocol NETBEUI"
  2082.                  goto ShellCodeError
  2083.             endif
  2084.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2085.                  Debug-Output "Error installing NETBEUI"
  2086.                  goto end
  2087.             endif
  2088.         endif
  2089.     endif
  2090.     ifstr(i) $(fTcpIpChosen) == TRUE
  2091.         ifstr(i) $(fTcpIpInstalled) == FALSE
  2092.             Shell "" InstallProtocol "TCPIP"
  2093.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2094.                  Debug-Output "Error shelling InstallProtocol TCPIP"
  2095.                  goto ShellCodeError
  2096.             endif
  2097.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2098.                  Debug-Output "Error installing TCPIP"
  2099.                  goto end
  2100.             endif
  2101.         endif
  2102.         Shell "" InstallRasArpService
  2103.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2104.              Debug-Output "Error shelling InstallRasArpService"
  2105.              goto ShellCodeError
  2106.         endif
  2107.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2108.              Debug-Output "Error from InstallRasArpService"
  2109.              goto end
  2110.         endif
  2111.         set CommonStatus = STATUS_SUCCESSFUL
  2112.         Shell "" UpdateIPRouterInfo $(EnableIpRouter)
  2113.         Shell "" SaveTcpipInfo $(fTcpIpAllowed)
  2114.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2115.              Debug-Output "Error shelling SaveTcpipInfo"
  2116.              goto ShellCodeError
  2117.         endif
  2118.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2119.              Debug-Output "Error saving Tcpip info"
  2120.              goto end
  2121.         endif
  2122.     else
  2123.         Shell "" RemoveRasArpService
  2124.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2125.              Debug-Output "Error shelling RemoveRasArpService"
  2126.              goto ShellCodeError
  2127.         endif
  2128.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2129.              Debug-Output "Error from RemoveRasArpService"
  2130.              goto end
  2131.         endif
  2132.         Shell "" SaveTcpipInfo $(fTcpIpAllowed)
  2133.         set CommonStatus = STATUS_SUCCESSFUL
  2134.     endif
  2135.     ifstr(i) $(fIpxChosen) == TRUE
  2136.         ifstr(i) $(fIpxInstalled) == FALSE
  2137.             Shell "" InstallProtocol "IPX"
  2138.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2139.                  Debug-Output "Error shelling InstallProtocol IPX"
  2140.                  goto ShellCodeError
  2141.             endif
  2142.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2143.                  Debug-Output "Error installing IPX"
  2144.                  goto end
  2145.             endif
  2146.         endif
  2147.         OpenRegKey $(!REG_H_LOCAL) ""  +
  2148.                    $(!NTN_ServiceBase)"\NWLNKIPX\Parameters"  +
  2149.                    $(!MAXIMUM_ALLOWED) KeyIpxParameters
  2150.         ifstr $(KeyIpxParameters) != $(KeyNull)
  2151.            GetRegValue $(KeyIpxParameters), "SingleNetworkActive"  +
  2152.                        SingleNetworkActive
  2153.            ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  2154.                SetRegValue $(KeyIpxParameters) +
  2155.                            {SingleNetworkActive, 0, $(!REG_VT_DWORD), 1}
  2156.            endif
  2157.            GetRegValue $(KeyIpxParameters), "DisableDialoutSap"  +
  2158.                        DisableDialoutSap
  2159.            ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  2160.                SetRegValue $(KeyIpxParameters) +
  2161.                            {DisableDialoutSap, 0, $(!REG_VT_DWORD), 1}
  2162.            endif
  2163.            GetRegValue $(KeyIpxParameters), "DisableDialinNetbios"  +
  2164.                        DisableDialinNetbios
  2165.            ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  2166.                SetRegValue $(KeyIpxParameters) +
  2167.                            {DisableDialinNetbios, 0, $(!REG_VT_DWORD), 1}
  2168.            endif
  2169.            CloseRegKey $(KeyIpxParameters)
  2170.         Endif
  2171.         else
  2172.             Debug-Output "OEMNSVRA.INF: error opening NWLNKIPX\Parameters key"
  2173.         endif
  2174.         Shell "" SaveIpxInfo $(EnableIpxRouter) $(fIpxAllowed)
  2175.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2176.              Debug-Output "Error shelling SaveIpxInfo"
  2177.              goto ShellCodeError
  2178.         endif
  2179.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2180.              Debug-Output "Error saving Ipx info"
  2181.              goto end
  2182.         endif
  2183.         ifint $(EnableIpxRouter) == 1
  2184.             Shell "" InstallNwlnkRipService
  2185.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2186.                  Debug-Output "Error shelling InstallNwlnkRipService"
  2187.                  goto ShellCodeError
  2188.             endif
  2189.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2190.                  Debug-Output "Error from InstallNwlnkRipService"
  2191.                  goto end
  2192.             endif
  2193.             set CommonStatus = STATUS_SUCCESSFUL
  2194.             Shell "" InstallIsnSapService
  2195.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2196.                  Debug-Output "Error shelling InstallIsnSapService"
  2197.                  goto ShellCodeError
  2198.             endif
  2199.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2200.                  Debug-Output "Error from InstallIsnSapService"
  2201.                  goto end
  2202.             endif
  2203.             set CommonStatus = STATUS_SUCCESSFUL
  2204.         else
  2205.             Shell "" RemoveNwlnkRipService
  2206.             Shell "" RemoveIsnSapService
  2207.         endif
  2208.         Shell "" UpdateIPXRouterInfo $(EnableWanRouter)
  2209.         Ifstr(i) $(!NTN_InstallPhase) != primary
  2210.             shell $(subroutninf) PopBillBoard
  2211.             Set BillboardVisible = 0
  2212.         Endif
  2213.     else
  2214.         Shell "" SaveIpxInfo $(EnableIpxRouter) $(fIpxAllowed)
  2215.     endif
  2216. WriteParametersOver = +
  2217.     EndWait
  2218.     goto successful
  2219. RemoveRas = +
  2220.     StartWait
  2221.     set REMOVE_SOFTWARE = {}
  2222.     shell "" QueryComponentsInstalled
  2223.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  2224.         Set InstalledComps = $($R1)
  2225.         Set InstalledFlags = $($R2)
  2226.         Set DoServer      = *($(InstalledFlags),1)
  2227.         Set DoClient      = *($(InstalledFlags),2)
  2228.         Set DoAdmin       = *($(InstalledFlags),3)
  2229.         Set DoServerOnly  = *($(InstalledFlags),4)
  2230.         Set DoClientOnly  = *($(InstalledFlags),5)
  2231.         Set DoAdminOnly   = *($(InstalledFlags),6)
  2232.     Endif
  2233.     Debug-Output "Installed List is "$(InstalledComps)
  2234.     Debug-Output "Installed Flags is "$(InstalledFlags)
  2235.     ifstr(i) $(DoAdminOnly) == TRUE
  2236.          set REMOVE_SOFTWARE = {$(ProductRASName)}
  2237.          goto RemoveSoftware
  2238.     endif
  2239.     set REMOVE_SOFTWARE = >($(REMOVE_SOFTWARE), $(ProductRASName))
  2240.     ifstr(i) $(DoServer) == TRUE
  2241.          set REMOVE_SOFTWARE = >($(REMOVE_SOFTWARE), $(ProductRASSVRName))
  2242.     endif
  2243.     set REMOVE_SOFTWARE = >($(REMOVE_SOFTWARE), $(ProductRASMANName))
  2244.     set REMOVE_SOFTWARE = >($(REMOVE_SOFTWARE), $(!ProductRASAUTODIALName))
  2245.     OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) KeyNetcards
  2246.     ifstr $(KeyNetcards) == $(KeyNull)
  2247.          Debug-Output "OEMNSVRA.INF: could not open Netcards key"
  2248.          goto RemoveSoftware
  2249.     endif
  2250.     EnumRegKey $(KeyNetcards) NetcardsList
  2251.     ForListDo $(NetcardsList)
  2252.        set KeyName = *($($),1)
  2253.        OpenRegKey $(KeyNetcards) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  2254.        ifstr $(Card) == $(KeyNull)
  2255.            Debug-Output "OEMNSVRA.INF: could not open netcard key"
  2256.            goto RemoveSoftware
  2257.        endif
  2258.        GetRegValue $(Card), "ProductName" ProductNameInfo
  2259.        set CardProductName = *($(ProductNameInfo), 4)
  2260.        ifstr(i) $(CardProductName) == $(!ProductNDISWANName)
  2261.           set !NETCARD_LIST = >($(!NETCARD_LIST), +
  2262.                 {$(!ProductNDISWANName),+
  2263.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  2264.        else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINName)
  2265.           set !NETCARD_LIST = >($(!NETCARD_LIST), +
  2266.                 {$(!ProductNDISWANName),+
  2267.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  2268.        else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTName)
  2269.           set !NETCARD_LIST = >($(!NETCARD_LIST), +
  2270.                 {$(!ProductNDISWANName),+
  2271.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  2272.        else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINIPName)
  2273.           set !NETCARD_LIST = >($(!NETCARD_LIST), +
  2274.                 {$(!ProductNDISWANName),+
  2275.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  2276.        else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTIPName)
  2277.           set !NETCARD_LIST = >($(!NETCARD_LIST), +
  2278.                 {$(!ProductNDISWANName),+
  2279.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  2280.        else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINOUTIPXName)
  2281.           set !NETCARD_LIST = >($(!NETCARD_LIST), +
  2282.                 {$(!ProductNDISWANName),+
  2283.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  2284.        else-ifstr(i) $(CardProductName) == $(ProductRASASYMACName)
  2285.           set !NETCARD_LIST = >($(!NETCARD_LIST),+
  2286.                                 {$(ProductRASASYMACName),+
  2287.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  2288.        endif
  2289.        CloseRegKey $(Card)
  2290.     EndForListDo
  2291.     CloseRegKey $(KeyNetcards)
  2292.     read-syms StatusUpdatingRegistry$(!STF_LANGUAGE)
  2293.     QueryListSize NumRemove $(!NETCARD_LIST)
  2294.     ForListDo  $(!NETCARD_LIST)
  2295.         shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  2296.                               $(RemovingAdapters)" "$(NumRemove)
  2297.         Set BillboardVisible = 1
  2298.         debug-output "Removing hardware component: "$($)
  2299.         Shell $(!UtilityInf), RemoveHardwareComponent, $(!Manufacturer),+
  2300.               *($($),1), *($($),2)
  2301.         set-sub NumRemove = $(NumRemove), 1
  2302.     EndForListDo
  2303.     ifint $(BillboardVisible) != 0
  2304.         Shell "subroutn.inf" PopBillboard
  2305.         Set BillboardVisible = 0
  2306.     Endif
  2307. RemoveSoftware = +
  2308.     Shell "" RemoveRasArpService
  2309.     Shell "" RemoveNdisTapiService
  2310.     Shell "" RemoveRasAcdService
  2311.     set RasTapiDevicesKey = $(KeyNull)
  2312.     OpenRegKey $(!REG_H_LOCAL) "" $(RasTapiDevicesKeyName) $(!MAXIMUM_ALLOWED) RasTapiDevicesKey
  2313.     ifstr $(RasTapiDevicesKey) != $(KeyNull)
  2314.        set TapiProviderList = {}
  2315.        EnumRegKey $(RasTapiDevicesKey) TapiProviderList
  2316.        ForListDo $(TapiProviderList)
  2317.            set ProviderName = *($($),1)
  2318.            Debug-Output "OEMNSVRA.INF: Removing "$(ProviderName)" dependency on NdisTapi."
  2319.            Shell "" RemoveServiceDependency $(ProviderName) "NdisTapi"
  2320.        EndForListDo
  2321.     EndIf
  2322.     set fIpxAllowed = FALSE
  2323.     Shell "" QuerySelectedProtocols
  2324.     ifstr(i) $($R0) == STATUS_SUCCESSFUL
  2325.         set fIpxAllowed = $($R6)
  2326.     else
  2327.         Debug-Output "RemoveRas: error QuerySelectedProtocols"
  2328.     endif
  2329.     ifstr(i) $(fIpxAllowed) == TRUE
  2330.         Shell "" RemoveNwlnkRipService
  2331.         Shell "" RemoveIsnSapService
  2332.     endif
  2333.     Debug-Output "Remove Software List "$(REMOVE_SOFTWARE)
  2334.     ForListDo  $(REMOVE_SOFTWARE)
  2335.         Debug-Output "Removing software component: "$($)
  2336.         ifstr(i) $($) == RAS
  2337.              OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyBase) +
  2338.                         $(!MAXIMUM_ALLOWED) ProductKey
  2339.              Ifstr $(ProductKey) == $(KeyNull)
  2340.                 Debug-Output "OEMNSVRA.INF: could not open Software product key"
  2341.                  goto RemoveFiles
  2342.              endif
  2343.              DeleteRegTree $(ProductKey) $(Product$($)Name)
  2344.              CloseRegKey $(ProductKey)
  2345.         else
  2346.             Shell $(!UtilityInf), RemoveSoftwareComponent, $(!Manufacturer), $($)
  2347.         endif
  2348.     EndForListDo
  2349. RemoveFiles = +
  2350.     Install RemoveRasFiles
  2351.     ifstr(i) $(DoServerOnly) == FALSE
  2352.         Install RemoveRasGroup
  2353.     endif
  2354.     Shell "" RemoveInfFromReviewPrograms
  2355.     shell "" RemoveNetGroupDependency
  2356. RemoveRasOver = +
  2357.     Debug-Output "OEMNSVRA.INF: Doing a forcible cleanup..."
  2358.     OpenRegKey $(!REG_H_LOCAL) ""  $(!NTN_SoftwareBase)"\Microsoft" +
  2359.                $(!MAXIMUM_ALLOWED) KeySoftware
  2360.     ifstr $(KeySoftware) != $(KeyNull)
  2361.         set SoftList = {"ASYNCMAC", "NDISWAN", "RAS", "RASMAN", +
  2362.                         "RASAUTO", "REMOTEACCESS"}
  2363.         ForListDo $(SoftList)
  2364.             DeleteRegTree $(KeySoftware) $($)
  2365.         EndForListDo
  2366.         set NetworkCardKey = $(KeyNull)
  2367.         OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) +
  2368.                    $(!MAXIMUM_ALLOWED) NetworkCardKey
  2369.         Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  2370.             set NetcardsList = {}
  2371.             EnumRegKey $(NetworkCardKey) NetcardsList
  2372.             Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  2373.               ForListDo $(NetcardsList)
  2374.                set KeyName = *($($),1)
  2375.                set Card = $(KeyNull)
  2376.                OpenRegKey $(NetworkCardKey) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  2377.                ifstr $(Card) == $(KeyNull)
  2378.                    Debug-Output "RemoveRas: could not open netcard key "$(KeyName)
  2379.                else
  2380.                    GetRegValue $(Card), "ProductName" ProductNameInfo
  2381.                    Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  2382.                       Debug-Output "RemoveRas: ProductName not found."
  2383.                    else
  2384.                       set CardProductName = *($(ProductNameInfo), 4)
  2385.                       Debug-Output "RemoveRas: ProductName. "$(CardProductName)
  2386.                       ifstr(i) $(CardProductName) == $(!ProductNDISWANName)
  2387.                          DeleteRegTree $(NetworkCardKey) $(KeyName)
  2388.                       endif
  2389.                       ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINName)
  2390.                           DeleteRegTree $(NetworkCardKey) $(KeyName)
  2391.                       endif
  2392.                       ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTName)
  2393.                           DeleteRegTree $(NetworkCardKey) $(KeyName)
  2394.                       endif
  2395.                       ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINIPName)
  2396.                           DeleteRegTree $(NetworkCardKey) $(KeyName)
  2397.                       endif
  2398.                       ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTIPName)
  2399.                           DeleteRegTree $(NetworkCardKey) $(KeyName)
  2400.                       endif
  2401.                       ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINOUTIPXName)
  2402.                           DeleteRegTree $(NetworkCardKey) $(KeyName)
  2403.                       endif
  2404.                       ifstr(i) $(CardProductName) == $(ProductRASASYMACName)
  2405.                           DeleteRegTree $(NetworkCardKey) $(KeyName)
  2406.                       endif
  2407.                    endif
  2408.               EndForListDo
  2409.             else
  2410.               Debug-Output "RemoveRas: EnumRegKey failed."
  2411.             endif
  2412.         else
  2413.             Debug-Output "RemoveRas: failed to open "$(!NetworkCardKeyName)
  2414.         endif
  2415.         CloseRegKey $(KeySoftware)
  2416.     else
  2417.         Debug-Output "RemoveRas: failed to open software key"
  2418.     endif
  2419.     OpenRegKey $(!REG_H_LOCAL) ""  $(!NTN_ServiceBase) +
  2420.                $(!MAXIMUM_ALLOWED) KeyServices
  2421.     ifstr $(KeyServices) != $(KeyNull)
  2422.         set ServiceList = {"ASYNCMAC", "NDISWAN", "RASARP", "RASMAN", +
  2423.                            "REMOTEACCESS", "RASACD", "RASAUTO"}
  2424.         ForListDo $(ServiceList)
  2425.             DeleteRegTree $(KeyServices) $($)
  2426.         EndForListDo
  2427.         EnumRegKey $(KeyServices) ServiceList
  2428.         Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  2429.            ForListDo $(ServiceList)
  2430.                set ServiceName = *($($),1)
  2431.                set Result = 1
  2432.             LibraryProcedure Result $(!LIBHANDLE) SetupStrncmp +
  2433.                                 $(ServiceName) "NdisWan" 7
  2434.                ifint $(Result) == 0
  2435.                   Debug-Output "RemoveRas: Removing "$(ServiceName)
  2436.                   DeleteRegTree $(KeyServices) $(ServiceName)
  2437.                else
  2438.                    LibraryProcedure Result $(!LIBHANDLE) SetupStrncmp +
  2439.                                 $(ServiceName) "AsyncMac" 8
  2440.                    ifint $(Result) == 0
  2441.                       Debug-Output "RemoveRas: Removing "$(ServiceName)
  2442.                       DeleteRegTree $(KeyServices) $(ServiceName)
  2443.                    endif
  2444.                endif
  2445.            EndForListDo
  2446.         endif
  2447.         CloseRegKey $(KeyServices)
  2448.     endif
  2449.     EndWait
  2450.     goto $(to)
  2451. BindingsRas = +
  2452.     Debug-Output "OEMNSVRA.INF:Review bindings is being called!!!."
  2453.     Shell "" UpdateSelectedProtocols
  2454.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2455.         Debug-Output "error shelling UpdateSelectedProtocols."
  2456.         goto ShellCodeError
  2457.     endif
  2458.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2459.         Debug-Output "error returned by UpdateSelectedProtocols."
  2460.     endif
  2461.     set fNetbeuiChosen = $($R1)
  2462.     set fTcpIpChosen   = $($R2)
  2463.     set fIpxChosen     = $($R3)
  2464.     ifstr(i) $(fNetbeuiChosen) == FALSE
  2465.         ifstr(i) $(fTcpIpChosen) == FALSE
  2466.             ifstr(i) $(fIpxChosen) == FALSE
  2467.                 read-syms NoProtocolsDlg$(!STF_LANGUAGE)
  2468.                 Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "STATUS", $(NoProtocolsWarning)
  2469.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2470.                     goto ShellCodeError
  2471.                 endif
  2472.                 goto end
  2473.             endif
  2474.         endif
  2475.     endif
  2476.     set WkstaConfigured = FALSE
  2477.     set SrvrConfigured  = FALSE
  2478.     shell "" IsNetworkConfigured
  2479.     Debug-Output "IsNetworkConfigured returned R0 "$($R0)
  2480.     Debug-Output "IsNetworkConfigured returned R1 "$($R1)
  2481.     Debug-Output "IsNetworkConfigured returned R2 "$($R2)
  2482.     ifstr(i) $($R0) == STATUS_SUCCESSFUL
  2483.         set WkstaConfigured  = $($R1)
  2484.         set SrvrConfigured   = $($R2)
  2485.     else
  2486.         read-syms NetworkConfigError$(!STF_LANGUAGE)
  2487.         set Text = $(Text1)
  2488.         shell $(subroutninf) SetupMessage $(!STF_LANGUAGE) "FATAL" $(Text)
  2489.         goto end
  2490.     endif
  2491.     ifstr(i) $(WkstaConfigured) == TRUE
  2492.         ifstr(i) $(SrvrConfigured) == TRUE
  2493.             goto ResetProgramList
  2494.         else
  2495.             goto InstallNetworkError
  2496.         endif
  2497.     else
  2498.         goto InstallNetworkError
  2499.     endif
  2500. InstallNetworkError =+
  2501.     set CommonStatus = STATUS_USERCANCEL
  2502.     read-syms NetworkConfigError$(!STF_LANGUAGE)
  2503.     set Text = $(Text2)
  2504.     shell $(subroutninf) SetupMessage $(!STF_LANGUAGE) "STATUS" $(Text)
  2505. ResetProgramList =+
  2506.     OpenRegKey $(!REG_H_LOCAL) "" $(!RasManKeyName) $(!MAXIMUM_ALLOWED) KeyRasMan
  2507.     ifstr $(KeyRasMan) != $(KeyNull)
  2508.         GetRegValue $(KeyRasMan), "Review" ReviewInfo
  2509.         set ReviewValue = *($(ReviewInfo), 4)
  2510.         ifint $(ReviewValue) == 1
  2511.             Debug-Output "BindingsRas: resetting Review to 0"
  2512.             SetRegValue $(KeyRasMan) {Review,$(NoTitle),$(!REG_VT_DWORD), 0}
  2513.             Shell "" AddInfToReviewProgramsList
  2514.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2515.                 Debug-Output "error shelling AddInfToReviewProgramsList."
  2516.                 goto ShellCodeError
  2517.             endif
  2518.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2519.                 Debug-Output "error returned by AddInfToReviewProgramsList."
  2520.             endif
  2521.         endif
  2522.         CloseRegKey $(KeyRasMan)
  2523.     else
  2524.         Debug-Output "OEMNSVRA.INF: error opening SOFTWARE\RasMan\CurrentVersion key."
  2525.     endif
  2526.     shell "" QueryComponentsInstalled
  2527.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  2528.         Set InstalledComps = $($R1)
  2529.         Set InstalledFlags = $($R2)
  2530.         Set DoServer      = *($(InstalledFlags),1)
  2531.         Set DoClient      = *($(InstalledFlags),2)
  2532.         Set DoAdmin       = *($(InstalledFlags),3)
  2533.         Set DoServerOnly  = *($(InstalledFlags),4)
  2534.         Set DoClientOnly  = *($(InstalledFlags),5)
  2535.         Set DoAdminOnly   = *($(InstalledFlags),6)
  2536.     Endif
  2537.     Debug-Output "Installed List is "$(InstalledComps)
  2538.     Debug-Output "Installed Flags is "$(InstalledFlags)
  2539.     set AsyStartValue = 4
  2540.     OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacKeyName) $(!MAXIMUM_ALLOWED) KeyMac
  2541.     ifstr $(KeyMac) == $(KeyNull)
  2542.         Debug-Output "OEMNSVRA.INF: could not open AsyncMac key"
  2543.     else
  2544.         GetRegValue $(KeyMac), "Start" AsyStartInfo
  2545.         ifint $(RegLastError) == 0
  2546.             set AsyStartValue = *($(AsyStartInfo), 4)
  2547.         endif
  2548.         Debug-Output "OEMNSVRA.INF: AsyncMac start value "$(AsyStartValue)
  2549.         CloseRegKey $(KeyMac)
  2550.     endif
  2551.     set NdisWanParam = {}
  2552.     set NdisWanEndPointsLst = {}
  2553.     ifint $(AsyStartValue) != 4
  2554.         set RasMacLinkageKey = $(KeyNull)
  2555.         OpenRegKey $(!REG_H_LOCAL) "" $(RasMacLinkageKeyName) $(!MAXIMUM_ALLOWED) RasMacLinkageKey
  2556.         ifstr $(RasMacLinkageKey) == $(KeyNull)
  2557.             Debug-Output "OEMNSVRA.INF: could not open AsyncMac linkage key"
  2558.             set RegistryErrorIndex = UNABLE_ACCESS_CONFIGURE_SERVICE
  2559.             goto fatalregistry
  2560.         endif
  2561.         GetRegValue $(RasMacLinkageKey), "Bind" BindInfo
  2562.     set NdisWanParam = *($(BindInfo), 4)
  2563.         CloseRegKey $(RasMacLinkageKey)
  2564.     set NdisWanParamKey = $(KeyNull)
  2565.     OpenRegKey $(!REG_H_LOCAL) "" $(NdisWanParamKeyName) $(!MAXIMUM_ALLOWED) NdisWanParamKey
  2566.     ifstr $(NdisWanParamKey) == $(KeyNull)
  2567.         Debug-Output "OEMNSVRA.INF: could not open NdisWanParamKey"
  2568.         else
  2569.         GetRegValue $(NdisWanParamKey), "EndPoints" EndPointsInfo
  2570.             set EndPointsLst = *($(EndPointsInfo), 4)
  2571.         set NdisWanEndPointsLst = >($(NdisWanEndPointsLst),*($(EndPointsLst), 1))
  2572.         CloseRegKey $(NdisWanParamKey)
  2573.         endif
  2574.     endif
  2575.     set ProviderList = {}
  2576.     set RasTapiDevicesKey = $(KeyNull)
  2577.     OpenRegKey $(!REG_H_LOCAL) "" $(RasTapiDevicesKeyName) $(!MAXIMUM_ALLOWED) RasTapiDevicesKey
  2578.     ifstr $(RasTapiDevicesKey) != $(KeyNull)
  2579.        set TapiProviderList = {}
  2580.        EnumRegKey $(RasTapiDevicesKey) TapiProviderList
  2581.        ForListDo $(TapiProviderList)
  2582.            set TapiAddress = {}
  2583.            set NumEndPoints = 0
  2584.            set ProviderName = *($($),1)
  2585.            Debug-Output "OEMNSVRA.INF: TAPI provider name = "$(ProviderName)
  2586.            OpenRegKey $(RasTapiDevicesKey) "" $(ProviderName) $(!MAXIMUM_ALLOWED) Provider
  2587.            ifstr $(Provider) != $(KeyNull)
  2588.                GetRegValue $(Provider), "Address" TapiAddress
  2589.                set AdapterNum = ""
  2590.                set EndPointCount = 0
  2591.                set tmpNdisWanParam = {}
  2592.                set tmpNdisWanEndPointsLst = {}
  2593.                set DeviceName = ""
  2594.                ForListDo *($(TapiAddress),4)
  2595.                    Split-String $($) "- " Address
  2596.                    set NewAdapterNum = *($(Address), 1)
  2597.                    ifstr(i) $(AdapterNum) != $(NewAdapterNum)
  2598.                      ifstr(i) $(AdapterNum) != ""
  2599.                         set tmpNdisWanParam = >($(tmpNdisWanParam), $(DeviceName))
  2600.                         set tmpNdisWanEndPointsLst = >($(tmpNdisWanEndPointsLst), $(EndPointCount))
  2601.                         set EndPointCount = 0
  2602.                      endif
  2603.                      set AdapterNum = $(NewAdapterNum)
  2604.                      set DeviceName = "\Device\"$(ProviderName)$(AdapterNum)
  2605.                    endif
  2606.                    set-add EndPointCount = $(EndPointCount), 1
  2607.                EndForListDo
  2608.                ifstr $(DeviceName) != ""
  2609.                    set tmpNdisWanParam = >($(tmpNdisWanParam), $(DeviceName))
  2610.                    set tmpNdisWanEndPointsLst = >($(tmpNdisWanEndPointsLst), $(EndPointCount))
  2611.                endif
  2612.                CloseRegKey $(Provider)
  2613.            else
  2614.               Debug-Output "OEMNSVRA.INF: could not open RAS\TAPI DEVICES\"$(DriverName)" key."
  2615.            endif
  2616.            set ProviderKeyName = $(!NTN_ServiceBase)"\"$(ProviderName)
  2617.            set ProviderLinkageKeyName = $(!NTN_ServiceBase)"\"$(ProviderName)"\Linkage"
  2618.            Debug-Output "TAPI provider key name "$(ProviderKeyName)
  2619.            set ProviderKey = $(KeyNull)
  2620.            set ProviderLinkageKey = $(KeyNull)
  2621.            OpenRegKey $(!REG_H_LOCAL) "" $(ProviderKeyName) $(!MAXIMUM_ALLOWED) ProviderKey
  2622.            ifstr $(ProviderKey) == $(KeyNull)
  2623.              Debug-Output "OEMNSVRA.INF: could not open key "$(ProviderKeyName)
  2624.            else
  2625.              set DeleteFlag = 0
  2626.              set DeleteFlagInfo = {}
  2627.              GetRegValue $(ProviderKey),"DeleteFlag", DeleteFlagInfo
  2628.              set DeleteFlag = *($(DeleteFlagInfo), 4)
  2629.              ifint $(DeleteFlag) != 1
  2630.                set ProviderList = >($(ProviderList), $(ProviderName))
  2631.                Shell "" AddServiceDependency $(ProviderName) "NdisTapi"
  2632.                ForListDo $(tmpNdisWanParam)
  2633.                  set NdisWanParam = >($(NdisWanParam), $($))
  2634.                  set NdisWanEndPointsLst = >($(NdisWanEndPointsLst), *($(tmpNdisWanEndPointsLst), $(#)))
  2635.                EndForListDo
  2636.              endif
  2637.              CloseRegKey $(ProviderKey)
  2638.            endif
  2639.        EndForListDo
  2640.        CloseRegKey $(RasTapiDevicesKey)
  2641.     else
  2642.         Debug-Output "OEMNSVRA.INF: could not open RAS\TAPI DEVICES key"
  2643.     endif
  2644.     set NumBindings = 0
  2645.     Debug-Output "NdisWan param Bind value = "$(NdisWanParam)
  2646.     QueryListSize NumBindings $(NdisWanParam)
  2647.     Debug-Output "Number of Ndiswan bindings = "$(NumBindings)
  2648.     ifint $(NumBindings) == 0
  2649.         Debug-Output "OEMNSVRA.INF: No ports are configured"
  2650.         read-syms NoPortsConfigured$(!STF_LANGUAGE)
  2651.         Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "STATUS", $(NoPortsError)
  2652.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2653.             goto ShellCodeError
  2654.         endif
  2655.         goto end
  2656.     endif
  2657.     OpenRegKey $(!REG_H_LOCAL) "" $(NdisWanParamKeyName) $(!MAXIMUM_ALLOWED) NdisWanParamKey
  2658.     ifstr $(NdisWanParamKey) == $(KeyNull)
  2659.     Debug-Output "OEMNSVRA.INF: could not open NdisWanParamKey"
  2660.         set RegistryErrorIndex = UNABLE_ACCESS_CONFIGURE_SERVICE
  2661.         goto fatalregistry
  2662.     endif
  2663.     Debug-Output "Setting NdisWan param Bind to "$(NdisWanParam)
  2664.     set NewValueList = {{Bind, $(NoTitle), $(!REG_VT_MULTI_SZ), $(NdisWanParam)}}
  2665.     Shell $(!UtilityInf), AddValueList, $(NdisWanParamKey), $(NewValueList)
  2666.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2667.     CloseRegKey $(NdisWanParamKey)
  2668.         goto ShellCodeError
  2669.     endif
  2670.     Debug-Output "Setting NdisWan param EndPoints to "$(NdisWanEndPointsLst)
  2671.     set NewValueList = {{EndPoints, $(NoTitle), $(!REG_VT_MULTI_SZ), $(NdisWanEndPointsLst)}}
  2672.     Shell $(!UtilityInf), AddValueList, $(NdisWanParamKey), $(NewValueList)
  2673.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2674.     CloseRegKey $(NdisWanParamKey)
  2675.         goto ShellCodeError
  2676.     endif
  2677.     CloseRegKey $(NdisWanParamKey)
  2678.     LoadLibrary "x" $(!STF_CWDDIR)rascfg.dll PORTSDLGHANDLE
  2679.     LibraryProcedure Result, $(PORTSDLGHANDLE), InitRasmanSecurityDescriptor
  2680.     Debug-Output "Result of setting Rasman security descriptor "$(Result)
  2681.     LibraryProcedure Result, $(PORTSDLGHANDLE), InitRemoteSecurityDescriptor
  2682.     Debug-Output "Result of setting Remote security descriptor "$(Result)
  2683.     Shell "" UpdateCPList
  2684.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2685.         Debug-Output "error shelling UpdateCPList."
  2686.         goto ShellCodeError
  2687.     endif
  2688.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2689.         Debug-Output "error returned by UpdateCPList."
  2690.     endif
  2691.     ifstr(i) $(fTcpIpChosen) == TRUE
  2692.         shell "" UpdateLLInterface
  2693.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2694.             Debug-Output "error shelling UpdateLLInterface."
  2695.             goto ShellCodeError
  2696.         endif
  2697.         Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2698.             Debug-Output "error returned by UpdateLLInterface."
  2699.         endif
  2700.     endif
  2701.     Shell "" SetRasArpBindValueFromTcpIP
  2702.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2703.         Debug-Output "error shelling SetRasArpBindValueFromTcpIP."
  2704.         goto ShellCodeError
  2705.     endif
  2706.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2707.         Debug-Output "error returned by SetRasArpBindValueFromTcpIP."
  2708.     endif
  2709.     Debug-Output "Review bindings done."
  2710.     goto end
  2711. UpgradeRas = +
  2712.     Debug-Output "OEMNSVRA.INF: Upgrade with Option type "$(Option)
  2713.     ifstr(i) $(Option) != "RAS"
  2714.         Debug-Output "OEMNSVRA.INF: not upgrading due to nonras option"
  2715.         set CommonStatus = STATUS_NOEFFECT
  2716.         goto end
  2717.     endif
  2718.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(!MAXIMUM_ALLOWED) KeyProduct
  2719.     Ifstr $(KeyProduct) != $(KeyNull)
  2720.         Shell $(!UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  2721.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2722.             Debug-Output "ShellCode error"
  2723.             goto ShellCodeError
  2724.         endif
  2725.         set !UG_Filename = $($R0)
  2726.         ifstr(i) $(!UG_Filename) != ""
  2727.             Debug-Output "File Name is "$(!UG_Filename)
  2728.             StartWait
  2729.             read-syms UpgradeErrors$(!STF_LANGUAGE)
  2730.             read-syms StatusUpdatingRegistry$(!STF_LANGUAGE)
  2731.             Shell "subroutn.inf" PushBillboard NETSTATUSDLG $(UpdatingRas)
  2732.             Set BillboardVisible = 1
  2733.             shell "" QueryComponentsInstalled
  2734.             Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  2735.                 Set InstalledComps = $($R1)
  2736.                 Set InstalledFlags = $($R2)
  2737.                 Set DoServer      = *($(InstalledFlags),1)
  2738.                 Set DoClient      = *($(InstalledFlags),2)
  2739.                 Set DoAdmin       = *($(InstalledFlags),3)
  2740.                 Set DoServerOnly  = *($(InstalledFlags),4)
  2741.                 Set DoClientOnly  = *($(InstalledFlags),5)
  2742.                 Set DoAdminOnly   = *($(InstalledFlags),6)
  2743.             Endif
  2744.             Debug-Output "Installed List is "$(InstalledComps)
  2745.             Debug-Output "Installed Flags is "$(InstalledFlags)
  2746.             Set ServerInstalled = $(DoServer)
  2747.             Set ClientInstalled = $(DoClient)
  2748.             Set AdminInstalled  = $(DoAdmin)
  2749.             Install InstallResources
  2750.             ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  2751.                 goto filecopycancel
  2752.             endif
  2753.             Install InstallRasFiles
  2754.             ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  2755.                 goto filecopycancel
  2756.             endif
  2757.             set fTcpIp = FALSE
  2758.             Shell "" QuerySelectedProtocols
  2759.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2760.                 Debug-Output "error returned by QuerySelectedProtocols."
  2761.             endif
  2762.             set fNetbeuiSelected = $($R1)
  2763.             set fTcpIpSelected   = $($R2)
  2764.             set fIpxSelected     = $($R3)
  2765.             set fNetbeuiAllowed  = $($R4)
  2766.             set fTcpIpAllowed    = $($R5)
  2767.             set fIpxAllowed      = $($R6)
  2768.             ifstr(i) $(fTcpIpSelected) == TRUE
  2769.               set fTcpIp = "TRUE"
  2770.             else-ifstr(i) $(fTcpIpAllowed) == TRUE
  2771.               set fTcpIp = "TRUE"
  2772.             endif
  2773.             ifstr(i) $(fTcpIp) == TRUE
  2774.                 Shell "" RemoveServiceDependency "TCPIP" "RASARP"
  2775.                 Shell "" RemoveRasArpService
  2776.                 Shell "" InstallRasArpService
  2777.             endif
  2778.             Shell "" SetRestoreConnectionTo1
  2779.             Shell "" RemoveServiceDependency "RemoteAccess" "NetLogon"
  2780.             Shell "" AddServiceDependency "RasMan" "tapisrv"
  2781.             Shell "" InstallSoftwareAndService RASAUTODIAL
  2782.             Shell "" AddServiceDependency "RasAuto" "RasMan"
  2783.             Shell "" RemoveRasAcdService
  2784.             Shell "" InstallRasAcdService
  2785.             OpenRegKey $(!REG_H_LOCAL) "" $(!RasManSvcKeyName) $(!MAXIMUM_ALLOWED) KeyRasMan
  2786.             ifstr $(KeyRasMan) == $(KeyNull)
  2787.               Debug-Output "OEMNSVRA.INF: could not open RasMan key"
  2788.             else
  2789.               SetRegValue $(KeyRasMan) {Type, $(NoTitle), $(!REG_VT_DWORD), 32}
  2790.               CloseRegKey $(KeyRasMan)
  2791.             endif
  2792.             LoadLibrary "x" $(!STF_CWDDIR)rascfg.dll PORTSDLGHANDLE
  2793.             LibraryProcedure Result, $(PORTSDLGHANDLE), RenameRasHubToNdisWan
  2794.             Shell "" RenameRasHubToNdisWan
  2795.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2796.                 Debug-Output "OEMNSVRA.INF:error shelling RenameRasHubToNdisWan."
  2797.                 goto ShellCodeError
  2798.             endif
  2799.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2800.                 Debug-Output "OEMNSVRA.INF:error returned by RenameRasHubToNdisWan."
  2801.                 goto end
  2802.             endif
  2803.             Shell "" IsNdisWanBHAdapterInstalled
  2804.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2805.                Debug-Output "OEMNSVRA.INF:error shelling IsNdisWanBHAdapterInstalled"
  2806.                goto ShellCodeError
  2807.             endif
  2808.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2809.                 Shell "" InstallNdisWanBHAdapter
  2810.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2811.                    Debug-Output "OEMNSVRA.INF:error shelling InstallNdisWanBHAdapter"
  2812.                    goto ShellCodeError
  2813.                 endif
  2814.                 ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2815.                      set RegistryErrorIndex = $($R0)
  2816.                      Debug-Output "Error installing NdisWan Blood hound adapter"
  2817.                      goto fatalregistry
  2818.                 endif
  2819.             endif
  2820.             Shell "" InstallNdisTapiService
  2821.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2822.                  Debug-Output "Error shelling InstallNdisTapiService "
  2823.                  goto ShellCodeError
  2824.             endif
  2825.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2826.                  set RegistryErrorIndex = $($R0)
  2827.                  Debug-Output "Error installing NdisTapi Service"
  2828.                  goto fatalregistry
  2829.             endif
  2830.             Shell "" UpdateAsyncMacNetRules
  2831.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2832.                 Debug-Output "OEMNSVRA.INF:error shelling UpdateAsyncMacNetRules."
  2833.                 goto ShellCodeError
  2834.             endif
  2835.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2836.                 Debug-Output "OEMNSVRA.INF:error returned by UpdateAsyncMacNetRules."
  2837.                 goto end
  2838.             endif
  2839.             Shell "" UpdateNdisWanInfo
  2840.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2841.                 Debug-Output "OEMNSVRA.INF:error shelling UpdateNdisWanInfo."
  2842.                 goto ShellCodeError
  2843.             endif
  2844.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2845.                 Debug-Output "OEMNSVRA.INF:error returned by UpdateNdisWanInfo."
  2846.                 goto end
  2847.             endif
  2848.             Shell "" AddNDISWANToServiceGroupOrder
  2849.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2850.                Debug-Output "Cannot add NDISWAN to ServiceGroupOrder"
  2851.                goto ShellCodeError
  2852.             endif
  2853.             Shell "" UpdateAsyncMacParameters
  2854.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2855.                 Debug-Output "OEMNSVRA.INF:error shelling UpdateAsyncMacParameters."
  2856.                 goto ShellCodeError
  2857.             endif
  2858.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2859.                 Debug-Output "OEMNSVRA.INF:error returned by UpdateAsyncMacParameters."
  2860.                 goto end
  2861.             endif
  2862.             Shell "" UpdateAsyncMacStartType
  2863.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2864.                 Debug-Output "OEMNSVRA.INF:error shelling UpdateAsyncMacStartType."
  2865.                 goto ShellCodeError
  2866.             endif
  2867.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2868.                 Debug-Output "OEMNSVRA.INF:error returned by UpdateAsyncMacStartType."
  2869.                 goto end
  2870.             endif
  2871.             Shell "" UpgradeSelectedProtocols
  2872.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2873.                 Debug-Output "OEMNSVRA.INF:error shelling UpgradeSelectedProtocols."
  2874.                 goto ShellCodeError
  2875.             endif
  2876.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2877.                 Debug-Output "OEMNSVRA.INF:error returned by UpgradeSelectedProtocols."
  2878.                 goto end
  2879.             endif
  2880.             ifstr(i) $(!STF_STANDARDSERVERUPGRADE) == "YES"
  2881.                 OpenRegKey $(!REG_H_LOCAL) "" $(RasProtocolsKeyName) +
  2882.                                               $(!MAXIMUM_ALLOWED) KeyProtocols
  2883.                 ifstr $(KeyProtocols) != $(KeyNull)
  2884.                     set fDialin = FALSE
  2885.                     set TmpList = {}
  2886.                     GetRegValue $(KeyProtocols) "fNetbeuiAllowed" TmpList
  2887.                     ifint $(RegLastError) == 0
  2888.                         ifstr *($(TmpList), 4) == 1
  2889.                             set fDialin = TRUE
  2890.                         endif
  2891.                     endif
  2892.                     set TmpList = {}
  2893.                     ifstr(i) $(fDialin) == FALSE
  2894.                         GetRegValue $(KeyProtocols) "fTcpIpAllowed" TmpList
  2895.                         ifint $(RegLastError) == 0
  2896.                             ifstr *($(TmpList), 4) == 1
  2897.                                 set fDialin = TRUE
  2898.                             endif
  2899.                         endif
  2900.                     endif
  2901.                     set TmpList = {}
  2902.                     ifstr(i) $(fDialin) == FALSE
  2903.                         GetRegValue $(KeyProtocols) "fIpxAllowed" TmpList
  2904.                         ifint $(RegLastError) == 0
  2905.                             ifstr *($(TmpList), 4) == 1
  2906.                                 set fDialin = TRUE
  2907.                             endif
  2908.                         endif
  2909.                     endif
  2910.                     Debug-Output "OEMNSVRA.INF: Upgrade => Are dialin ports configured? "$(fDialin)
  2911.                     ifstr(i) $(fDialin) == TRUE
  2912.                         OpenRegKey $(!REG_H_LOCAL) "" $(RasSvrKeyName) +
  2913.                                                      $(!MAXIMUM_ALLOWED) KeySvr
  2914.                         ifstr $(KeySvr) != $(KeyNull)
  2915.                             set  RasStartValue = 2
  2916.                             GetRegValue $(KeySvr) "Start" StartList
  2917.                             ifint $(RegLastError) == 0
  2918.                                set RasStartValue = *($(StartList), 4)
  2919.                             endif
  2920.                             ifint $(RasStartValue) != 4
  2921.                                 Debug-Output "OEMNSVRA.INF: Changing RemoteAccess Start value to 2"
  2922.                                 SetRegValue $(KeySvr) {Start,$(NoTitle),$(!REG_VT_DWORD), 2}
  2923.                             endif
  2924.                             CloseRegKey $(KeySvr)
  2925.                         else
  2926.                             Debug-Output "OEMNSVRA.INF: error opening RemoteAccess service key"
  2927.                         endif
  2928.                     endif
  2929.                     CloseRegKey $(KeyProtocols)
  2930.                 else
  2931.                     Debug-Output "OEMNSVRA.INF: could not open RAS\Protocols key"
  2932.                 endif
  2933.                 OpenRegKey $(!REG_H_LOCAL) "" $(!NdisTapiKeyName)"\Parameters" $(!MAXIMUM_ALLOWED) ParamKey
  2934.                 Ifstr(i) $(ParamKey) != $(KeyNull)
  2935.                     SetRegValue $(ParamKey) {AsyncEventQueueSize, 0, $(!REG_VT_DWORD), 3072}
  2936.                     CloseRegKey $(ParamKey)
  2937.                 EndIf
  2938.             endif
  2939.             Shell "" UpgradeIpxInfo $(PORTSDLGHANDLE)
  2940.             Shell "" UpgradeIsdnInfo
  2941.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2942.                 Debug-Output "OEMNSVRA.INF:error shelling UpgradeIsdnInfo."
  2943.                 goto ShellCodeError
  2944.             endif
  2945.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2946.                 Debug-Output "OEMNSVRA.INF:error returned by UpgradeIsdnInfo."
  2947.                 set Error = $(UpgradeIsdnInfoError)
  2948.                 goto fatal
  2949.             endif
  2950.             Shell "" UpdatePerfmonInfo
  2951.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2952.                 Debug-Output "OEMNSVRA.INF:error shelling UpdatePerfmonInfo."
  2953.                 goto ShellCodeError
  2954.             endif
  2955.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2956.                 Debug-Output "OEMNSVRA.INF:error returned by UpdatePerfmonInfo."
  2957.                 goto end
  2958.             endif
  2959.             Shell "" UpdateCPList
  2960.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2961.                 Debug-Output "OEMNSVRA.INF:error shelling UpdateCPList."
  2962.                 goto ShellCodeError
  2963.             endif
  2964.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2965.                 Debug-Output "OEMNSVRA.INF:error returned by UpdateCPList."
  2966.                 goto end
  2967.             endif
  2968.             ifstr(i) $(!STF_PRODUCT) != "WINNT"
  2969.                 OpenRegKey $(!REG_H_LOCAL) "" $(!NdisTapiKeyName)"\Parameters" $(!MAXIMUM_ALLOWED) ParamKey
  2970.                 Ifstr(i) $(ParamKey) != $(KeyNull)
  2971.                     SetRegValue $(ParamKey) {AsyncEventQueueSize, 0, $(!REG_VT_DWORD), 3072}
  2972.                     CloseRegKey $(ParamKey)
  2973.                 EndIf
  2974.             EndIf
  2975.             Install RemoveRasGroup
  2976.             EndWait
  2977.             Ifint $(BillboardVisible) != 0
  2978.                 Shell "subroutn.inf" PopBillboard
  2979.                 Set BillboardVisible = 0
  2980.             Endif
  2981.         endif
  2982.         Shell "" UpdateSoftwareType
  2983.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2984.             Debug-Output "OEMNSVRA.INF:error shelling UpdateSoftwareType."
  2985.             goto ShellCodeError
  2986.         endif
  2987.         Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2988.             Debug-Output "OEMNSVRA.INF:error returned by UpdateSoftwareType."
  2989.             goto end
  2990.         endif
  2991.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMajorVersion)}
  2992.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMinorVersion)}
  2993.         SetRegValue $(KeyProduct) {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductRASDescription)}
  2994.         SetRegValue $(KeyProduct) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  2995.         CloseRegKey $(KeyProduct)
  2996.     else
  2997.         Set RegistryErrorIndex = $($R0)
  2998.         goto fatalregistry
  2999.     endif
  3000.     goto end
  3001. successful = +
  3002.     Ifstr(i) $(!NTN_InstallPhase) == primary
  3003.         goto installstep1
  3004.     else-ifstr(i) $(!NTN_InstallMode) == configure
  3005.         goto installstep1
  3006.     endif
  3007.     ifint $(NewNumDialin) != 0
  3008.        ifstr(i) $(!STF_GUI_UNATTENDED) != YES
  3009.             read-syms SuccessfulInstall$(!STF_LANGUAGE)
  3010.             shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "STATUS" $(Success)
  3011.        endif
  3012.     endif
  3013. installstep1 = +
  3014.     goto end
  3015. warning = +
  3016.     Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  3017.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3018.     goto ShellCodeError
  3019.     endif
  3020.     ifstr(i) $($R1) == "OK"
  3021.        goto $(to)
  3022.     else-ifstr(i) $($R1) == "CANCEL"
  3023.        goto $(from)
  3024.     else
  3025.        Debug-Msg "Error Error Bad DLGEVENT"
  3026.        goto "end"
  3027.     endif
  3028. nonfatal = +
  3029.     Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(Error)
  3030.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3031.         goto ShellCodeError
  3032.     endif
  3033.     ifstr(i) $($R1) == "OK"
  3034.         goto $(from)
  3035.     else
  3036.         goto "end"
  3037.     endif
  3038. fatalregistry = +
  3039.     Shell $(!UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  3040.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3041.        Debug-Output "fatalregistry: shell to find RegistryErrorString failed."
  3042.        goto ShellCodeError
  3043.     endif
  3044.     ifstr(i) $(RasSpecificString) != ""
  3045.         set Error = $($R0)" - service "$(RasSpecificString)"."
  3046.     else
  3047.         set Error = $($R0)
  3048.     endif
  3049.     read-syms AbortMessage$(!STF_LANGUAGE)
  3050.     set Error = $(Error)$(!LF)$(!LF)$(AbortText)
  3051.     goto fatal
  3052. fatal =    +
  3053.     Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  3054.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3055.         Debug-Output "fatal: shell to SetupMessage failed."
  3056.     goto ShellCodeError
  3057.     endif
  3058.     goto setfailed
  3059. ShellCodeError = +
  3060.     read-syms ShellCodeErrorMsg$(!STF_LANGUAGE)
  3061.     ui start "Error Message"
  3062.     goto setfailed
  3063. setfailed = +
  3064.     set CommonStatus = STATUS_FAILED
  3065.     ifstr(i) $(fRemoveRas) == TRUE
  3066.         set fRemoveRas = FALSE
  3067.         set from = setfailed
  3068.         set to   = end
  3069.         goto RemoveRas
  3070.     endif
  3071.     goto end
  3072. filecopycancel =+
  3073.     set CommonStatus = STATUS_USERCANCEL
  3074.     ifstr(i) $(fRemoveRas) == TRUE
  3075.         set fRemoveRas = FALSE
  3076.         set from = setfailed
  3077.         set to   = end
  3078.         goto RemoveRas
  3079.     endif
  3080. end = +
  3081.     ifstr(i) $(PORTSDLGHANDLE) != $(HandleNull)
  3082.         Debug-Output "Unloading RASCFG.DLL"
  3083.         FreeLibrary $(PORTSDLGHANDLE)
  3084.     endif
  3085.     Debug-Output "ending at last!!"
  3086.     goto term
  3087. term = +
  3088.     Debug-Output "OEMNSVRA.INF:term: CommonStatus "$(CommonStatus)
  3089.     Return $(CommonStatus)
  3090. [BindingsReview]
  3091.     set Option   = $($1)
  3092.     set SrcDir   = $($2)
  3093.     set AddCopy  = $($3)
  3094.     set DoCopy   = $($4)
  3095.     set DoConfig = $($5)
  3096.     set Language = $(!STF_LANGUAGE)
  3097.     set SaveInstallMode = $(!NTN_InstallMode)
  3098.     set !NTN_InstallMode = bind
  3099.     Shell "" InstallOption $(Language) $(Option) $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig)
  3100.     set !NTN_InstallMode = $(SaveInstallMode)
  3101.     set Status = $($R0)
  3102.     Return $(Status)
  3103. [SetRestoreConnectionTo1]
  3104.    Debug-Output "SetRestoreConnectionTo1 entry.."
  3105.    set KeyNull = ""
  3106.    set RestoreKeyName = "SYSTEM\CurrentControlSet\Control\networkprovider"
  3107.    OpenRegKey $(!REG_H_LOCAL) "" $(RestoreKeyName) $(!MAXIMUM_ALLOWED) KeyRestore
  3108.    Ifstr(i) $(KeyRestore) != $(KeyNull)
  3109.        SetRegValue $(KeyRestore) {RestoreConnection, 0, $(!REG_VT_DWORD), 1}
  3110.        CloseRegKey $(KeyRestore)
  3111.    else
  3112.        Debug-Output "SetRestoreConnectionTo1 error opening key. "$(RestoreKeyName)
  3113.    endif
  3114.    Debug-Output "SetRestoreConnectionTo1 exit."
  3115.    return
  3116. [InstallSoftwareAndService]
  3117.    set Status = STATUS_SUCCESSFUL
  3118.    set ThisOption = $($0)
  3119.    Debug-Output "InstallSoftwareAndService for "$(ThisOption)
  3120.    Shell $(!UtilityInf), AddSoftwareComponent, $(!Manufacturer), +
  3121.          $(!Product$(ThisOption)Name), $(!Product$(ThisOption)Name), +
  3122.          $(!Product$(ThisOption)DisplayName), +
  3123.          $(!RasInfName), $(!Product$(ThisOption)ImagePath), "autoserviceshare",+
  3124.          "", {}, "", $(!RasMsgDll), $(!RasEventTypeSupported)
  3125.    ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3126.        Debug-Output "InstallSoftware: AddSoftware bombed out for "$(ThisOption)
  3127.        goto InstallSoftwareError
  3128.    endif
  3129.    set RegistryErrorIndex = $($R0)
  3130.    Ifstr(i) $(RegistryErrorIndex) == SERVICE_ALREADY_EXISTS
  3131.        return $(Status)
  3132.    EndIf
  3133.    Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  3134.        CloseRegKey $($R1)
  3135.        CloseRegKey $($R2)
  3136.        CloseRegKey $($R3)
  3137.        CloseRegKey $($R4)
  3138.        CloseRegKey $($R5)
  3139.        goto InstallSoftwareError
  3140.    endif
  3141.    Set SoftProductKey    = $($R1)
  3142.    CloseRegKey $($R2)
  3143.    CloseRegKey $($R3)
  3144.    CloseRegKey $($R4)
  3145.    CloseRegKey $($R5)
  3146.    set NewValueList = +
  3147.        {{Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)},+
  3148.         {ServiceName,$(NoTitle),$(!REG_VT_SZ),+
  3149.          $(!Product$(ThisOption)Name)},+
  3150.         {SoftwareType,$(NoTitle),$(!REG_VT_SZ),+
  3151.          $(!Product$(ThisOption)SvcType)},+
  3152.         {Title,$(NoTitle),$(!REG_VT_SZ),$(!Product$(ThisOption)Title)},+
  3153.         {Description,$(NoTitle),$(!REG_VT_SZ),+
  3154.          $(!Product$(ThisOption)Description)},+
  3155.         {PathName,$(NoTitle),$(!REG_VT_SZ),+
  3156.          $(!Product$(ThisOption)ImagePath)},+
  3157.         {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMajorVersion)},+
  3158.         {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(!ProductMinorVersion)},+
  3159.         {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  3160.         {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(!HideComponent)}}
  3161.    Shell  $(!UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  3162.    ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3163.        Debug-Output "InstallSoftware: AddValueList bombed out for "$(ThisOption)
  3164.        goto InstallSoftwareError
  3165.    endif
  3166.    set RegistryErrorIndex = $($R0)
  3167.    CloseRegKey $(SoftProductKey)
  3168.    Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  3169.        goto InstallSoftwareError
  3170.    endif
  3171.    goto InstallSoftwareEnd
  3172. InstallSoftwareError =+
  3173.    read-syms ShellCodeErrorMsg$(!STF_LANGUAGE)
  3174.    ui start "Error Message"
  3175.    return STATUS_FAILED
  3176. InstallSoftwareEnd =+
  3177.    return $(Status)
  3178. [AddInfToReviewProgramsList]
  3179.     Debug-Output "AddInfToReviewPrograms: entry"
  3180.     set Status  = STATUS_FAILED
  3181.     set KeyNull = ""
  3182.     set NcpaKeyName = $(!NTN_SoftwareBase)"\Microsoft\Ncpa\CurrentVersion"
  3183.     set newList = {"OEMNSVRA.INF"}
  3184.     OpenRegKey $(!REG_H_LOCAL) "" $(NcpaKeyName) $(!MAXIMUM_ALLOWED) KeyNcpa
  3185.     Ifstr(i) $(KeyNcpa) != $(KeyNull)
  3186.         GetRegValue    $(KeyNcpa) "ReviewPrograms" TmpList
  3187.         ifint $(RegLastError) == 0
  3188.             Debug-Output "AddInf: old List "*($(TmpList), 4)
  3189.             ForListDo *($(TmpList),4)
  3190.                 ifstr(i) $($) != "OEMNSVRA.INF"
  3191.                     set newList = >($(newList), $($))
  3192.                 endif
  3193.             EndForListDo
  3194.             Debug-Output "OEMNSVRA.INF: AddInf: new List "$(newList)
  3195.             SetRegValue $(KeyNcpa) {ReviewPrograms, 0, +
  3196.                                     $(!REG_VT_MULTI_SZ),$(newList)}
  3197.             CloseRegKey $(KeyNcpa)
  3198.             Set Status = STATUS_SUCCESSFUL
  3199.         endif
  3200.     else
  3201.         Debug-Output "AddInfToReviewPrograms: error opening ncpa key."
  3202.     endif
  3203.     Debug-Output "AddInfToReviewPrograms: exit"
  3204.     return $(Status)
  3205. [RemoveInfFromReviewPrograms]
  3206.     Debug-Output "RemoveInfFromReviewPrograms: entry"
  3207.     set Status  = STATUS_FAILED
  3208.     set KeyNull = ""
  3209.     set NcpaKeyName = $(!NTN_SoftwareBase)"\Microsoft\Ncpa\CurrentVersion"
  3210.     set newList = {}
  3211.     OpenRegKey $(!REG_H_LOCAL) "" $(NcpaKeyName) $(!MAXIMUM_ALLOWED) KeyNcpa
  3212.     Ifstr(i) $(KeyNcpa) != $(KeyNull)
  3213.         GetRegValue    $(KeyNcpa) "ReviewPrograms" TmpList
  3214.         ifint $(RegLastError) == 0
  3215.             Debug-Output "RemoveInf: old List "*($(TmpList), 4)
  3216.             ForListDo *($(TmpList),4)
  3217.                 ifstr(i) $($) != "OEMNSVRA.INF"
  3218.                     set newList = >($(newList), $($))
  3219.                 endif
  3220.             EndForListDo
  3221.             Debug-Output "AddInf: new List "$(newList)
  3222.             SetRegValue $(KeyNcpa) {ReviewPrograms, 0, +
  3223.                                     $(!REG_VT_MULTI_SZ),$(newList)}
  3224.             CloseRegKey $(KeyNcpa)
  3225.             Set Status = STATUS_SUCCESSFUL
  3226.         endif
  3227.     else
  3228.         Debug-Output "RemoveInfFromReviewPrograms: error opening ncpa key."
  3229.     endif
  3230.     Debug-Output "RemoveInfFromReviewPrograms: exit"
  3231.     return $(Status)
  3232. [InstallResources]
  3233.     set STF_VITAL = NO    
  3234.     Debug-Output  "In Copying Files"
  3235.     ifstr(i) $(AddCopy) == "YES"
  3236.         CreateDir $(RasDir)
  3237.         AddSectionFilesToCopyList Files-Resource $(SourceDir) $(!STF_WINDOWSSYSPATH)
  3238.         AddSectionKeyFileToCopyList Files-Ras-Inf "rasico" $(SourceDir) $(ProductPath)
  3239.         AddSectionKeyFileToCopyList Files-Ras-Inf "rasread" $(SourceDir) $(ProductPath)
  3240.         ifstr(i) $(!NTN_InstallMode) == "Install"
  3241.             AddSectionKeyFileToCopyList Files-Ras-Inf "modem" $(SourceDir) $(ProductPath)
  3242.             AddSectionKeyFileToCopyList Files-Ras-Inf "pad" $(SourceDir) $(ProductPath)
  3243.             AddSectionKeyFileToCopyList Files-Ras-Inf "switch" $(SourceDir) $(ProductPath)
  3244.             AddSectionKeyFileToCopyList Files-Ras-Scp "cis" $(SourceDir) $(ProductPath)
  3245.             AddSectionKeyFileToCopyList Files-Ras-Scp "slip" $(SourceDir) $(ProductPath)
  3246.             AddSectionKeyFileToCopyList Files-Ras-Scp "slipmenu" $(SourceDir) $(ProductPath)
  3247.             AddSectionKeyFileToCopyList Files-Ras-Scp "pppmenu" $(SourceDir) $(ProductPath)
  3248.             AddSectionKeyFileToCopyList Files-Ras-Scp "scriptdoc" $(SourceDir) $(ProductPath)
  3249.         else-Ifstr(i) $(!NTN_InstallMode) == "Update"
  3250.             forlistdo {modem.new, pad.new, switch.new, cis.new, slip.new, slipmenu.new, pppmenu.new, script.doc}
  3251.                    LibraryProcedure Status, $(!LIBHANDLE), DelFile +
  3252.                                             $(!STF_WINDOWSSYSPATH)"\RAS\"$($)
  3253.             set STF_RENAME = "MODEM.NEW"
  3254.             AddSectionKeyFileToCopyList Files-Ras-Inf "modem" $(SourceDir) $(ProductPath)
  3255.             set STF_RENAME = "PAD.NEW"
  3256.             AddSectionKeyFileToCopyList Files-Ras-Inf "pad" $(SourceDir) $(ProductPath)
  3257.             set STF_RENAME = "SWITCH.NEW"
  3258.             AddSectionKeyFileToCopyList Files-Ras-Inf "switch" $(SourceDir) $(ProductPath)
  3259.             set STF_RENAME = "CIS.SCP"
  3260.             AddSectionKeyFileToCopyList Files-Ras-Scp "cis" $(SourceDir) $(ProductPath)
  3261.             set STF_RENAME = "SLIP.SCP"
  3262.             AddSectionKeyFileToCopyList Files-Ras-Scp "slip" $(SourceDir) $(ProductPath)
  3263.             set STF_RENAME = "SLIPMENU.SCP"
  3264.             AddSectionKeyFileToCopyList Files-Ras-Scp "slipmenu" $(SourceDir) $(ProductPath)
  3265.             set STF_RENAME = "PPPMENU.SCP"
  3266.             AddSectionKeyFileToCopyList Files-Ras-Scp "pppmenu" $(SourceDir) $(ProductPath)
  3267.             set STF_RENAME = "SCRIPT.DOC"
  3268.             AddSectionKeyFileToCopyList Files-Ras-Scp "scriptdoc" $(SourceDir) $(ProductPath)
  3269.             set STF_RENAME = ""
  3270.         endif
  3271.     endif
  3272.     ifstr(i) $(!NTN_InstallMode) == "Update"
  3273.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  3274.        CopyFilesInCopyList
  3275.     else-ifstr(i) $(DoCopy) == "YES"
  3276.         set !STF_NCPA_FLUSH_COPYLIST = TRUE
  3277.         CopyFilesInCopyList
  3278.     endif
  3279.     Debug-Output  "Done Copying Files"
  3280.     exit
  3281. [RemoveResources]
  3282.     Debug-Output "In removing infs and dll"
  3283.     set RemoveList = {}
  3284.     set RenameList = {}
  3285.     set RemoveList = >($(RemoveList), #(Files-RemoveList, MODEMINF, 1))
  3286.     set RemoveList = >($(RemoveList), #(Files-RemoveList, PADINF, 1))
  3287.     set RemoveList = >($(RemoveList), #(Files-RemoveList, SWITCHINF, 1))
  3288.     set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSETUPHLP, 1))
  3289.     set RenameList = >($(RenameList), #(Files-RemoveList, RASRESDLL, 1))
  3290.     set RenameList = >($(RenameList), #(Files-RemoveList, RASCFGDLL, 1))
  3291.     set RenameList = >($(RenameList), #(Files-RemoveList, RASFIL32DLL, 1))
  3292.     ForListDo $(RemoveList)
  3293.         Debug-Output "Removing "$($)
  3294.         LibraryProcedure Status , $(!LIBHANDLE), DelFile $($)
  3295.         Debug-Output "Status is "$(Status)
  3296.     EndForListDo
  3297.     ForListDo $(RenameList)
  3298.         Split-String $($) "\" FilePath
  3299.         QueryListSize PathLen $(FilePath)
  3300.         Split-String *($(FilePath),$(PathLen)) "." FullFileName
  3301.         Set FileName = *($(FullFileName),1)
  3302.         Debug-Output "FileName is "$(FileName)
  3303.         LibraryProcedure STATUS, $(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\"$(FileName)".old"
  3304.         Debug-Output "CheckFile Status = "$(STATUS)
  3305.         ifstr(i) $(STATUS) == YES
  3306.             LibraryProcedure STATUS, $(!LIBHANDLE), DelFile $(!STF_WINDOWSSYSPATH)"\"$(FileName)".old"
  3307.             Debug-Output "Delfile Status = "$(STATUS)
  3308.         endif
  3309.         Debug-Output "Renaming from "$($)
  3310.         Debug-Output "Renaming to "$(!STF_WINDOWSSYSPATH)"\"$(FileName)".old"
  3311.         LibraryProcedure Status1 , $(!LIBHANDLE), RenFile $($), $(!STF_WINDOWSSYSPATH)"\"$(FileName)".old"
  3312.         Debug-Output "Status is "$(Status1)
  3313.         AddFileToDeleteList $(!STF_WINDOWSSYSPATH)"\"$(FileName)".old"
  3314.     EndForListDo
  3315.     exit
  3316. [InstallRasFiles]
  3317.     set STF_VITAL = NO
  3318.     set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  3319.     Debug-Output  "In InstallRasFiles Copying Files"
  3320.     Debug-Output  "ServerInstalled "$(ServerInstalled)
  3321.     Debug-Output  "ClientInstalled "$(ClientInstalled)
  3322.     ifstr(i) $(DoAdmin) == TRUE
  3323.         AddSectionFilesToCopyList Files-Ras-Admin $(SourceDir) +
  3324.                   $(!STF_WINDOWSSYSPATH)
  3325.         ifstr(i) $(DoAdminOnly) == TRUE
  3326.             goto InstallRasFiles1
  3327.         endif
  3328.     endif
  3329.     ifstr(i) $(DoClient) == TRUE
  3330.         AddSectionFilesToCopyList Files-Ras-Client $(SourceDir) +
  3331.                  $(!STF_WINDOWSSYSPATH)
  3332.     endif
  3333.     ifstr(i) $(DoServer) == TRUE
  3334.         AddSectionFilesToCopyList Files-Ras-Server $(SourceDir) +
  3335.                  $(!STF_WINDOWSSYSPATH)
  3336.     endif
  3337.     ifstr(i) $(!NTN_InstallMode) == "Update"
  3338.         AddSectionFilesToCopyList Files-Ras-Common $(SourceDir) +
  3339.                      $(!STF_WINDOWSSYSPATH)
  3340.         AddSectionFilesToCopyList Files-Ras-Drivers $(SourceDir) +
  3341.                      $(!STF_WINDOWSSYSPATH)\drivers
  3342.     else
  3343.         ifstr(i) $(ServerInstalled) == FALSE
  3344.             ifstr(i) $(ClientInstalled) == FALSE
  3345.                 AddSectionFilesToCopyList Files-Ras-Common $(SourceDir) +
  3346.                              $(!STF_WINDOWSSYSPATH)
  3347.                 AddSectionFilesToCopyList Files-Ras-Drivers $(SourceDir) +
  3348.                              $(!STF_WINDOWSSYSPATH)\drivers
  3349.             endif
  3350.         endif
  3351.     endif
  3352. InstallRasFiles1 = +
  3353.     ifstr(i) $(!NTN_InstallMode) == "Update"
  3354.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  3355.        CopyFilesInCopyList
  3356.     else
  3357.        ifstr(i) $(DoCopy) == "YES"
  3358.           set !STF_NCPA_FLUSH_COPYLIST = TRUE
  3359.           CopyFilesInCopyList
  3360.        endif
  3361.     endif
  3362.     Debug-Output  "Done Copying Files"
  3363.     exit
  3364. [RemoveRasFiles]
  3365.     ifstr(i) $(!NTN_InstallMode) == install
  3366.         ifstr(i) $(DoCopy) == "NO"
  3367.            Exit
  3368.         endif
  3369.     endif
  3370.     set RemoveList = {}
  3371.     set RenameList = {}
  3372.     set fCommonRemoved = FALSE
  3373.     ifstr(i) $(DoServer) == TRUE
  3374.        set fCommonRemoved = TRUE
  3375.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASGTWYDLL, 1))
  3376.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASGPRXYDLL, 1))
  3377.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSPRXYEXE, 1))
  3378.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSRVEXE, 1))
  3379.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCTRSDLL, 1))
  3380.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCTRSINI, 1))
  3381.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCTRNMH, 1))
  3382.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSAUTHDLL, 1))
  3383.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASADMINDLL, 1))
  3384.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMANDLL, 1))
  3385.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMANEXE, 1))
  3386.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMSGDLL, 1))
  3387.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMXSDLL, 1))
  3388.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSERDLL, 1))
  3389.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASIPXCPDLL, 1))
  3390.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPPPDLL, 1))
  3391.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPPPENDLL, 1))
  3392.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPAPDLL, 1))
  3393.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCHAPDLL, 1))
  3394.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSPAPDLL, 1))
  3395.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASIPCPDLL, 1))
  3396.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASIPHLPDLL, 1))
  3397.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASNBFCPDLL, 1))
  3398.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCCPDLL, 1))
  3399.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCBCPDLL, 1))
  3400.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASNBIPCDLL, 1))
  3401.        set RenameList = >($(RenameList), #(Files-RemoveList, ASYNCMACSYS, 1))
  3402.        set RenameList = >($(RenameList), #(Files-RemoveList, NDISWANSYS, 1))
  3403.     endif
  3404.     ifstr(i) $(DoClient) == TRUE
  3405.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASDIALEXE, 1))
  3406.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPHONEHLP, 1))
  3407.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCAUTHDLL, 1))
  3408.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASAPI32DLL, 1))
  3409.        ifstr(i) $(fCommonRemoved) == FALSE
  3410.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMANDLL, 1))
  3411.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMANEXE, 1))
  3412.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMSGDLL, 1))
  3413.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMXSDLL, 1))
  3414.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSERDLL, 1))
  3415.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASIPXCPDLL, 1))
  3416.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPPPDLL, 1))
  3417.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPPPENDLL, 1))
  3418.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPAPDLL, 1))
  3419.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCHAPDLL, 1))
  3420.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSPAPDLL, 1))
  3421.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASIPCPDLL, 1))
  3422.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASIPHLPDLL, 1))
  3423.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASNBFCPDLL, 1))
  3424.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCCPDLL, 1))
  3425.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCBCPDLL, 1))
  3426.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASNBIPCDLL, 1))
  3427.            set RenameList = >($(RenameList), #(Files-RemoveList, ASYNCMACSYS, 1))
  3428.        set RenameList = >($(RenameList), #(Files-RemoveList, NDISWANSYS, 1))
  3429.        endif
  3430.     endif
  3431.     ifstr(i) $(DoAdmin) == TRUE
  3432.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASADMINHLP, 1))
  3433.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASGLOSSHLP, 1))
  3434.     endif
  3435.     ForListDo $(RemoveList)
  3436.         Debug-Output "Removing "$($)
  3437.         LibraryProcedure Status , $(!LIBHANDLE), DelFile $($)
  3438.         Debug-Output "Status is "$(Status)
  3439.     EndForListDo
  3440.     ForListDo $(RenameList)
  3441.         Split-String $($) "\" FilePath
  3442.         QueryListSize PathLen $(FilePath)
  3443.         Split-String *($(FilePath),$(PathLen)) "." FullFileName
  3444.         Set FileName = *($(FullFileName),1)
  3445.         Debug-Output "FileName is "$(FileName)
  3446.         LibraryProcedure STATUS, $(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  3447.         Debug-Output "CheckFile Status = "$(STATUS)
  3448.         ifstr(i) $(STATUS) == YES
  3449.             LibraryProcedure STATUS, $(!LIBHANDLE), DelFile $(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  3450.             Debug-Output "Delfile Status = "$(STATUS)
  3451.         endif
  3452.         Debug-Output "Renaming from "$($)
  3453.         Debug-Output "Renaming to "$(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  3454.         LibraryProcedure Status1 , $(!LIBHANDLE), RenFile $($), $(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  3455.         Debug-Output "Status is "$(Status1)
  3456.         AddFileToDeleteList $(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  3457.     EndForListDo
  3458.     exit
  3459. [RemoveRasGroup]
  3460.     Debug-Output "Removing icons from "$(RasGroup)
  3461.     CreateCommonProgManGroup $(RasGroup) ""
  3462.     RemoveCommonProgManGroup $(RasGroup)
  3463.     exit
  3464. [AddNDISWANToServiceGroupOrder]
  3465.     set GroupOrderName = "SYSTEM\CurrentControlSet\Control\ServiceGroupOrder"
  3466.     OpenRegKey $(!REG_H_LOCAL) "" $(GroupOrderName) $(!MAXIMUM_ALLOWED) KeyGroup
  3467.     set OldList = {}
  3468.     Ifstr(i) $(KeyGroup) != $(KeyNull)
  3469.         GetRegValue  $(KeyGroup) "List" TmpList
  3470.         ifint $(RegLastError) == 0
  3471.             ForListDo *($(TmpList), 4)
  3472.                 set OldList = >($(OldList), $($))
  3473.             EndForListDo
  3474.         endif
  3475.         Debug-Output "AddNDISWANToServiceGroupOrder current list "$(OldList)
  3476.         Ifcontains(i) "NDISWAN" not-in $(OldList)
  3477.             set NewGroupList = {}
  3478.             ForListDo $(OldList)
  3479.                 set NewGroupList = >($(NewGroupList), $($))
  3480.                 ifstr(i) $($) == "NDIS"
  3481.                     set NewGroupList = >($(NewGroupList), "NDISWAN" )
  3482.                 endif
  3483.             EndForListDo
  3484.             Debug-Output "AddNDISWANToServiceGroupOrder new list "$(NewGroupList)
  3485.             SetRegValue $(KeyGroup) {List, 0,$(!REG_VT_MULTI_SZ),$(NewGroupList)}
  3486.         endif
  3487.         CloseRegKey $(KeyGroup)
  3488.     else
  3489.         Debug-Output "AddNDISWANToServiceGroupOrder error opening ServiceGroupOrder key."
  3490.     endif
  3491.     return
  3492. [CheckRasInstalled]
  3493.     set MAXIMUM_ALLOWED   = 33554432
  3494.     set ProductKeyName = $(!NTN_SoftwareBase)"\Microsoft\RAS\CurrentVersion"
  3495.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  3496.     Ifstr $(KeyProduct) != ""
  3497.         CloseRegKey $(KeyProduct)
  3498.         return "TRUE"
  3499.     else
  3500.         return "FALSE"
  3501. [QueryComponentsInstalled]
  3502.     Set Status            =    STATUS_FAILED
  3503.     Set ValueName         =    ""
  3504.     Set InstalledList     =    {}
  3505.     Set InstalledFlags    =    {}
  3506.     Set TmpList           =    {}
  3507.     Set KeyNull           =    ""
  3508.     Set NumberOfComps     =    0
  3509.     Set RasKeyName        =    $($0)
  3510.     Debug-Output "QueryComponentsInstalled: "$(RasKeyName)
  3511.     OpenRegKey $(!REG_H_LOCAL) "" $(RasKeyName) $(!MAXIMUM_ALLOWED) KeyProduct
  3512.     Ifstr(i) $(KeyProduct) != $(KeyNull)
  3513.         GetRegValue    $(KeyProduct) "RasComponents" TmpList
  3514.         Debug-Output "QueryComponentsInstalled: "$(TmpList)
  3515.         ForListDo *($(TmpList),4)
  3516.             set InstalledList = >($(InstalledList), $($))
  3517.         EndForListDo
  3518.         CloseRegKey $(KeyProduct)
  3519.         Ifcontains(i) "Server" in $(InstalledList)
  3520.             Set InstalledFlags = >($(InstalledFlags), TRUE)
  3521.         else
  3522.             Set InstalledFlags = >($(InstalledFlags), FALSE)
  3523.         endif
  3524.         Ifcontains(i) "Client" in $(InstalledList)
  3525.             Set InstalledFlags = >($(InstalledFlags), TRUE)
  3526.         else
  3527.             Set InstalledFlags = >($(InstalledFlags), FALSE)
  3528.         endif
  3529.         Ifcontains(i) "Admin" in $(InstalledList)
  3530.             Set InstalledFlags = >($(InstalledFlags), TRUE)
  3531.         else
  3532.             Set InstalledFlags = >($(InstalledFlags), FALSE)
  3533.         endif
  3534.         QueryListSize NumberOfComps $(InstalledList)
  3535.         ifint $(NumberOfComps) == 1
  3536.             Ifcontains(i) "Server" in $(InstalledList)
  3537.                 Set InstalledFlags = >($(InstalledFlags), TRUE)
  3538.             else
  3539.                 Set InstalledFlags = >($(InstalledFlags), FALSE)
  3540.             endif
  3541.             Ifcontains(i) "Client" in $(InstalledList)
  3542.                 Set InstalledFlags = >($(InstalledFlags), TRUE)
  3543.             else
  3544.                 Set InstalledFlags = >($(InstalledFlags), FALSE)
  3545.             endif
  3546.             Ifcontains(i) "Admin" in $(InstalledList)
  3547.                 Set InstalledFlags = >($(InstalledFlags), TRUE)
  3548.             else
  3549.                 Set InstalledFlags = >($(InstalledFlags), FALSE)
  3550.             endif
  3551.         else
  3552.             Set InstalledFlags = >($(InstalledFlags), FALSE)
  3553.             Set InstalledFlags = >($(InstalledFlags), FALSE)
  3554.             Set InstalledFlags = >($(InstalledFlags), FALSE)
  3555.         endif
  3556.         Set Status = STATUS_SUCCESSFUL
  3557.     Else
  3558.        Set Status = STATUS_NOT_FOUND
  3559.     EndIf
  3560.     Debug-Output "QueryComponentsInstalled: "$(InstalledList)
  3561.     Return $(Status) $(InstalledList) $(InstalledFlags)
  3562. [UpdateComponentsInstalled]
  3563.     Set Status          =    STATUS_FAILED
  3564.     Set InstalledList   =    $($0)
  3565.     Set RasKeyName      =    $($1)
  3566.     Set KeyNull         =    ""
  3567.     Debug-Output "UpdateComponentsInstalled: "$(RasKeyName)
  3568.     OpenRegKey $(!REG_H_LOCAL) "" $(RasKeyName) $(!MAXIMUM_ALLOWED) KeyProduct
  3569.     Ifstr(i) $(KeyProduct) != $(KeyNull)
  3570.         SetRegValue $(KeyProduct) {RasComponents, 0,$(!REG_VT_MULTI_SZ),$(InstalledList)}
  3571.         CloseRegKey $(KeyProduct)
  3572.         Set Status = STATUS_SUCCESSFUL
  3573.     else
  3574.         Set Status = STATUS_FAILED
  3575.     endif
  3576.     return $(Status)
  3577. [GetNetworkAccess]
  3578.     set Status          = STATUS_SUCCESSFUL
  3579.     Set KeyNull         = ""
  3580.     set NbfNetAccess   = 0
  3581.     set TcpIpNetAccess = 0
  3582.     set IpxNetAccess   = 0
  3583.     set RasProtocolsKeyName = $(!NTN_SoftwareBase)"\Microsoft\RAS\PROTOCOLS"
  3584.     Debug-Output "GetNetworkAccess entry"
  3585.     set ProtocolKeyName = $(RasProtocolsKeyName)"\NBF"
  3586.     OpenRegKey $(!REG_H_LOCAL) "" $(ProtocolKeyName) $(!MAXIMUM_ALLOWED) KeyProtocol
  3587.     Ifstr(i) $(KeyProtocol) != $(KeyNull)
  3588.        GetRegValue $(KeyProtocol), "NetBiosGatewayEnabled" NetworkAccess
  3589.        ifint $(RegLastError) == 0
  3590.            set NbfNetAccess = *($(NetworkAccess), 4)
  3591.        endif
  3592.        CloseRegKey $(KeyProtocol)
  3593.     else
  3594.        Debug-Output "GetNetworkAccess:error opening key "$(ProtocolKeyName)
  3595.     endif
  3596.     set ProtocolKeyName = $(RasProtocolsKeyName)"\IP"
  3597.     OpenRegKey $(!REG_H_LOCAL) "" $(ProtocolKeyName) $(!MAXIMUM_ALLOWED) KeyProtocol
  3598.     Ifstr(i) $(KeyProtocol) != $(KeyNull)
  3599.        GetRegValue $(KeyProtocol), "AllowNetworkAccess" NetworkAccess
  3600.        ifint $(RegLastError) == 0
  3601.            set TcpIpNetAccess = *($(NetworkAccess), 4)
  3602.        endif
  3603.        CloseRegKey $(KeyProtocol)
  3604.     else
  3605.        Debug-Output "GetNetworkAccess:error opening key "$(ProtocolKeyName)
  3606.     endif
  3607.     set ProtocolKeyName = $(RasProtocolsKeyName)"\IPX"
  3608.     OpenRegKey $(!REG_H_LOCAL) "" $(ProtocolKeyName) $(!MAXIMUM_ALLOWED) KeyProtocol
  3609.     Ifstr(i) $(KeyProtocol) != $(KeyNull)
  3610.        GetRegValue $(KeyProtocol), "AllowNetworkAccess" NetworkAccess
  3611.        ifint $(RegLastError) == 0
  3612.            set IpxNetAccess = *($(NetworkAccess), 4)
  3613.        endif
  3614.        CloseRegKey $(KeyProtocol)
  3615.     else
  3616.        Debug-Output "GetNetworkAccess:error opening key "$(ProtocolKeyName)
  3617.     endif
  3618.     Debug-Output "GetNetworkAccess exit"
  3619.     return $(Status) $(NbfNetAccess) $(TcpIpNetAccess) $(IpxNetAccess)
  3620. [IsNdisWanBHAdapterInstalled]
  3621.     set Status      = STATUS_FAILED
  3622.     Set KeyNull     = ""
  3623.     Debug-Output "IsNdisWanBHAdapterInstalled entry"
  3624.     set NetworkCardKey = $(KeyNull)
  3625.     OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) NetworkCardKey
  3626.     Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  3627.         set NetcardsList = {}
  3628.         EnumRegKey $(NetworkCardKey) NetcardsList
  3629.         Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  3630.            Debug-Output "IsNdisWanBHAdapterInstalled: EnumRegKey failed."
  3631.            goto IsNdisWanBHAdapterInstalledEnd
  3632.         endif
  3633.         ForListDo $(NetcardsList)
  3634.            set KeyName = *($($),1)
  3635.            set Card = $(KeyNull)
  3636.            OpenRegKey $(NetworkCardKey) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  3637.            ifstr $(Card) == $(KeyNull)
  3638.                Debug-Output "IsNdisWanBHAdapterInstalled: could not open netcard key "$(KeyName)
  3639.            else
  3640.                GetRegValue $(Card), "ProductName" ProductNameInfo
  3641.                Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  3642.                   Debug-Output "IsNdisWanBHAdapterInstalled: ProductName not found."
  3643.                else
  3644.                   set CardProductName = *($(ProductNameInfo), 4)
  3645.                   Debug-Output "IsNdisWanBHAdapterInstalled: ProductName. "$(CardProductName)
  3646.                   ifstr(i) $(CardProductName) == $(!ProductNDISWANName)
  3647.                        set Status = STATUS_SUCCESSFUL
  3648.                        CloseRegKey $(Card)
  3649.                        goto IsNdisWanBHAdapterInstalledEnd
  3650.                   endif
  3651.                endif
  3652.                CloseRegKey $(Card)
  3653.            endif
  3654.         EndForListDo
  3655.     else
  3656.         Debug-Output "IsNdisWanBHAdapterInstalled: failed to open "$(!NetworkCardKeyName)
  3657.     endif
  3658. IsNdisWanBHAdapterInstalledEnd =+
  3659.     ifstr(i) $(NetworkCardKey) != $(KeyNull)
  3660.         CloseRegKey $(NetworkCardKey)
  3661.     endif
  3662.     Debug-Output "IsNdisWanBHAdapterInstalled exit"
  3663.     Return $(Status)
  3664. [InstallNdisWanBHAdapter]
  3665.     set Status = STATUS_FAILED
  3666.     set ThisOption = NDISWAN
  3667.     Debug-Output "InstallNdisWanBHAdapter entry"
  3668.     Shell "utility.inf", AddHardwareComponent, +
  3669.           $(!Product$(ThisOption)Name),$(!RasInfName),+
  3670.           $(!Product$(ThisOption)KeyName)
  3671.     ifint $($R4) != -1
  3672.         Set !NETCARD_LIST = >($(!NETCARD_LIST), +
  3673.                              {$(!Product$(ThisOption)Name),+
  3674.                              $(!NetworkCardKeyName)"\"$($R4)})
  3675.     endif
  3676.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3677.        Debug-Output "InstallNdisWanBHAdapter:Shell error"
  3678.        goto InstallNdisWanBHAdapterEnd
  3679.     endif
  3680.     set RegistryErrorIndex = $($R0)
  3681.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  3682.         Debug-Output "InstallNdisWanBHAdapter:Registry error: add hardware component"
  3683.         CloseRegKey $($R1)
  3684.         CloseRegKey $($R2)
  3685.         CloseRegKey $($R3)
  3686.         goto InstallNdisWanBHAdapterEnd
  3687.     endif
  3688.     set KeyNetcard    = $($R1)
  3689.     set KeyParameters = $($R3)
  3690.     set KeyAdapterRules = $($R2)
  3691.     set AdapterNumber = $($R4)
  3692.     set NewValueList = +
  3693.         {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(!Manufacturer)},+
  3694.          {Title,$(NoTitle),$(!REG_VT_SZ),+
  3695.           "["$($R4)"] "$(!Product$(ThisOption)Title)},+
  3696.          {Description,$(NoTitle),$(!REG_VT_SZ),+
  3697.           $(!Product$(ThisOption)Description)},+
  3698.          {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  3699.           $(!Product$(ThisOption)Name)},+
  3700.          {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  3701.          {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  3702.          {Hidden,$(NoTitle),$(!REG_VT_DWORD),1}}
  3703.     Shell  "utility.inf", AddValueList, $(KeyNetcard), $(NewValueList)
  3704.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3705.         Debug-Output "InstallNdisWanBHAdapter: ShellCode error"
  3706.         goto InstallNdisWanBHAdapterEnd
  3707.     endif
  3708.     CloseRegKey $(KeyNetcard)
  3709.     set TempProdName = """"$(!Product$(ThisOption)Name)$(AdapterNumber)""""
  3710.     set TempBindForm = $(TempProdName)$(!NetRuleHardwareBHBindForm)
  3711.     set NewValueList = +
  3712.         {{type,$(NoTitle),$(!REG_VT_SZ),+
  3713.           $(!NetRuleHardwareBHType)},+
  3714.          {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  3715.          {class,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  3716.           $(!NetRuleHardwareBHClass)}, +
  3717.          {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  3718.          {Infname ,$(NoTitle),$(!REG_VT_SZ),$(!RasInfName)}}
  3719.     Shell  "utility.inf", AddValueList, $(KeyAdapterRules), $(NewValueList)
  3720.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3721.         Debug-Output "InstallNdisWanBHAdapter: ShellCode error"
  3722.         goto InstallNdisWanBHAdapterEnd
  3723.     endif
  3724.     set RegistryErrorIndex = $($R0)
  3725.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  3726.         Debug-Output "InstallNdisWanBHAdapter:Registry error: add hardware component"
  3727.         CloseRegKey $(KeyParameters)
  3728.         CloseRegKey $(KeyAdapterRules)
  3729.         goto InstallNdisWanBHAdapterEnd
  3730.     endif
  3731.     CloseRegKey $(KeyAdapterRules)
  3732.     CloseRegKey $(KeyParameters)
  3733.     set Status = STATUS_SUCCESSFUL
  3734. InstallNdisWanBHAdapterEnd =+
  3735.     Debug-Output "InstallNdisWanBHAdapter exit"
  3736.     return $(Status)
  3737. [InstallRasArpService]
  3738.     set Status = STATUS_SUCCESSFUL
  3739.     set KeyNull = ""
  3740.     Debug-Output "InstallRasArpService entry"
  3741.     OpenRegKey $(!REG_H_LOCAL) "" $(!RasArpKeyName) $(!MAXIMUM_ALLOWED) KeyService
  3742.     Ifstr(i) $(KeyService) == $(KeyNull)
  3743.         Shell "utility.inf", CreateService, $(!ProductRASARPName), +
  3744.             $(!ProductRASARPDisplayName), +
  3745.             $(!ProductRASARPImagePath), +
  3746.             "kernelautostart", "PNP_TDI", {"TCPIP"}, ""
  3747.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3748.             Debug-Output "OEMNSVRA.INF: InstallRasArpService : ShellCode error"
  3749.             return STATUS_FAILED
  3750.         endif
  3751.         set RegistryErrorIndex = $($R0)
  3752.         CloseRegKey $($R1)
  3753.         CloseRegKey $($R2)
  3754.         CloseRegKey $($R3)
  3755.         Ifstr(i) $(RegistryErrorIndex) == SERVICE_ALREADY_EXISTS
  3756.            return $(Status)
  3757.         EndIf
  3758.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  3759.             Debug-Output "OEMNSVRA.INF: InstallRasArpService: Registry error create service"
  3760.             return STATUS_FAILED
  3761.         endif
  3762.     endif
  3763.     Ifstr(i) $(KeyService) != $(KeyNull)
  3764.         CloseRegKey $(KeyService)
  3765.     endif
  3766.     Debug-Output "InstallRasArpService exit"
  3767.     return $(Status)
  3768. [RemoveRasArpService]
  3769.     set Status = STATUS_SUCCESSFUL
  3770.     set KeyNull = ""
  3771.     Debug-Output "RemoveRasArpService entry"
  3772.     OpenRegKey $(!REG_H_LOCAL) "" $(!RasArpKeyName) $(!MAXIMUM_ALLOWED) KeyService
  3773.     Ifstr(i) $(KeyService) != $(KeyNull)
  3774.         Shell "utility.inf", RemoveService $(!ProductRASARPName) "YES"
  3775.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3776.             Debug-Output "OEMNSVRA.INF: RemoveRasArpService : ShellCode error"
  3777.             return STATUS_FAILED
  3778.         endif
  3779.         set RegistryErrorIndex = $($R0)
  3780.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  3781.             Debug-Output "OEMNSVRA.INF: RemoveRasArpService: Registry error: "
  3782.             return STATUS_FAILED
  3783.         endif
  3784.         CloseRegKey $(KeyService)
  3785.     endif
  3786.     Debug-Output "RemoveRasArpService exit"
  3787.     return $(Status)
  3788. [InstallRasAcdService]
  3789.     set Status = STATUS_SUCCESSFUL
  3790.     set KeyNull = ""
  3791.     Debug-Output "InstallRasAcdService entry"
  3792.     OpenRegKey $(!REG_H_LOCAL) "" $(!RasAcdKeyName) $(!MAXIMUM_ALLOWED) KeyService
  3793.     Ifstr(i) $(KeyService) == $(KeyNull)
  3794.         Shell "utility.inf", CreateService, $(!ProductRASACDName), +
  3795.             $(!ProductRASACDDisplayName), +
  3796.             $(!ProductRASACDImagePath), +
  3797.             "kernelautostart", "Streams Drivers", {}, ""
  3798.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3799.             Debug-Output "OEMNSVRA.INF: InstallRasArpService : ShellCode error"
  3800.             return STATUS_FAILED
  3801.         endif
  3802.         set RegistryErrorIndex = $($R0)
  3803.         CloseRegKey $($R1)
  3804.         CloseRegKey $($R2)
  3805.         CloseRegKey $($R3)
  3806.         Ifstr(i) $(RegistryErrorIndex) == SERVICE_ALREADY_EXISTS
  3807.            return $(Status)
  3808.         EndIf
  3809.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  3810.             Debug-Output "OEMNSVRA.INF: InstallRasAcdService: Registry error create service"
  3811.             return STATUS_FAILED
  3812.         endif
  3813.     endif
  3814.     Debug-Output "InstallRasArpService exit"
  3815.     return $(Status)
  3816. [RemoveRasAcdService]
  3817.     set Status = STATUS_SUCCESSFUL
  3818.     set KeyNull = ""
  3819.     Debug-Output "RemoveRasAcdService entry"
  3820.     OpenRegKey $(!REG_H_LOCAL) "" $(!RasAcdKeyName) $(!MAXIMUM_ALLOWED) KeyService
  3821.     Ifstr(i) $(KeyService) != $(KeyNull)
  3822.         Shell "utility.inf", RemoveService $(!ProductRASACDName) "YES"
  3823.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3824.             Debug-Output "OEMNSVRA.INF: RemoveRasAcdService : ShellCode error"
  3825.             return STATUS_FAILED
  3826.         endif
  3827.         set RegistryErrorIndex = $($R0)
  3828.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  3829.             Debug-Output "OEMNSVRA.INF: RemoveRasAcdService: Registry error: "
  3830.             return STATUS_FAILED
  3831.         endif
  3832.         CloseRegKey $(KeyService)
  3833.     endif
  3834.     Debug-Output "RemoveRasAcdService exit"
  3835.     return $(Status)
  3836. [InstallNdisTapiService]
  3837.     set Status = STATUS_SUCCESSFUL
  3838.     set KeyNull = ""
  3839.     Debug-Output "InstallNdisTapiService entry"
  3840.     OpenRegKey $(!REG_H_LOCAL) "" $(!NdisTapiKeyName) $(!MAXIMUM_ALLOWED) KeyService
  3841.     Ifstr(i) $(KeyService) == $(KeyNull)
  3842.         Shell "utility.inf", CreateService, $(!ProductNDISTAPIName), +
  3843.             $(!ProductNDISTAPIDisplayName), +
  3844.             $(!ProductNDISTAPIImagePath), +
  3845.             "kernelauto", "NDIS", {}, ""
  3846.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3847.             Debug-Output "OEMNSVRA.INF: InstallNdisTapiService : ShellCode error"
  3848.             return STATUS_FAILED
  3849.         endif
  3850.         set RegistryErrorIndex = $($R0)
  3851.         set ParamKey = $($R2)
  3852.         CloseRegKey $($R1)
  3853.         CloseRegKey $($R3)
  3854.         Ifstr(i) $(RegistryErrorIndex) == SERVICE_ALREADY_EXISTS
  3855.            return $(Status)
  3856.         EndIf
  3857.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  3858.             Debug-Output "OEMNSVRA.INF: InstallNdisTapiService: Registry error create service"
  3859.             return STATUS_FAILED
  3860.         endif
  3861.         ifstr(i) $(!STF_PRODUCT) != "WINNT"
  3862.             SetRegValue $(ParamKey) {AsyncEventQueueSize, 0, $(!REG_VT_DWORD), 3072}
  3863.         else
  3864.             SetRegValue $(ParamKey) {AsyncEventQueueSize, 0, $(!REG_VT_DWORD), 768}
  3865.         endif
  3866.         CloseRegKey $(ParamKey)
  3867.     endif
  3868.     Ifstr(i) $(KeyService) != $(KeyNull)
  3869.         CloseRegKey $(KeyService)
  3870.     endif
  3871.     Debug-Output "InstallNdisTapiService exit"
  3872.     return $(Status)
  3873. [RemoveNdisTapiService]
  3874.     set Status = STATUS_SUCCESSFUL
  3875.     set KeyNull = ""
  3876.     Debug-Output "RemoveNdisTapiService entry"
  3877.     OpenRegKey $(!REG_H_LOCAL) "" $(!NdisTapiKeyName) $(!MAXIMUM_ALLOWED) KeyService
  3878.     Ifstr(i) $(KeyService) != $(KeyNull)
  3879.         Shell "utility.inf", RemoveService $(!ProductNDISTAPIName) "YES"
  3880.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3881.             Debug-Output "OEMNSVRA.INF: RemoveNdisTapiService : ShellCode error"
  3882.             return STATUS_FAILED
  3883.         endif
  3884.         set RegistryErrorIndex = $($R0)
  3885.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  3886.             Debug-Output "OEMNSVRA.INF: RemoveNdisTapiService: Registry error: "
  3887.             return STATUS_FAILED
  3888.         endif
  3889.         CloseRegKey $(KeyService)
  3890.     endif
  3891.     Debug-Output "RemoveNdisTapiService exit"
  3892.     return $(Status)
  3893. [InstallNwlnkRipService]
  3894.     Debug-Output "InstallNwlnkRipService entry"
  3895.     set Status  = STATUS_FAILED
  3896.     set KeyNull = ""
  3897.     Set SrcDir  = $(!STF_SRCDIR)
  3898.     ifstr(i) $(!NTN_InstallMode) == "install"
  3899.        set !STF_SRCDIR_OVERRIDE = $(SrcDir)
  3900.     endif
  3901.     set AddCopy  = YES
  3902.     set DoCopy   = YES
  3903.     set DoConfig = YES
  3904.     set SaveNTN_InstallMode = $(!NTN_InstallMode)
  3905.     set !NTN_InstallMode = install
  3906.     Shell "oemnsvrr.inf" InstallOption $(!STF_LANGUAGE) "NWLNKRIP"  +
  3907.           $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig) "RAS"
  3908.     set !NTN_InstallMode = $(SaveNTN_InstallMode)
  3909.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3910.         Debug-Output "Error installing NWLNKRIP service"
  3911.         Goto InstallNwlnkRipServiceEnd
  3912.     Endif
  3913.     Set InstallStatus = $($R0)
  3914.     Ifstr(i) $(InstallStatus) != STATUS_SUCCESSFUL
  3915.         Ifstr(i) $(InstallStatus) != STATUS_USERCANCEL
  3916.             Debug-Output "InstallNwlnkRipService returned "$(InstallStatus)
  3917.             Goto InstallNwlnkRipServiceEnd
  3918.         Endif
  3919.     Endif
  3920.     OpenRegKey $(!REG_H_LOCAL) "" $(!RasIsnRipKeyName) $(!MAXIMUM_ALLOWED) KeyService
  3921.     ifstr $(KeyService) != ""
  3922.         OpenRegKey $(KeyService) "" "Parameters" $(!MAXIMUM_ALLOWED) KeyParams
  3923.         ifstr(i) $(KeyParams) != ""
  3924.             GetRegValue $(KeyParams),"NetbiosRouting", NetbiosRoutingInfo
  3925.             Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  3926.                set NetbiosRouting = *($(NetbiosRoutingInfo), 4)
  3927.             else
  3928.                set NetbiosRouting = 2
  3929.             endif
  3930.             ifint $(NetbiosRouting) == 0
  3931.                set NetbiosRouting = 2
  3932.             else-ifint $(NetbiosRouting) == 1
  3933.                set NetbiosRouting = 3
  3934.             endif
  3935.             SetRegValue $(KeyParams) {NetbiosRouting, $(NoTitle), $(!REG_VT_DWORD), $(NetbiosRouting)}
  3936.             CloseRegKey $(KeyParams)
  3937.         endif
  3938.         CloseRegKey $(KeyService)
  3939.     endif
  3940.     Shell "" AddServiceDependency "RemoteAccess" $(!ProductRASISNRIPName)
  3941.     ifstr(i) $($R0) == STATUS_FAILED
  3942.         Debug-Output "InstallNwlnkRipService: error adding service dependency"
  3943.     endif
  3944.     set Status = STATUS_SUCCESSFUL
  3945. InstallNwlnkRipServiceEnd =+
  3946.     Debug-Output "InstallNwlnkRipService exit"
  3947.     return $(Status)
  3948. [RemoveNwlnkRipService]
  3949.     Debug-Output "RemoveNwlnkRipService entry"
  3950.     set Status = STATUS_FAILED
  3951.     set KeyNull = ""
  3952.     Set SrcDir  = $(!STF_SRCDIR)
  3953.     set AddCopy  = YES
  3954.     set DoCopy   = YES
  3955.     set DoConfig = YES
  3956.     set SaveNTN_InstallMode = $(!NTN_InstallMode)
  3957.     set !NTN_InstallMode = deinstall
  3958.     Shell "oemnsvrr.inf" InstallOption $(!STF_LANGUAGE) "NWLNKRIP"  +
  3959.           $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig) "RAS"
  3960.     set !NTN_InstallMode = $(SaveNTN_InstallMode)
  3961.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3962.         Debug-Output "Error removing NWLNKRIP service"
  3963.         Goto RemoveNwlnkRipServiceEnd
  3964.     Endif
  3965.     Set RemoveStatus = $($R0)
  3966.     Ifstr(i) $(RemoveStatus) != STATUS_SUCCESSFUL
  3967.         Ifstr(i) $(RemoveStatus) != STATUS_USERCANCEL
  3968.             Debug-Output "RemoveNwlnkRipService returned "$(RemoveStatus)
  3969.             Goto RemoveNwlnkRipServiceEnd
  3970.         Endif
  3971.     Endif
  3972.     Shell "" RemoveServiceDependency "RemoteAccess" $(!ProductRASISNRIPName)
  3973.     ifstr(i) $($R0) == STATUS_FAILED
  3974.         Debug-Output "RemoveNwlnkRipService: error removing service dependency"
  3975.     endif
  3976.     set Status = STATUS_SUCCESSFUL
  3977. RemoveNwlnkRipServiceEnd =+
  3978.     Debug-Output "RemoveNwlnkRipService exit"
  3979.     return $(Status)
  3980. [InstallIsnSapService]
  3981.     Debug-Output "InstallIsnSapService entry"
  3982.     set Status  = STATUS_FAILED
  3983.     set KeyNull = ""
  3984.     Set SrcDir  = $(!STF_SRCDIR)
  3985.     ifstr(i) $(!NTN_InstallMode) == "install"
  3986.        set !STF_SRCDIR_OVERRIDE = $(SrcDir)
  3987.     endif
  3988.     set AddCopy  = YES
  3989.     set DoCopy   = YES
  3990.     set DoConfig = YES
  3991.     set SaveNTN_InstallMode = $(!NTN_InstallMode)
  3992.     set !NTN_InstallMode = install
  3993.     Shell "oemnsvsa.inf" InstallOption $(!STF_LANGUAGE) "SAP"  +
  3994.           $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig) "RAS"
  3995.     set !NTN_InstallMode = $(SaveNTN_InstallMode)
  3996.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3997.         Debug-Output "Error installing SAP agent"
  3998.         Goto InstallIsnSapServiceEnd
  3999.     Endif
  4000.     Set InstallStatus = $($R0)
  4001.     Ifstr(i) $(InstallStatus) != STATUS_SUCCESSFUL
  4002.         Ifstr(i) $(InstallStatus) != STATUS_USERCANCEL
  4003.             Debug-Output "InstallSapService returned "$(InstallStatus)
  4004.             Goto InstallIsnSapServiceEnd
  4005.         Endif
  4006.     Endif
  4007.     Shell "" AddServiceDependency "RemoteAccess" $(!ProductRASISNSAPName)
  4008.     ifstr(i) $($R0) == STATUS_FAILED
  4009.         Debug-Output "InstallIsnSapService: error adding service dependency"
  4010.     endif
  4011.     set Status = STATUS_SUCCESSFUL
  4012. InstallIsnSapServiceEnd =+
  4013.     Debug-Output "InstallIsnSapService exit"
  4014.     return $(Status)
  4015. [RemoveIsnSapService]
  4016.     Debug-Output "RemoveIsnSapService entry"
  4017.     set Status = STATUS_FAILED
  4018.     set KeyNull = ""
  4019.     Set SrcDir  = $(!STF_SRCDIR)
  4020.     set AddCopy  = YES
  4021.     set DoCopy   = YES
  4022.     set DoConfig = YES
  4023.     set SaveNTN_InstallMode = $(!NTN_InstallMode)
  4024.     set !NTN_InstallMode = deinstall
  4025.     Shell "oemnsvsa.inf" InstallOption $(!STF_LANGUAGE) "SAP"  +
  4026.           $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig) "RAS"
  4027.     set !NTN_InstallMode = $(SaveNTN_InstallMode)
  4028.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4029.         Debug-Output "Error removing SAP agent"
  4030.         Goto RemoveIsnSapServiceEnd
  4031.     Endif
  4032.     Set RemoveStatus = $($R0)
  4033.     Ifstr(i) $(RemoveStatus) != STATUS_SUCCESSFUL
  4034.         Ifstr(i) $(RemoveStatus) != STATUS_USERCANCEL
  4035.             Debug-Output "RemoveIsnSapService returned "$(RemoveStatus)
  4036.             Goto RemoveIsnSapServiceEnd
  4037.         Endif
  4038.     Endif
  4039.     Shell "" RemoveServiceDependency "RemoteAccess" $(!ProductRASISNSAPName)
  4040.     ifstr(i) $($R0) == STATUS_FAILED
  4041.         Debug-Output "RemoveIsnSapService: error removing service dependency"
  4042.     endif
  4043.     set Status = STATUS_SUCCESSFUL
  4044. RemoveIsnSapServiceEnd =+
  4045.     Debug-Output "RemoveIsnSapService exit"
  4046.     return $(Status)
  4047. [WritePPPParameters]
  4048.     Debug-Output "WritePPPParameters: entry"
  4049.     Set Status = STATUS_FAILED
  4050.     set KeyNull = ""
  4051.     set RasManKeyName =  $(!NTN_ServiceBase)"\RasMan"
  4052.     set RasManPPPKeyName =  $(!NTN_ServiceBase)"\RasMan\PPP"
  4053.     set RasProtocolsKeyName = $(!NTN_SoftwareBase)"\Microsoft\RAS\PROTOCOLS"
  4054.     OpenRegKey $(!REG_H_LOCAL) "" $(RasManKeyName) $(!MAXIMUM_ALLOWED) KeyRasMan
  4055.     ifstr $(KeyRasMan) != $(KeyNull)
  4056.        OpenRegKey $(KeyRasMan) "" "PPP" $(!MAXIMUM_ALLOWED) KeyRasManPPP
  4057.        set NewValueList = {}
  4058.        ifstr $(KeyRasManPPP) != $(KeyNull)
  4059.            EnumRegValue $(KeyRasManPPP) NewValueList
  4060.        else
  4061.            CreateRegKey $(KeyRasMan) +
  4062.                    {"PPP",0,GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyRasManPPP
  4063.            CloseRegKey $(KeyRasMan)
  4064.            ifstr $(KeyRasManPPP) == $(KeyNull)
  4065.                Debug-Output "WritePPPParameters: error creating RasMan\ppp key"
  4066.                goto WritePPPParametersEnd
  4067.            endif
  4068.        endif
  4069.     else
  4070.        Debug-Output "WritePPPParameters: error opening RasMan key"
  4071.        goto UpdateCPListEnd
  4072.     endif
  4073.     ifstr(i) $(NewValueList) == {}
  4074.         set NewValueList = {{MaxConfigure, 0, $(!REG_VT_DWORD), 10}, +
  4075.                             {MaxTerminate, 0, $(!REG_VT_DWORD), 2}, +
  4076.                             {MaxFailure,   0, $(!REG_VT_DWORD), 10}. +
  4077.                             {MaxReject,    0, $(!REG_VT_DWORD), 5}. +
  4078.                             {NegotiateTime, 0, $(!REG_VT_DWORD), 150}, +
  4079.                             {Logging, 0, $(!REG_VT_DWORD), 0}, +
  4080.                             {RestartTimer, 0, $(!REG_VT_DWORD), 3}}
  4081.     endif
  4082.     forlistdo $(NewValueList)
  4083.         SetRegValue $(KeyRasManPPP) $($)
  4084.     endforlistdo
  4085.     set ForceEncryptedPassword = 2
  4086.     set ForceEncryptedData     = 0
  4087.     OpenRegKey $(!REG_H_LOCAL) "" $(RasProtocolsKeyName) $(!MAXIMUM_ALLOWED) KeyRasProtocols
  4088.     ifstr $(KeyRasProtocols) != $(KeyNull)
  4089.         GetRegValue $(KeyRasProtocols) "ForceEncryptedPassword" ForceValue
  4090.         ifint $(RegLastError) == 0
  4091.             set ForceEncryptedPassword = *($(ForceValue), 4)
  4092.         endif
  4093.         GetRegValue $(KeyRasProtocols) "ForceEncryptedData" ForceValue
  4094.         ifint $(RegLastError) == 0
  4095.             set ForceEncryptedData = *($(ForceValue), 4)
  4096.         endif
  4097.         SetRegValue $(KeyRasManPPP) {ForceEncryptedPassword, 0, +
  4098.                                      $(!REG_VT_DWORD),$(ForceEncryptedPassword)}
  4099.         SetRegValue $(KeyRasManPPP) {ForceEncryptedData, 0, +
  4100.                                      $(!REG_VT_DWORD),$(ForceEncryptedData)}
  4101.         CloseRegKey $(KeyRasProtocols)
  4102.     endif
  4103.     CloseRegKey $(KeyRasManPPP)
  4104.     set Status = STATUS_SUCCESSFUL
  4105. WritePPPParametersEnd =+
  4106.     Debug-Output "WritePPPParameters: exit"
  4107.     return $(Status)
  4108. [UpdateCPList]
  4109.     Debug-Output "UpdateCPList: entry"
  4110.     Set Status = STATUS_FAILED
  4111.     set KeyNull = ""
  4112.     set RasManPPPKeyName =  $(!NTN_ServiceBase)"\RasMan\PPP"
  4113.     Shell "" WritePPPParameters
  4114.     Shell "" QuerySelectedProtocols
  4115.     ifstr(i) $($R0) == STATUS_SUCCESSFUL
  4116.         set fNetbeuiSelected   = $($R1)
  4117.         set fTcpIpSelected     = $($R2)
  4118.         set fIpxSelected       = $($R3)
  4119.         set fNetbeuiAllowed    = $($R4)
  4120.         set fTcpIpAllowed      = $($R5)
  4121.         set fIpxAllowed        = $($R6)
  4122.     else
  4123.         Debug-Output "UpdateCPList: error QuerySelectedProtocols"
  4124.         goto UpdateCPListEnd
  4125.     endif
  4126.     OpenRegKey $(!REG_H_LOCAL) "" $(RasManPPPKeyName) $(!MAXIMUM_ALLOWED) KeyRasManPPP
  4127.     ifstr $(KeyRasManPPP) != $(KeyNull)
  4128.         EnumRegKey $(KeyRasManPPP) OldCPList
  4129.         ifstr(i) $(fNetbeuiSelected) == TRUE
  4130.             set fNetbeuiChosen = TRUE
  4131.         else
  4132.             set fNetbeuiChosen = $(fNetbeuiAllowed)
  4133.         endif
  4134.         ifstr(i) $(fTcpIpSelected) == TRUE
  4135.             set fTcpIpChosen = TRUE
  4136.         else
  4137.             set fTcpIpChosen = $(fTcpIpAllowed)
  4138.         endif
  4139.         ifstr(i) $(fIpxSelected) == TRUE
  4140.             set fIpxChosen = TRUE
  4141.         else
  4142.             set fIpxChosen = $(fIpxAllowed)
  4143.         endif
  4144.         set CPList = {"PAP", "CHAP", "SPAP", "CBCP", "COMPCP"}
  4145.         ifstr(i) $(fNetbeuiChosen) == TRUE
  4146.             set CPList = >($(CPList), "NBFCP")
  4147.         endif
  4148.         ifstr(i) $(fTcpIpChosen) == TRUE
  4149.             set CPList = >($(CPList), "IPCP")
  4150.         endif
  4151.         ifstr(i) $(fIpxChosen) == TRUE
  4152.             set CPList = >($(CPList), "IPXCP")
  4153.         endif
  4154.         set CurrentCPList = {}
  4155.         ForListDo $(OldCPList)
  4156.            set CPName = *($($),1)
  4157.            ifcontains(i) $(CPName) not-in $(CPList)
  4158.                DeleteRegTree $(KeyRasManPPP) $(CPName)
  4159.            else
  4160.                set CurrentCPList = >($(CurrentCPList), $(CPName))
  4161.            endif
  4162.         EndForListDo
  4163.         forlistdo $(CPList)
  4164.             ifcontains(i) $($) not-in $(CurrentCPList)
  4165.                 CreateRegKey $(KeyRasManPPP) +
  4166.                          {$($),0,GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyCp
  4167.                 set path = #(CP-List, $($), 1)
  4168.                 set NewValueList = {{Path, 0, $(!REG_VT_EXPAND_SZ), $(path)}}
  4169.                 ifstr $(KeyCp) != $(KeyNull)
  4170.                     Shell  "utility.inf", AddValueList, $(KeyCp), +
  4171.                                                               $(NewValueList)
  4172.                     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4173.                         Debug-Output "UpdateCPList:AddValueList bombed out"
  4174.                         goto UpdateCPListEnd
  4175.                     endif
  4176.                     set RegistryErrorIndex = $($R0)
  4177.                     Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  4178.                         goto UpdateCPListEnd
  4179.                     endif
  4180.                     CloseRegKey $(KeyCp)
  4181.                 else
  4182.                     Debug-Output "UpdateCPList:error creating key"
  4183.                 endif
  4184.             endif
  4185.         endforlistdo
  4186.         CloseRegKey $(KeyRasManPPP)
  4187.     else
  4188.         Debug-Output "UpdateCPList:error opening RASMAN\PPP key"
  4189.         goto UpdateCPListEnd
  4190.     endif
  4191.     set Status = STATUS_SUCCESSFUL
  4192. UpdateCPListEnd =+
  4193.     Debug-Output "UpdateCPList: exit"
  4194.     return $(Status)
  4195. [UpdateSoftwareType]
  4196.     Debug-Output "UpdateSoftwareType: entry"
  4197.     set ProductKeyName = $(!NTN_SoftwareBase)"\Microsoft\RAS\CurrentVersion"
  4198.     set Status = STATUS_FAILED
  4199.     set KeyCurrentVersion = ""
  4200.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(!MAXIMUM_ALLOWED) KeyCurrentVersion
  4201.     ifstr $(KeyCurrentVersion) == ""
  4202.        Debug-Output "OEMNSVRA.INF:UpdateSoftwareType: couldn't open "$(ProductKeyName)
  4203.        goto UpdateSoftwareTypeEnd
  4204.     endif
  4205.     SetRegValue $(KeyCurrentVersion) {SoftwareType, 0, $(!REG_VT_SZ), "service" }
  4206.     CloseRegKey $(KeyCurrentVersion)
  4207.     set Status = STATUS_SUCCESSFUL
  4208. UpdateSoftwareTypeEnd=+
  4209.     Debug-Output "UpdateSoftwareType: exit"
  4210.     return $(Status)
  4211. [UpdateLLInterface]
  4212.     Debug-Output "UpdateLLInterface: entry"
  4213.     set Status = STATUS_FAILED
  4214.     set KeyNull = ""
  4215.     set LLInterface = "\Device\RASARP"
  4216.     set IPLinkageKeyName = $(!NTN_ServiceBase)"\TCPIP\Linkage"
  4217.     OpenRegKey $(!REG_H_LOCAL) "" $(IPLinkageKeyName) $(!MAXIMUM_ALLOWED) KeyIpLinkage
  4218.     ifstr $(KeyIpLinkage) == $(KeyNull)
  4219.        Debug-Output "OEMNSVRA.INF:UpdateLLInterface: couldn't open IP Linkage key"
  4220.        goto UpdateLLInterfaceEnd
  4221.     endif
  4222.     set NdisWanList = {}
  4223.     GetRegValue    $(KeyIpLinkage) "Bind" TmpList
  4224.     ForListDo *($(TmpList),4)
  4225.         Split-String $($), "\", BindList
  4226.         QueryListSize ListSize $(BindList)
  4227.         set ServiceName = *($(BindList), $(ListSize))
  4228.         LibraryProcedure Result $(!LIBHANDLE) SetupStrncmp $(ServiceName) "NdisWan" 7
  4229.         ifint $(Result) == 0
  4230.             set NdisWanList = >($(NdisWanList), $(ServiceName))
  4231.         endif
  4232.     EndForListDo
  4233.     CloseRegKey $(KeyIpLinkage)
  4234.     QueryListSize ListSize $(NdisWanList)
  4235.     ifint $(ListSize) >= 1
  4236.     ForListDo $(NdisWanList)
  4237.         set ServiceKeyName = $(!NTN_ServiceBase)"\"$($)"\Parameters\TCPIP"
  4238.         OpenRegKey $(!REG_H_LOCAL) "" $(ServiceKeyName) $(!MAXIMUM_ALLOWED) KeyNdisWan
  4239.         ifstr $(KeyNdisWan) != $(KeyNull)
  4240.             SetRegValue $(KeyNdisWan) {IPAddress, 0, +
  4241.                               $(!REG_VT_MULTI_SZ), {"0.0.0.0"}}
  4242.             SetRegValue $(KeyNdisWan) {SubnetMask, 0, +
  4243.                               $(!REG_VT_MULTI_SZ), {"0.0.0.0"}}
  4244.             SetRegValue $(KeyNdisWan) {DefaultGateway, 0, +
  4245.                               $(!REG_VT_MULTI_SZ), {""}}
  4246.             SetRegValue $(KeyNdisWan) {LLInterface, 0,+
  4247.                                          $(!REG_VT_SZ), $(LLInterface)}
  4248.             SetRegValue $(KeyNdisWan) {EnableDHCP, 0, +
  4249.                                           $(!REG_VT_DWORD), 0}
  4250.         else
  4251.             CreateRegKey $(!REG_H_LOCAL) +
  4252.                          {$(ServiceKeyName),0,GenericClass} "" +
  4253.                           $(!MAXIMUM_ALLOWED) "" KeyNdisWan
  4254.             ifstr $(KeyNdisWan) != $(KeyNull)
  4255.                 SetRegValue $(KeyNdisWan) {IPAddress, 0, +
  4256.                                       $(!REG_VT_MULTI_SZ), {"0.0.0.0"}}
  4257.                 SetRegValue $(KeyNdisWan) {SubnetMask, 0, +
  4258.                               $(!REG_VT_MULTI_SZ), {"0.0.0.0"}}
  4259.                 SetRegValue $(KeyNdisWan) {DefaultGateway, 0, +
  4260.                               $(!REG_VT_MULTI_SZ), {""}}
  4261.                 SetRegValue $(KeyNdisWan) {LLInterface, 0,+
  4262.                                           $(!REG_VT_SZ), $(LLInterface)}
  4263.                 SetRegValue $(KeyNdisWan) {EnableDHCP, 0, +
  4264.                                           $(!REG_VT_DWORD), 0}
  4265.                 SetRegValue $(KeyNdisWan) {UseZeroBroadcast, 0, +
  4266.                                           $(!REG_VT_DWORD), 0}
  4267.            else
  4268.                Debug-Output "OEMNSVRA.INF:UpdateLLInterface: couldn't create NdisWan params-tcpip key"
  4269.                goto UpdateLLInterfaceEnd
  4270.            endif
  4271.         endif
  4272.         CloseRegKey $(KeyNdisWan)
  4273.         EndForListDo
  4274.     endif
  4275.     set Status = STATUS_SUCCESSFUL
  4276. UpdateLLInterfaceEnd =+
  4277.     Debug-Output "UpdateLLInterface: exit"
  4278.     return $(Status)
  4279. [SetRasArpBindValueFromTcpIP]
  4280.     Debug-Output "SetRasArpBindValueFromTcpIP: entry"
  4281.     set Status = STATUS_FAILED
  4282.     set KeyNull = ""
  4283.     set IPLinkageKeyName = $(!NTN_ServiceBase)"\TCPIP\Linkage"
  4284.     OpenRegKey $(!REG_H_LOCAL) "" $(IPLinkageKeyName) $(!MAXIMUM_ALLOWED) KeyIpLinkage
  4285.     ifstr $(KeyIpLinkage) == $(KeyNull)
  4286.        Debug-Output "OEMNSVRA.INF:SetRasArpBindValueFromTcpIP: couldn't open IP Linkage key"
  4287.        goto SetRasArpBindValueFromTcpIPEnd
  4288.     endif
  4289.     set NdisWanList = {}
  4290.     GetRegValue $(KeyIpLinkage) "Bind" TmpList
  4291.     ForListDo *($(TmpList),4)
  4292.         Split-String $($), "\", BindList
  4293.         QueryListSize ListSize $(BindList)
  4294.         set ServiceName = *($(BindList), $(ListSize))
  4295.         LibraryProcedure Result $(!LIBHANDLE) SetupStrncmp $(ServiceName) "NdisWan" 7
  4296.         ifint $(Result) == 0
  4297.             set NdisWanList = >($(NdisWanList), $($))
  4298.         endif
  4299.     EndForListDo
  4300.     set RasArpLinkageKeyName = $(!NTN_ServiceBase)"\RASARP\Linkage"
  4301.     OpenRegKey $(!REG_H_LOCAL) "" $(RasArpLinkageKeyName) $(!MAXIMUM_ALLOWED) KeyRasArpLinkage
  4302.     ifstr $(KeyRasArpLinkage) != $(KeyNull)
  4303.         SetRegValue $(KeyRasArpLinkage) {Bind, 0, $(!REG_VT_MULTI_SZ), $(NdisWanList)}
  4304.         CloseRegKey $(KeyRasArpLinkage)
  4305.     endif
  4306.     CloseRegKey $(KeyIpLinkage)
  4307.     set Status = STATUS_SUCCESSFUL
  4308. SetRasArpBindValueFromTcpIPEnd=+
  4309.     Debug-Output "SetRasArpBindValueFromTcpIP: entry"
  4310.     return $(Status)
  4311. [UpdateNetGroupDependency]
  4312.     Set  Status = STATUS_SUCCESSFUL
  4313.     set  KeyNull = ""
  4314.     set  fNetbeuiInstalled  = $($0)
  4315.     set  fTcpIpInstalled    = $($1)
  4316.     set  fIpxInstalled      = $($2)
  4317.     Debug-Output "UpdateNetGroupDependency entry"
  4318.     set ServiceList =  {}
  4319.     ifstr(i) $(fNetbeuiInstalled) == TRUE
  4320.         set ServiceList = >($(ServiceList), "nbf")
  4321.     endif
  4322.     ifstr(i) $(fTcpIpInstalled) == TRUE
  4323.         set ServiceList = >($(ServiceList), "tcpip")
  4324.     endif
  4325.     ifstr(i) $(fIpxInstalled) == TRUE
  4326.         set ServiceList = >($(ServiceList), "nwlnkipx")
  4327.     endif
  4328.     ForListDo $(ServiceList)
  4329.         set Service = $($)
  4330.         Debug-Output "OEMNSVRA.INF: Changing group dependency of "$(Service)
  4331.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(Service) +
  4332.                    $(!MAXIMUM_ALLOWED) KeyService
  4333.         ifstr $(KeyService) != $(KeyNull)
  4334.             set newGroupList = {"+NDIS", "+NDISWAN"}
  4335.             GetRegValue    $(KeyService) "DependOnGroup" GrpList
  4336.             ifint $(RegLastError) == 0
  4337.                 Debug-Output "UpdateNetGroupDependency: old group List "*($(GrpList), 4)
  4338.                 ForListDo *($(GrpList),4)
  4339.                     ifstr(i) $($) != "NDIS"
  4340.                         ifstr(i) $($) != "NDISWAN"
  4341.                             set newGroup = "+"$($)
  4342.                             set newGroupList = >($(newGroupList), $(newGroup))
  4343.                         endif
  4344.                     endif
  4345.                 EndForListDo
  4346.             endif
  4347.             GetRegValue $(KeyService) "DependOnService" ServiceList
  4348.             ifint $(RegLastError) == 0
  4349.                 Debug-Output "UpdateNetGroupDependency: old service List "*($(ServiceList), 4)
  4350.                 ForListDo *($(ServiceList),4)
  4351.                     set newGroupList = >($(newGroupList), $($))
  4352.                 EndForListDo
  4353.             endif
  4354.             Debug-Output "OEMNSVRA.INF: UpdateNetGroupDependency: new depend List "$(newGroupList)
  4355.             LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, $(Service) $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), "", "", $(newGroupList), "", "", ""
  4356.             CloseRegKey $(KeyService)
  4357.         else
  4358.             Debug-Output "UpdateNetGroupDependency: failed to open service linkage key"$(Service)
  4359.         endif
  4360.     EndForListDo
  4361.     Debug-Output "UpdateNetGroupDependency exit"
  4362.     return $(Status)
  4363. [RemoveNetGroupDependency]
  4364.     Set  Status = STATUS_SUCCESSFUL
  4365.     set  KeyNull = ""
  4366.     set  fNetbeuiInstalled  = $($0)
  4367.     set  fTcpIpInstalled    = $($1)
  4368.     set  fIpxInstalled      = $($2)
  4369.     Debug-Output "UpdateNetGroupDependency entry"
  4370.     set ServiceList =  {"nbf", "tcpip", "nwlnkipx"}
  4371.     ForListDo $(ServiceList)
  4372.         set Service = $($)
  4373.         Debug-Output "OEMNSVRA.INF: Changing group dependency of "$(Service)
  4374.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(Service) +
  4375.                    $(!MAXIMUM_ALLOWED) KeyService
  4376.         ifstr $(KeyService) != $(KeyNull)
  4377.           set DeleteFlag = ""
  4378.           GetRegValue $(KeyService),"DeleteFlag", DeleteFlagInfo
  4379.           set DeleteFlag = *($(DeleteFlagInfo), 4)
  4380.           ifint $(DeleteFlag) != 1
  4381.             set newGroupList = {}
  4382.             GetRegValue    $(KeyService) "DependOnGroup" GrpList
  4383.             ifint $(RegLastError) == 0
  4384.                 Debug-Output "UpdateNetGroupDependency: old List "*($(GrpList), 4)
  4385.                 ForListDo *($(GrpList),4)
  4386.                     ifstr(i) $($) != "NDISWAN"
  4387.                         set newGroup = "+"$($)
  4388.                         set newGroupList = >($(newGroupList), $(newGroup))
  4389.                     endif
  4390.                 EndForListDo
  4391.             endif
  4392.             GetRegValue $(KeyService) "DependOnService" ServiceList
  4393.             ifint $(RegLastError) == 0
  4394.                 Debug-Output "UpdateNetGroupDependency: old service List "*($(ServiceList), 4)
  4395.                 ForListDo *($(ServiceList),4)
  4396.                     set newGroupList = >($(newGroupList), $($))
  4397.                 EndForListDo
  4398.             endif
  4399.             Debug-Output "OEMNSVRA.INF: UpdateNetGroupDependency: new depend List "$(newGroupList)
  4400.             LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, $(Service) $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), "", "", $(newGroupList), "", "", ""
  4401.             CloseRegKey $(KeyService)
  4402.           endif
  4403.         else
  4404.             Debug-Output "UpdateNetGroupDependency: failed to open service linkage key"$(Service)
  4405.         endif
  4406.     EndForListDo
  4407.     Debug-Output "UpdateNetGroupDependency exit"
  4408.     return $(Status)
  4409. [UpdateIPRouterInfo]
  4410.     set EnableRouter = $($0)
  4411.     set KeyNull      = ""
  4412.     Debug-Output "UpdateIPRouterInfo entry"
  4413.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\TCPIP\parameters" $(!MAXIMUM_ALLOWED) KeyIpParams
  4414.     ifstr $(KeyIpParams) != $(KeyNull)
  4415.         SetRegValue $(KeyIpParams) {IPEnableRouter, 0,+
  4416.                                     $(!REG_VT_DWORD), $(EnableRouter)}
  4417.         CloseRegKey $(KeyIpParams)
  4418.     endif
  4419.     Debug-Output "UpdateIPRouterInfo exit"
  4420.     return STATUS_SUCCESSFUL
  4421. [UpdateIPXRouterInfo]
  4422.     set Status = STATUS_FAILED
  4423.     set EnableRouter = $($0)
  4424.     set KeyNull      = ""
  4425.     Debug-Output "UpdateIPXRouterInfo entry"
  4426.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NWLNKIPX\NetConfig" $(!MAXIMUM_ALLOWED) KeyIpxNetConfig
  4427.     ifstr $(KeyIpxNetConfig) != $(KeyNull)
  4428.         EnumRegKey $(KeyIpxNetConfig) DriverList
  4429.         ForListDo $(DriverList)
  4430.            set DriverName = *($($),1)
  4431.            OpenRegKey $(KeyIpxNetConfig) "" $(DriverName) $(!MAXIMUM_ALLOWED) Driver
  4432.            ifstr $(Driver) == $(KeyNull)
  4433.                Debug-Output "UpdateIPXRouterInfo: could not open key ipx\netconfig\"$(DriverName)
  4434.                CloseRegKey $(KeyIpxNetConfig)
  4435.                return $(Status)
  4436.            endif
  4437.            SetRegValue $(Driver) {EnableWanRouter, 0,+
  4438.                                     $(!REG_VT_DWORD), $(EnableRouter)}
  4439.            CloseRegKey $(Driver)
  4440.         EndForListDo
  4441.         CloseRegKey $(KeyIpxNetConfig)
  4442.         set Status = STATUS_SUCCESSFUL
  4443.     else
  4444.         Debug-Output "UpdateIPXRouterInfo: error opening ipx\netconfig key"
  4445.     endif
  4446.     Debug-Output "UpdateIPXRouterInfo exit"
  4447.     return $(Status)
  4448. [IsNetcardInstalled]
  4449.     Set Status                = STATUS_FAILED
  4450.     Set fNetcardInstalled     = FALSE
  4451.     Set KeyNull               = ""
  4452.     set ProductRASASYMACName     = "AsyncMac"
  4453.     set NetworkCardKey = $(KeyNull)
  4454.     OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) NetworkCardKey
  4455.     Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  4456.         set NetcardsList = {}
  4457.         EnumRegKey $(NetworkCardKey) NetcardsList
  4458.         Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  4459.            Debug-Output "IsNetcardInstalled: EnumRegKey failed."
  4460.            goto IsNetcardInstalledEnd
  4461.         endif
  4462.         ForListDo $(NetcardsList)
  4463.            set KeyName = *($($),1)
  4464.            set Card = $(KeyNull)
  4465.            OpenRegKey $(NetworkCardKey) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  4466.            ifstr $(Card) == $(KeyNull)
  4467.                Debug-Output "IsNetcardInstalled: could not open netcard key "$(KeyName)
  4468.            else
  4469.                GetRegValue $(Card), "ProductName" ProductNameInfo
  4470.                Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  4471.                   Debug-Output "IsNetcardInstalled: ProductName not found."
  4472.                else
  4473.                   set CardProductName = *($(ProductNameInfo), 4)
  4474.                   Debug-Output "IsNetcardInstalled: ProductName. "$(CardProductName)
  4475.                   ifstr(i) $(CardProductName) != $(!ProductNDISWANName)
  4476.                    ifstr(i) $(CardProductName) != $(!ProductNDISWANDIALINName)
  4477.                     ifstr(i) $(CardProductName) != $(!ProductNDISWANDIALOUTName)
  4478.                      ifstr(i) $(CardProductName) != $(!ProductNDISWANDIALINIPName)
  4479.                       ifstr(i) $(CardProductName) != $(!ProductNDISWANDIALOUTIPName)
  4480.                        ifstr(i) $(CardProductName) != $(!ProductNDISWANDIALINOUTIPXName)
  4481.                         ifstr(i) $(CardProductName) != $(ProductRASASYMACName)
  4482.                          ifstr(i) $(CardProductName) != $(!ProductPCIMACName)
  4483.                            GetRegValue $(Card), "Manufacturer" Manufacturer
  4484.                            Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  4485.                              ifstr(i) *($(Manufacturer), 4) != "Digiboard"
  4486.                                Debug-Output "found installed netcard"
  4487.                                set fNetcardInstalled = TRUE
  4488.                                set Status = STATUS_SUCCESSFUL
  4489.                                CloseRegKey $(Card)
  4490.                                goto IsNetcardInstalledEnd
  4491.                              endif
  4492.                            endif
  4493.                          endif
  4494.                         endif
  4495.                        endif
  4496.                       endif
  4497.                      endif
  4498.                     endif
  4499.                    endif
  4500.                   endif
  4501.                endif
  4502.                CloseRegKey $(Card)
  4503.            endif
  4504.         EndForListDo
  4505.     else
  4506.         Debug-Output "IsNetcardInstalled: failed to open "$(!NetworkCardKeyName)
  4507.     endif
  4508. IsNetcardInstalledEnd =+
  4509.     ifstr(i) $(NetworkCardKey) != $(KeyNull)
  4510.         CloseRegKey $(NetworkCardKey)
  4511.     endif
  4512.     Return $(Status) $(fNetcardInstalled)
  4513. [IsNetworkConfigured]
  4514.     set WkstaKeyName   = $(!NTN_ServiceBase)"\LanmanWorkstation"
  4515.     set SrvrKeyName    = $(!NTN_ServiceBase)"\LanmanServer"
  4516.     Set KeyNull        =    ""
  4517.     Set status = STATUS_FAILED
  4518.     Set WkstaConfigured  = FALSE
  4519.     Set SrvrConfigured   = FALSE
  4520.     Debug-Output "IsNetworkConfigured WkstaKeyName "$(WkstaKeyName)
  4521.     set KeyProduct = $(KeyNull)
  4522.     OpenRegKey $(!REG_H_LOCAL) "" $(WkstaKeyName) $(!MAXIMUM_ALLOWED) KeyProduct
  4523.     Ifstr(i) $(KeyProduct) != $(KeyNull)
  4524.         GetRegValue $(KeyProduct),"DeleteFlag", DeleteFlagInfo
  4525.         set DeleteFlag = *($(DeleteFlagInfo), 4)
  4526.         ifint $(DeleteFlag) != 1
  4527.             set WkstaConfigured = TRUE
  4528.         endif
  4529.         CloseRegKey $(KeyProduct)
  4530.     endif
  4531.     Debug-Output "IsNetworkConfigured SrvrKeyName "$(SrvrKeyName)
  4532.     set KeyProduct = $(KeyNull)
  4533.     OpenRegKey $(!REG_H_LOCAL) "" $(SrvrKeyName) $(!MAXIMUM_ALLOWED) KeyProduct
  4534.     Ifstr(i) $(KeyProduct) != $(KeyNull)
  4535.         GetRegValue $(KeyProduct),"DeleteFlag", DeleteFlagInfo
  4536.         set DeleteFlag = *($(DeleteFlagInfo), 4)
  4537.         ifint $(DeleteFlag) != 1
  4538.             set SrvrConfigured = TRUE
  4539.         endif
  4540.         CloseRegKey $(KeyProduct)
  4541.     endif
  4542.     set status = STATUS_SUCCESSFUL
  4543.     Debug-Output "IsNetworkConfigured exit"
  4544.     Return $(status) $(WkstaConfigured) $(SrvrConfigured)
  4545. [QueryInstalledProtocols]
  4546.     Debug-Output "QueryInstalledProtocols entry "
  4547.     set NbfKeyName        = $(!NTN_ServiceBase)"\Nbf"
  4548.     set TcpIpKeyName      = $(!NTN_ServiceBase)"\TcpIp"
  4549.     set IpxKeyName        = $(!NTN_ServiceBase)"\NWLNKIPX"
  4550.     set AppleTalkKeyName  = $(!NTN_ServiceBase)"\AppleTalk"
  4551.     Set KeyNull        =    ""
  4552.     Set status = STATUS_FAILED
  4553.     Set NbfInstalled     = FALSE
  4554.     Set TcpIpInstalled   = FALSE
  4555.     Set IpxInstalled     = FALSE
  4556.     Set AppleTalkInstalled = FALSE
  4557.     set KeyService = $(KeyNull)
  4558.     set DeleteFlag = 0
  4559.     set DeleteFlagInfo = {}
  4560.     OpenRegKey $(!REG_H_LOCAL) "" $(NbfKeyName) $(!MAXIMUM_ALLOWED) KeyService
  4561.     Ifstr(i) $(KeyService) != $(KeyNull)
  4562.         GetRegValue $(KeyService),"DeleteFlag", DeleteFlagInfo
  4563.         set DeleteFlag = *($(DeleteFlagInfo), 4)
  4564.         ifint $(DeleteFlag) != 1
  4565.             set NbfInstalled = TRUE
  4566.         endif
  4567.         CloseRegKey $(KeyService)
  4568.     endif
  4569.     set KeyService = $(KeyNull)
  4570.     set DeleteFlag = 0
  4571.     set DeleteFlagInfo = {}
  4572.     OpenRegKey $(!REG_H_LOCAL) "" $(TcpIpKeyName) $(!MAXIMUM_ALLOWED) KeyService
  4573.     Ifstr(i) $(KeyService) != $(KeyNull)
  4574.         GetRegValue $(KeyService),"DeleteFlag", DeleteFlagInfo
  4575.         set DeleteFlag = *($(DeleteFlagInfo), 4)
  4576.         ifint $(DeleteFlag) != 1
  4577.             set TcpIpInstalled = TRUE
  4578.         endif
  4579.         CloseRegKey $(KeyService)
  4580.     endif
  4581.     set KeyService = $(KeyNull)
  4582.     set DeleteFlag = 0
  4583.     set DeleteFlagInfo = {}
  4584.     OpenRegKey $(!REG_H_LOCAL) "" $(IpxKeyName) $(!MAXIMUM_ALLOWED) KeyService
  4585.     Ifstr(i) $(KeyService) != $(KeyNull)
  4586.         GetRegValue $(KeyService),"DeleteFlag", DeleteFlagInfo
  4587.         set DeleteFlag = *($(DeleteFlagInfo), 4)
  4588.         ifint $(DeleteFlag) != 1
  4589.             set IpxInstalled = TRUE
  4590.         endif
  4591.         CloseRegKey $(KeyService)
  4592.     endif
  4593.     set KeyService = $(KeyNull)
  4594.     set DeleteFlag = 0
  4595.     set DeleteFlagInfo = {}
  4596.     OpenRegKey $(!REG_H_LOCAL) "" $(AppleTalkKeyName) $(!MAXIMUM_ALLOWED) KeyService
  4597.     Ifstr(i) $(KeyService) != $(KeyNull)
  4598.         GetRegValue $(KeyService),"DeleteFlag", DeleteFlagInfo
  4599.         set DeleteFlag = *($(DeleteFlagInfo), 4)
  4600.         ifint $(DeleteFlag) != 1
  4601.             set AppleTalkInstalled = TRUE
  4602.         endif
  4603.         CloseRegKey $(KeyService)
  4604.     endif
  4605.     set status = STATUS_SUCCESSFUL
  4606.     Debug-Output "QueryInstalledProtocols exit"
  4607.     Return $(status) $(NbfInstalled) $(TcpIpInstalled) $(IpxInstalled) +
  4608.                      $(AppleTalkInstalled)
  4609. [ProtocolInfo]
  4610.     NETBEUI               = "OEMNXPNB.INF", "NBF", 1
  4611.     TCPIP                 = "OEMNXPTC.INF", "TC", 2
  4612.     IPX                   = "OEMNXPIP.INF", "NWLNKIPX", 3
  4613. [InstallProtocol]
  4614.     Set Status                = STATUS_FAILED
  4615.     Set KeyNull               = ""
  4616.     set Protocol              = $($0)
  4617.     Debug-Output "OEMNSVRA.INF: Label: InstallProtocol"
  4618.     Set ThisInfName = #(ProtocolInfo, $(Protocol), 1)
  4619.     Set InfOption = #(ProtocolInfo, $(Protocol), 2)
  4620.     Set BbIndex = #(ProtocolInfo, $(Protocol), 3)
  4621.     Debug-Output "OEMNSVRA.INF: Installing "$(ThisInfName)
  4622.     Ifint $(BbIndex) != 0
  4623.         read-syms Billboard$(BbIndex)$(!STF_LANGUAGE)
  4624.         Shell "subroutn.inf" PushBillboard NETSTATUSDLG $(Status)
  4625.         Set BillboardVisible = 1
  4626.     Else-ifint $(BillboardVisible) != 0
  4627.         Shell "subroutn.inf" PopBillboard
  4628.         Set BillboardVisible = 0
  4629.     Endif
  4630.     set AddCopy  = YES
  4631.     set DoCopy   = YES
  4632.     set DoConfig = YES
  4633.     set InvokedByRas = YES
  4634.     set SaveNTN_InstallMode = $(!NTN_InstallMode)
  4635.     set SaveSTF_INSTALL_MODE = $(!STF_INSTALL_MODE)
  4636.     set !NTN_InstallMode = install
  4637.     set !STF_INSTALL_MODE = EXPRESS
  4638.     Shell $(ThisInfName) InstallOption $(!STF_LANGUAGE) $(InfOption) $(!STF_SRCDIR) $(AddCopy) $(DoCopy) $(DoConfig) $(InvokedByRas)
  4639.     set !NTN_InstallMode = $(SaveNTN_InstallMode)
  4640.     set !STF_INSTALL_MODE = $(SaveSTF_INSTALL_MODE)
  4641.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4642.         Debug-Output "OEMNSVRA.INF: INF "$(ThisInfName)" SHELL ERROR!"
  4643.         Goto InstallProtocolEscape
  4644.     Endif
  4645.     Set InstallProtocolStatus = $($R0)
  4646.     Ifstr(i) $(InstallProtocolStatus) != STATUS_SUCCESSFUL
  4647.         Ifstr(i) $(InstallProtocolStatus) != STATUS_USERCANCEL
  4648.             Debug-Output "OEMNSVRA.INF: INF "$(ThisInfName)" returned "$(InstallProtocolStatus)
  4649.             Goto InstallProtocolEscape
  4650.         Endif
  4651.     Endif
  4652. InstallProtocolEscape = +
  4653.     set Status = $(InstallProtocolStatus)
  4654.     return $(Status)
  4655. [UpgradeSelectedProtocols]
  4656.     Debug-Output "UpgradeSelectedProtocols entry."
  4657.     set Status   = STATUS_FAILED
  4658.     Set KeyNull  = ""
  4659.     set RasKeyName =  $(!NTN_SoftwareBase)"\Microsoft\Ras"
  4660.     set RasProtocolName =  $(!NTN_SoftwareBase)"\Microsoft\Ras\Protocols"
  4661.     set RasServiceParmName =  $(!NTN_ServiceBase)"\Remoteaccess\Parameters"
  4662.     set AsyMacServiceParmName = $(!NTN_ServiceBase)"\AsyncMac\Parameters"
  4663.     set RasManPPPName = $(!NTN_ServiceBase)"\RasMan\PPP"
  4664.     set GtwyEnabled = 1
  4665.     OpenRegKey $(!REG_H_LOCAL) "" $(RasServiceParmName) $(!MAXIMUM_ALLOWED) KeyParam
  4666.     ifstr $(KeyParam) != $(KeyNull)
  4667.         GetRegValue $(KeyParam), "NetBiosGatewayEnabled", GtwyEnabledList
  4668.         ifint $(RegLastError) == 0
  4669.             set GtwyEnabled = *($(GtwyEnabledList), 4)
  4670.         endif
  4671.         CloseRegKey $(KeyParam)
  4672.     else
  4673.         Debug-Output "UpgradeSelectedProtocols: error opening RemoteAccess\Parameters key"
  4674.     endif
  4675.     set DialinNBF    = 0
  4676.     set DialinIP     = 0
  4677.     set DialoutNBF   = 0
  4678.     set DialoutIP    = 0
  4679.     set DialinoutIPX = 0
  4680.     OpenRegKey $(!REG_H_LOCAL) "" $(AsyMacServiceParmName) $(!MAXIMUM_ALLOWED) KeyParam
  4681.     ifstr $(KeyParam) != $(KeyNull)
  4682.         GetRegValue $(KeyParam), "DialinNBF", DialinNBFList
  4683.         ifint $(RegLastError) == 0
  4684.             set DialinNBF = *($(DialinNBFList), 4)
  4685.         endif
  4686.         GetRegValue $(KeyParam), "DialinIP", DialinIPList
  4687.         ifint $(RegLastError) == 0
  4688.             set DialinIP = *($(DialinIPList), 4)
  4689.         endif
  4690.         GetRegValue $(KeyParam), "DialoutNBF", DialoutNBFList
  4691.         ifint $(RegLastError) == 0
  4692.             set DialoutNBF = *($(DialoutNBFList), 4)
  4693.         endif
  4694.         GetRegValue $(KeyParam), "DialoutIP", DialoutIPList
  4695.         ifint $(RegLastError) == 0
  4696.             set DialoutIP = *($(DialoutIPList), 4)
  4697.         endif
  4698.         GetRegValue $(KeyParam), "DialinoutIPX", DialinoutIPXList
  4699.         ifint $(RegLastError) == 0
  4700.             set DialinoutIPX = *($(DialinoutIPXList), 4)
  4701.         endif
  4702.         CloseRegKey $(KeyParam)
  4703.     else
  4704.         Debug-Output "UpgradeSelectedProtocols: error opening AsyncMac\Parameters key"
  4705.     endif
  4706.     set fDownLevel = FALSE
  4707.     OpenRegKey $(!REG_H_LOCAL) "" $(RasProtocolName) $(!MAXIMUM_ALLOWED) RasProtocolKey
  4708.     ifstr $(RasProtocolKey) == $(KeyNull)
  4709.         set fDownLevel = TRUE
  4710.         OpenRegKey $(!REG_H_LOCAL) "" $(RasKeyName) $(!MAXIMUM_ALLOWED) RasKey
  4711.         CreateRegKey $(RasKey) {"Protocols",0,GenericClass} "" $(!MAXIMUM_ALLOWED) "" RasProtocolKey
  4712.         OpenRegKey $(RasKey) "" "Protocols" $(!MAXIMUM_ALLOWED) RasProtocolKey
  4713.         CloseRegKey $(RasKey)
  4714.     endif
  4715.     ifstr $(RasProtocolKey) != $(KeyNull)
  4716.         set MultilinkList = {}
  4717.         GetRegValue $(RasProtocolKey), "Multilink", MultiLinkList
  4718.         ifint $(RegLastError) != 0
  4719.            Debug-Output "Upgradeselectedprotocols: defaulting Multilink to 0"
  4720.            SetRegValue $(RasProtocolKey) {Multilink, 0, $(!REG_VT_DWORD), 0}
  4721.         endif
  4722.         set NetbeuiSelected = 0
  4723.         set NetbeuiAllowed  = 0
  4724.         set TcpIpSelected = 0
  4725.         set TcpIpAllowed = 0
  4726.         set IpxSelected = 0
  4727.         set IpxAllowed = 0
  4728.         ifint $(DialoutNBF) != 0
  4729.             set NetbeuiSelected = 1
  4730.         endif
  4731.         ifint $(GtwyEnabled) == 1
  4732.           ifint $(DialinNBF) != 0
  4733.             set NetbeuiAllowed = 1
  4734.           endif
  4735.         else
  4736.           ifint $(DialoutNBF) != 0
  4737.             set NetbeuiAllowed = 1
  4738.           endif
  4739.         endif
  4740.         ifstr(i) $(fDownLevel) != TRUE
  4741.           ifint $(DialoutIP) != 0
  4742.             set TcpIpSelected = 1
  4743.           endif
  4744.           ifint $(DialinIP) != 0
  4745.             set TcpIpAllowed = 1
  4746.           endif
  4747.           ifint $(DialinoutIPX) != 0
  4748.             set IpxSelected = 1
  4749.             set IpxAllowed  = 1
  4750.           endif
  4751.         endif
  4752.         set ItemList = {}
  4753.         GetRegValue $(RasProtocolKey), "fNetbeuiSelected", ItemList
  4754.         ifint $(RegLastError) != 0
  4755.            SetRegValue $(RasProtocolKey) {fNetbeuiSelected, 0,+
  4756.                                           $(!REG_VT_DWORD),$(NetbeuiSelected)}
  4757.         endif
  4758.         GetRegValue $(RasProtocolKey), "fTcpIpSelected", ItemList
  4759.         ifint $(RegLastError) != 0
  4760.            SetRegValue $(RasProtocolKey) {fTcpIpSelected, 0,+
  4761.                                           $(!REG_VT_DWORD),$(TcpIpSelected)}
  4762.         endif
  4763.         GetRegValue $(RasProtocolKey), "fIpxSelected", ItemList
  4764.         ifint $(RegLastError) != 0
  4765.            SetRegValue $(RasProtocolKey) {fIpxSelected, 0,+
  4766.                                           $(!REG_VT_DWORD),$(IpxSelected)}
  4767.         endif
  4768.         GetRegValue $(RasProtocolKey), "fNetbeuiAllowed", ItemList
  4769.         ifint $(RegLastError) != 0
  4770.            SetRegValue $(RasProtocolKey) {fNetbeuiAllowed, 0,+
  4771.                                           $(!REG_VT_DWORD),$(NetbeuiAllowed)}
  4772.         endif
  4773.         GetRegValue $(RasProtocolKey), "fTcpIpAllowed", ItemList
  4774.         ifint $(RegLastError) != 0
  4775.            SetRegValue $(RasProtocolKey) {fTcpIpAllowed, 0,+
  4776.                                           $(!REG_VT_DWORD),$(TcpIpAllowed)}
  4777.         endif
  4778.         GetRegValue $(RasProtocolKey), "fIpxAllowed", ItemList
  4779.         ifint $(RegLastError) != 0
  4780.            SetRegValue $(RasProtocolKey) {fIpxAllowed, 0,+
  4781.                                           $(!REG_VT_DWORD),$(IpxAllowed)}
  4782.         endif
  4783.         OpenRegKey $(RasProtocolKey) "" "NBF" $(!MAXIMUM_ALLOWED) NbfKey
  4784.         ifstr $(NbfKey) == $(KeyNull)
  4785.             CreateRegKey $(RasProtocolKey) {"NBF",0,GenericClass} "" $(!MAXIMUM_ALLOWED) "" NbfKey
  4786.             SetRegValue $(NbfKey) {NetBiosGatewayEnabled, 0,+
  4787.                                        $(!REG_VT_DWORD),$(GtwyEnabled)}
  4788.             CloseRegKey $(NbfKey)
  4789.         endif
  4790.         ifstr(i) $(fDownLevel) != TRUE
  4791.             OpenRegKey $(RasProtocolKey) "" "IP" $(!MAXIMUM_ALLOWED) IpKey
  4792.             ifstr $(IpKey) != $(KeyNull)
  4793.                 GetRegValue $(IpKey), "AllowNetworkAccess", ItemList
  4794.                 ifint $(RegLastError) != 0
  4795.                    SetRegValue $(IpKey) {AllowNetworkAccess, 0,+
  4796.                                               $(!REG_VT_DWORD),$(GtwyEnabled)}
  4797.                 endif
  4798.                 CloseRegKey $(IpKey)
  4799.             endif
  4800.             OpenRegKey $(RasProtocolKey) "" "IPX" $(!MAXIMUM_ALLOWED) IpxKey
  4801.             ifstr $(IpxKey) != $(KeyNull)
  4802.                 GetRegValue $(IpxKey), "AllowNetworkAccess", ItemList
  4803.                 ifint $(RegLastError) != 0
  4804.                 SetRegValue $(IpxKey) {AllowNetworkAccess, 0,+
  4805.                                            $(!REG_VT_DWORD),$(GtwyEnabled)}
  4806.                 endif
  4807.                 CloseRegKey $(IpxKey)
  4808.             endif
  4809.         endif
  4810.         set ForceEncryptedPassword = 2
  4811.         set ForceEncryptedData = 0
  4812.         ifstr(i) $(fDownLevel) != TRUE
  4813.             GetRegValue $(RasProtocolKey), "ForceEncryptedData", DataList
  4814.             ifint $(RegLastError) != 0
  4815.                 GetRegValue $(RasProtocolKey), "ForceEncryptedPassword", PasswdList
  4816.                 ifint $(RegLastError) == 0
  4817.                    set ForceEncryptedPassword = *($(PasswdList), 4)
  4818.                    ifint $(ForceEncryptedPassword) == 1
  4819.                        set ForceEncryptedPassword = 2
  4820.                    endif
  4821.                 endif
  4822.             else
  4823.                 goto  UpgradeSelectedProtocolsEnd
  4824.             endif
  4825.         endif
  4826.         SetRegValue $(RasProtocolKey) {ForceEncryptedPassword, 0,+
  4827.                                  $(!REG_VT_DWORD), $(ForceEncryptedPassword)}
  4828.         SetRegValue $(RasProtocolKey) {ForceEncryptedData, 0,+
  4829.                                  $(!REG_VT_DWORD), $(ForceEncryptedData)}
  4830. UpgradeSelectedProtocolsEnd =+
  4831.         CloseRegKey $(RasProtocolKey)
  4832.         set Status = STATUS_SUCCESSFUL
  4833.     else
  4834.         Debug-Output "UpgradeSelectedProtocols: error opening Ras\protocols key"
  4835.     endif
  4836.     Debug-Output "UpgradeSelectedProtocols exit."
  4837.     return $(Status)
  4838. [SaveSelectedProtocols]
  4839.     Debug-Output "SaveSelectedProtocols entry."
  4840.     set Status   = STATUS_FAILED
  4841.     Set KeyNull  = ""
  4842.     ifstr(i) $($0) == TRUE
  4843.         set NetbeuiSelected = 1
  4844.     else
  4845.         set NetbeuiSelected = 0
  4846.     endif
  4847.     ifstr(i) $($1) == TRUE
  4848.         set TcpIpSelected = 1
  4849.     else
  4850.         set TcpIpSelected = 0
  4851.     endif
  4852.     ifstr(i) $($2) == TRUE
  4853.         set IpxSelected = 1
  4854.     else
  4855.         set IpxSelected = 0
  4856.     endif
  4857.     ifstr(i) $($3) == TRUE
  4858.         set NetbeuiAllowed = 1
  4859.     else
  4860.         set NetbeuiAllowed = 0
  4861.     endif
  4862.     ifstr(i) $($4) == TRUE
  4863.         set TcpIpAllowed = 1
  4864.     else
  4865.         set TcpIpAllowed = 0
  4866.     endif
  4867.     ifstr(i) $($5) == TRUE
  4868.         set IpxAllowed = 1
  4869.     else
  4870.         set IpxAllowed = 0
  4871.     endif
  4872.     set RasKeyName =  $(!NTN_SoftwareBase)"\Microsoft\Ras"
  4873.     set RasProtocolName =  $(!NTN_SoftwareBase)"\Microsoft\Ras\Protocols"
  4874.     OpenRegKey $(!REG_H_LOCAL) "" $(RasProtocolName) $(!MAXIMUM_ALLOWED) RasProtocolKey
  4875.     ifstr $(RasProtocolKey) == $(KeyNull)
  4876.         OpenRegKey $(!REG_H_LOCAL) "" $(RasKeyName) $(!MAXIMUM_ALLOWED) RasKey
  4877.         CreateRegKey $(RasKey) {"Protocols",0,GenericClass} "" $(!MAXIMUM_ALLOWED) "" RasProtocolKey
  4878.         OpenRegKey $(RasKey) "" "Protocols" $(!MAXIMUM_ALLOWED) RasProtocolKey
  4879.         CloseRegKey $(RasKey)
  4880.     endif
  4881.     ifstr $(RasProtocolKey) != $(KeyNull)
  4882.         SetRegValue $(RasProtocolKey) {fNetbeuiSelected, 0,+
  4883.                                        $(!REG_VT_DWORD),$(NetbeuiSelected)}
  4884.         SetRegValue $(RasProtocolKey) {fTcpIpSelected, 0,+
  4885.                                        $(!REG_VT_DWORD),$(TcpIpSelected)}
  4886.         SetRegValue $(RasProtocolKey) {fIpxSelected, 0,+
  4887.                                        $(!REG_VT_DWORD),$(IpxSelected)}
  4888.         SetRegValue $(RasProtocolKey) {fNetbeuiAllowed, 0,+
  4889.                                        $(!REG_VT_DWORD),$(NetbeuiAllowed)}
  4890.         SetRegValue $(RasProtocolKey) {fTcpIpAllowed, 0,+
  4891.                                        $(!REG_VT_DWORD),$(TcpIpAllowed)}
  4892.         SetRegValue $(RasProtocolKey) {fIpxAllowed, 0,+
  4893.                                        $(!REG_VT_DWORD),$(IpxAllowed)}
  4894.         CloseRegKey $(RasProtocolKey)
  4895.         set Status = STATUS_SUCCESSFUL
  4896.     else
  4897.         Debug-Output "error opening Ras\protocols key"
  4898.     endif
  4899.     Debug-Output "SaveSelectedProtocols exit."
  4900.     return $(Status)
  4901. [QuerySelectedProtocols]
  4902.     Debug-Output "QuerySelectedProtocols: entry"
  4903.     set Status   = STATUS_FAILED
  4904.     Set KeyNull  = ""
  4905.     set fNetbeuiSelected = FALSE
  4906.     set fTcpIpSelected   = FALSE
  4907.     set fIpxSelected     = FALSE
  4908.     set fNetbeuiAllowed  = FALSE
  4909.     set fTcpIpAllowed    = FALSE
  4910.     set fIpxAllowed      = FALSE
  4911.     set NetbeuiSelected  = {}
  4912.     set TcpIpSelected    = {}
  4913.     set IpxSelected      = {}
  4914.     set NetbeuiAllowed  = {}
  4915.     set TcpIpAllowed    = {}
  4916.     set IpxAllowed      = {}
  4917.     set RasKeyName =  $(!NTN_SoftwareBase)"\Microsoft\Ras\Protocols"
  4918.     OpenRegKey $(!REG_H_LOCAL) "" $(RasKeyName) $(!MAXIMUM_ALLOWED) RasKey
  4919.     ifstr $(RasKey) != $(KeyNull)
  4920.         GetRegValue $(RasKey), "fNetbeuiSelected", NetbeuiSelected
  4921.         ifint *($(NetbeuiSelected), 4) == 1
  4922.             set fNetbeuiSelected = TRUE
  4923.         else
  4924.             set fNetbeuiSelected = FALSE
  4925.         endif
  4926.         GetRegValue $(RasKey), "fTcpIpSelected", TcpIpSelected
  4927.         ifint *($(TcpIpSelected), 4) == 1
  4928.             set fTcpIpSelected = TRUE
  4929.         else
  4930.             set fTcpIpSelected = FALSE
  4931.         endif
  4932.         GetRegValue $(RasKey), "fIpxSelected", IpxSelected
  4933.         ifint *($(IpxSelected), 4) == 1
  4934.             set fIpxSelected = TRUE
  4935.         else
  4936.             set fIpxSelected = FALSE
  4937.         endif
  4938.         GetRegValue $(RasKey), "fNetbeuiAllowed", NetbeuiAllowed
  4939.         ifint *($(NetbeuiAllowed), 4) == 1
  4940.             set fNetbeuiAllowed = TRUE
  4941.         else
  4942.             set fNetbeuiAllowed = FALSE
  4943.         endif
  4944.         GetRegValue $(RasKey), "fTcpIpAllowed", TcpIpAllowed
  4945.         ifint *($(TcpIpAllowed), 4) == 1
  4946.             set fTcpIpAllowed = TRUE
  4947.         else
  4948.             set fTcpIpAllowed = FALSE
  4949.         endif
  4950.         GetRegValue $(RasKey), "fIpxAllowed", IpxAllowed
  4951.         ifint *($(IpxAllowed), 4) == 1
  4952.             set fIpxAllowed = TRUE
  4953.         else
  4954.             set fIpxAllowed = FALSE
  4955.         endif
  4956.         CloseRegKey $(RasKey)
  4957.         set Status = STATUS_SUCCESSFUL
  4958.     else
  4959.         Debug-Output "error opening Ras\protocols key"
  4960.     endif
  4961.     Debug-Output "QuerySelectedProtocols: exit"
  4962.     return $(Status) $(fNetbeuiSelected) $(fTcpIpSelected) $(fIpxSelected) +
  4963.                      $(fNetbeuiAllowed) $(fTcpIpAllowed) $(fIpxAllowed)
  4964. [UpdateSelectedProtocols]
  4965.     Debug-Output "UpdateSelectedProtocols: entry"
  4966.     set Status   = STATUS_FAILED
  4967.     Shell "" QuerySelectedProtocols
  4968.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4969.         Debug-Output "error shelling QuerySelectedProtocols."
  4970.         goto UpdateSelectedProtocolsEnd
  4971.     endif
  4972.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  4973.         Debug-Output "error returned by QuerySelectedProtocols."
  4974.         goto UpdateSelectedProtocolsEnd
  4975.     endif
  4976.     set fNetbeuiSelected = $($R1)
  4977.     set fTcpIpSelected   = $($R2)
  4978.     set fIpxSelected     = $($R3)
  4979.     set fNetbeuiAllowed = $($R4)
  4980.     set fTcpIpAllowed   = $($R5)
  4981.     set fIpxAllowed     = $($R6)
  4982.     Debug-Output "UpdateSelectedProtocols: Selected protocols NBF IP IPX "$(fNetbeuiSelected)" "$(fTcpIpSelected)" "$(fIpxSelected)
  4983.     shell "" QueryInstalledProtocols
  4984.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4985.         Debug-Output "error shelling QueryInstalledProtocols."
  4986.         goto UpdateSelectedProtocolsEnd
  4987.     endif
  4988.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  4989.         Debug-Output "error returned by QueryInstalledProtocols."
  4990.         goto UpdateSelectedProtocolsEnd
  4991.     endif
  4992.     set fNetbeuiInstalled = $($R1)
  4993.     set fTcpIpInstalled   = $($R2)
  4994.     set fIpxInstalled     = $($R3)
  4995.     Debug-Output "UpdateSelectedProtocols: Installed Protocols NBF IP IPX "$(fNetbeuiInstalled)" "$(fTcpIpInstalled)" "$(fIpxInstalled)
  4996.     set fNetbeuiSelectedNew = $(fNetbeuiSelected)
  4997.     set fTcpIpSelectedNew   = $(fTcpIpSelected)
  4998.     set fIpxSelectedNew     = $(fIpxSelected)
  4999.     set fNetbeuiAllowedNew = $(fNetbeuiAllowed)
  5000.     set fTcpIpAllowedNew   = $(fTcpIpAllowed)
  5001.     set fIpxAllowedNew     = $(fIpxAllowed)
  5002.     ifstr(i) $(fNetbeuiSelectedNew) == TRUE
  5003.         set fNetbeuiChosen = TRUE
  5004.     else
  5005.         set fNetbeuiChosen = $(fNetbeuiAllowedNew)
  5006.     endif
  5007.     ifstr(i) $(fTcpIpSelectedNew) == TRUE
  5008.         set fTcpIpChosen = TRUE
  5009.     else
  5010.         set fTcpIpChosen = $(fTcpIpAllowedNew)
  5011.     endif
  5012.     ifstr(i) $(fIpxSelectedNew) == TRUE
  5013.         set fIpxChosen = TRUE
  5014.     else
  5015.         set fIpxChosen = $(fIpxAllowedNew)
  5016.     endif
  5017.     ifstr(i) $(fNetbeuiInstalled) == FALSE
  5018.         set fNetbeuiSelectedNew = FALSE
  5019.         set fNetbeuiAllowedNew = FALSE
  5020.     endif
  5021.     ifstr(i) $(fTcpIpInstalled) == FALSE
  5022.         set fTcpIpSelectedNew = FALSE
  5023.         set fTcpIpAllowedNew = FALSE
  5024.     endif
  5025.     ifstr(i) $(fIpxInstalled) == FALSE
  5026.         set fIpxSelectedNew = FALSE
  5027.         set fIpxAllowedNew = FALSE
  5028.     endif
  5029.     ifstr(i) $(fNetbeuiSelectedNew) == $(fNetbeuiSelected)
  5030.       ifstr(i) $(fTcpIpSelectedNew) == $(fTcpIpSelected)
  5031.         ifstr(i) $(fIpxSelectedNew) == $(fIpxSelected)
  5032.           ifstr(i) $(fNetbeuiAllowedNew) == $(fNetbeuiAllowed)
  5033.             ifstr(i) $(fTcpIpAllowedNew) == $(fTcpIpAllowed)
  5034.               ifstr(i) $(fIpxAllowedNew) == $(fIpxAllowed)
  5035.                 set Status = STATUS_SUCCESSFUL
  5036.                 Debug-Output "UpdateSelectedProtocols: Nothing changed"
  5037.                 goto UpdateSelectedProtocolsEnd
  5038.               endif
  5039.             endif
  5040.           endif
  5041.         endif
  5042.       endif
  5043.     endif
  5044.     Shell "" SaveSelectedProtocols $(fNetbeuiSelectedNew) $(fTcpIpSelectedNew) +
  5045.                                    $(fIpxSelectedNew) $(fNetbeuiAllowedNew) +
  5046.                                    $(fTcpIpAllowedNew) $(fIpxAllowedNew)
  5047.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  5048.         Debug-Output "error shelling SaveSelectedProtocols."
  5049.         goto UpdateSelectedProtocolsEnd
  5050.     endif
  5051.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  5052.         Debug-Output "error returned by SaveSelectedProtocols."
  5053.         goto UpdateSelectedProtocolsEnd
  5054.     endif
  5055.     ifstr(i) $(fNetbeuiSelectedNew) == TRUE
  5056.         set fNetbeuiChosen = TRUE
  5057.     else
  5058.         set fNetbeuiChosen = $(fNetbeuiAllowedNew)
  5059.     endif
  5060.     ifstr(i) $(fTcpIpSelectedNew) == TRUE
  5061.         set fTcpIpChosen = TRUE
  5062.     else
  5063.         set fTcpIpChosen = $(fTcpIpAllowedNew)
  5064.     endif
  5065.     ifstr(i) $(fIpxSelectedNew) == TRUE
  5066.         set fIpxChosen = TRUE
  5067.     else
  5068.         set fIpxChosen = $(fIpxAllowedNew)
  5069.     endif
  5070.     Shell "" UpdateNetCardInfo $(fNetbeuiChosen) $(fTcpIpChosen) +
  5071.                                $(fIpxChosen)
  5072.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  5073.         Debug-Output "error shelling UpdateNetCardInfo."
  5074.         goto UpdateSelectedProtocolsEnd
  5075.     endif
  5076.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  5077.         Debug-Output "error returned by UpdateNetCardInfo."
  5078.         goto UpdateSelectedProtocolsEnd
  5079.     endif
  5080.     set Status = STATUS_SUCCESSFUL
  5081.     ifstr(i) $(fNetbeuiAllowedNew) == FALSE
  5082.         Debug-Output "UpdateSelectedProtocols: Removing RemoteAccess NBF dependency"
  5083.         Shell "" RemoveServiceDependency "RemoteAccess" "NBF"
  5084.     endif
  5085.     ifstr(i) $(fTcpIpChosen) == FALSE
  5086.         Debug-Output "UpdateSelectedProtocols: Removing RasArp service"
  5087.         shell "" RemoveRasArpService
  5088.     endif
  5089.     ifstr(i) $(fIpxAllowedNew) == FALSE
  5090.         Debug-Output "UpdateSelectedProtocols: Removing IPX router and SAP"
  5091.         shell "" RemoveNwlnkRipService
  5092.         shell "" RemoveIsnSapService
  5093.         Shell "" RemoveServiceDependency "RemoteAccess" "NWLNKIPX"
  5094.         ifstr(i) $($R0) == STATUS_FAILED
  5095.             Debug-Output "UpdateSelectedProtocols: error removing service dependency of RemoteAccess on NWLNKIPX"
  5096.         endif
  5097.     endif
  5098. UpdateSelectedProtocolsEnd = +
  5099.     Debug-Output "UpdateSelectedProtocols: exit"
  5100.     return $(Status) $(fNetbeuiChosen) $(fTcpIpChosen) $(fIpxChosen)
  5101. [UpgradeIsdnInfo]
  5102.     Debug-Output "UpgradeIsdnInfo entry."
  5103.     set Status   = STATUS_FAILED
  5104.     Set KeyNull  = ""
  5105.     set RasKeyName      =  $(!NTN_SoftwareBase)"\Microsoft\Ras"
  5106.     set TapiName        =  $(!NTN_SoftwareBase)"\Microsoft\Ras\Tapi Devices"
  5107.     set RasIsdnName     =  $(!NTN_SoftwareBase)"\Microsoft\Ras\MEDIA\ISDN"
  5108.     set RasManParamName =  $(!NTN_ServiceBase)"\RasMan\Parameters"
  5109.     set PcimacName      =  "HARDWARE\DEVICEMAP\TAPI DEVICES\PCIMAC"
  5110.     set KeyIsdn = $(KeyNull)
  5111.     OpenRegKey $(!REG_H_LOCAL) "" $(RasIsdnName) $(!MAXIMUM_ALLOWED) KeyIsdn
  5112.     ifstr $(KeyIsdn) != $(KeyNull)
  5113.         EnumRegKey $(KeyIsdn) PortList
  5114.         ifint $(RegLastError) != 0
  5115.             Debug-Output "UpgradeIsdnInfo: error enumerating MEDIAS\ISDN key."
  5116.             CloseRegKey $(KeyIsdn)
  5117.             set Status = STATUS_SUCCESSFUL
  5118.             goto UpgradeIsdnInfoEnd
  5119.         endif
  5120.         QueryListSize IsdnPorts $(PortList)
  5121.         ifint $(IsdnPorts) == 0
  5122.             set Status = STATUS_SUCCESSFUL
  5123.             CloseRegKey $(KeyIsdn)
  5124.             goto UpgradeIsdnInfoEnd
  5125.         endif
  5126.         set MediaType = "ISDN"
  5127.         set Addresses = {}
  5128.         OpenRegKey $(!REG_H_LOCAL) "" $(PcimacName) +
  5129.                                                $(!MAXIMUM_ALLOWED) KeyPcimac
  5130.         ifstr $(KeyPcimac) != $(KeyNull)
  5131.             GetRegValue $(KeyPcimac), "Address", AddressList
  5132.             ifint $(RegLastError) == 0
  5133.                 set Addresses = *($(AddressList), 4)
  5134.             endif
  5135.             GetRegValue $(KeyPcimac), "Media Type", MediaValue
  5136.             ifint $(RegLastError) == 0
  5137.                 set MediaType = *($(MediaValue), 4)
  5138.             endif
  5139.             CloseRegKey $(KeyPcimac)
  5140.         else
  5141.             Debug-Output "UpgradeIsdnInfo: error opening DEVICEMAP\TAPI DEVICES\PCIMAC key."
  5142.             CloseRegKey $(KeyIsdn)
  5143.             goto UpgradeIsdnInfoEnd
  5144.         endif
  5145.         set AddressList = {}
  5146.         set NameList    = {}
  5147.         set UsageList   = {}
  5148.         set index = 1
  5149.         forlistdo $(PortList)
  5150.            set Address =  *($(Addresses), $(index))
  5151.            set-add index = $(index) , 1
  5152.            set AddressList = >($(AddressList), $(Address))
  5153.            set PortName = *($($), 1)
  5154.            set NameList = >($(NameList), Pcimac$(PortName))
  5155.            OpenRegKey $(KeyIsdn) "" $(PortName) $(!MAXIMUM_ALLOWED) KeyPort
  5156.            ifstr $(KeyPort) != $(KeyNull)
  5157.              GetRegValue $(KeyPcimac), "Usage", UsageValue
  5158.              ifint $(RegLastError) == 0
  5159.                  set Usage = *($(UsageValue), 4)
  5160.                  set UsageList = >($(UsageList), $(Usage))
  5161.              else
  5162.                 Debug-Output "UpgradeIsdnInfo: error reading usage "$(PortName)
  5163.                 set UsageList = >($(UsageList), "Client")
  5164.              endif
  5165.              CloseRegKey $(KeyPort)
  5166.            else
  5167.              Debug-Output "UpgradeIsdnInfo: error opening key "$(PortName)
  5168.              set UsageList = >($(UsageList), "Client")
  5169.            endif
  5170.         endforlistdo
  5171.         set KeyTapi = $(KeyNull)
  5172.         CreateRegKey $(!REG_H_LOCAL) +
  5173.                  {$(TapiName),$(NoTitle),GenericClass}  +
  5174.                   "" $(!MAXIMUM_ALLOWED) "" KeyTapi
  5175.         ifstr $(KeyTapi) != $(KeyNull)
  5176.             CreateRegKey $(KeyTapi) +
  5177.                  {"Pcimac" ,$(NoTitle),GenericClass} +
  5178.                  "" $(!MAXIMUM_ALLOWED) "" KeyPcimac
  5179.             ifstr $(KeyPcimac) != $(KeyNull)
  5180.                 Debug-Output "UpgradeIsdnInfo: MediaType "$(MediaType)
  5181.                 Debug-Output "UpgradeIsdnInfo: Addresses "$(AddressList)
  5182.                 Debug-Output "UpgradeIsdnInfo: Names  "$(NameList)
  5183.                 Debug-Output "UpgradeIsdnInfo: Usage  "$(UsageList)
  5184.                 SetRegValue $(KeyPcimac) {"Media Type", 0, +
  5185.                                    $(!REG_VT_SZ),$(MediaType)}
  5186.                 SetRegValue $(KeyPcimac) {"Address", 0, +
  5187.                                    $(!REG_VT_MULTI_SZ),$(AddressList)}
  5188.                 SetRegValue $(KeyPcimac) {"Friendly Name", 0, +
  5189.                                    $(!REG_VT_MULTI_SZ),$(NameList)}
  5190.                 SetRegValue $(KeyPcimac) {"Usage", 0, +
  5191.                                    $(!REG_VT_MULTI_SZ),$(UsageList)}
  5192.                 CloseRegKey $(KeyPcimac)
  5193.             else
  5194.                 Debug-Output "UpgradeIsdnInfo: error creating RAS\TAPI DEVICES\Pcimac key"
  5195.             endif
  5196.         else
  5197.              Debug-Output "UpgradeIsdnInfo: error creating RAS\TAPI DEVICES key"
  5198.         endif
  5199.         CloseRegKey $(KeyIsdn)
  5200.         OpenRegKey $(!REG_H_LOCAL) "" $(RasKeyName) +
  5201.                                       $(!MAXIMUM_ALLOWED) KeyRas
  5202.         ifstr $(KeyRas) != $(KeyNull)
  5203.             DeleteRegTree $(KeyRas) "Media"
  5204.             CloseRegKey $(KeyRas)
  5205.         endif
  5206.         set KeyRasman = $(KeyNull)
  5207.         OpenRegKey $(!REG_H_LOCAL) "" $(RasManParamName) +
  5208.                                       $(!MAXIMUM_ALLOWED) KeyRasman
  5209.         ifstr $(KeyRasman) != $(KeyNull)
  5210.            GetRegValue $(KeyRasman), "Medias", MediaList
  5211.            ifint $(RegLastError) == 0
  5212.                set Medias = *($(MediaList), 4)
  5213.            else
  5214.                Debug-Output "UpgradeIsdnInfo: error reading Medias value "
  5215.            endif
  5216.            set NewMedias = {}
  5217.            forlistdo $(Medias)
  5218.                ifstr(i) $($) != "ISDN"
  5219.                   set NewMedias = >($(NewMedias), $($))
  5220.                endif
  5221.            endforlistdo
  5222.            set NewMedias = >($(NewMedias), "rastapi")
  5223.            Debug-Output "UpgradeIsdnInfo: NewMedias "$(NewMedias)
  5224.            SetRegValue $(KeyRasman) {"Medias", 0, +
  5225.                                    $(!REG_VT_MULTI_SZ),$(NewMedias)}
  5226.            CloseRegKey $(KeyRasman)
  5227.         else
  5228.           Debug-Output "UpgradeIsdnInfo: error opening Services\Rasman\Parameters key"
  5229.           goto UpgradeIsdnInfoEnd
  5230.         endif
  5231.         set Status = STATUS_SUCCESSFUL
  5232.     else
  5233.         set Status = STATUS_SUCCESSFUL
  5234.     endif
  5235. UpgradeIsdnInfoEnd = +
  5236.     Debug-Output "UpgradeIsdnInfo exit."
  5237.     return $(Status)
  5238. [UpdateNetCardInfo]
  5239.     Debug-Output "UpdateNetCardInfo: entry"
  5240.     set Status   = STATUS_FAILED
  5241.     Set KeyNull  = ""
  5242.     set fNetbeuiChosen = $($0)
  5243.     set fTcpIpChosen   = $($1)
  5244.     set fIpxChosen     = $($2)
  5245.     set RasAsyMacParamKeyName = $(!NTN_ServiceBase)"\AsyncMac\Parameters"
  5246.     OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) KeyNetcards
  5247.     ifstr $(KeyNetcards) == $(KeyNull)
  5248.          Debug-Output "UpdateNetCardInfo: could not open Netcards key"
  5249.          goto UpdateNetCardInfoEnd
  5250.     endif
  5251.     EnumRegKey $(KeyNetcards) NetcardsList
  5252.     set RemoveList  = {}
  5253.     ForListDo $(NetcardsList)
  5254.        set KeyName = *($($),1)
  5255.        OpenRegKey $(KeyNetcards) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  5256.        ifstr $(Card) == $(KeyNull)
  5257.            Debug-Output "OEMNSVRA.INF: could not open netcard key"
  5258.            CloseRegKey $(KeyNetcards)
  5259.            goto UpdateNetCardInfoEnd
  5260.        endif
  5261.        GetRegValue $(Card), "ProductName" ProductNameInfo
  5262.        set CardProductName = *($(ProductNameInfo), 4)
  5263.        ifstr(i) $(fNetbeuiChosen) == FALSE
  5264.        ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINName)
  5265.               set RemoveList = >($(RemoveList), +
  5266.                  {$(!ProductNDISWANName),+
  5267.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  5268.        else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTName)
  5269.               set RemoveList = >($(RemoveList), +
  5270.                  {$(!ProductNDISWANName),+
  5271.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  5272.            endif
  5273.        endif
  5274.        ifstr(i) $(fTcpIpChosen) == FALSE
  5275.        ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINIPName)
  5276.               set RemoveList = >($(RemoveList), +
  5277.                  {$(!ProductNDISWANName),+
  5278.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  5279.        else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTIPName)
  5280.               set RemoveList = >($(RemoveList), +
  5281.                  {$(!ProductNDISWANName),+
  5282.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  5283.            endif
  5284.        endif
  5285.        ifstr(i) $(fIpxChosen) == FALSE
  5286.        ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINOUTIPXName)
  5287.               set RemoveList = >($(RemoveList), +
  5288.                  {$(!ProductNDISWANName),+
  5289.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  5290.            endif
  5291.        endif
  5292.        CloseRegKey $(Card)
  5293.     EndForListDo
  5294.     CloseRegKey $(KeyNetcards)
  5295.     QueryListSize NetCards $(RemoveList)
  5296.     ifint $(NetCards) != 0
  5297.         ForListDo  $(RemoveList)
  5298.             debug-output "Removing hardware component: "$($)
  5299.             Shell "utility.inf", RemoveHardwareComponent, +
  5300.                                  $(!Manufacturer), *($($),1), *($($),2)
  5301.         EndForListDo
  5302.     endif
  5303.     OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacParamKeyName) $(!MAXIMUM_ALLOWED) KeyMacParams
  5304.     ifstr $(KeyMacParams) == $(KeyNull)
  5305.        Debug-Output "UpdateNetCardInfo: could not open AsyncMac Params key"
  5306.        goto UpdateNetCardInfoEnd
  5307.     endif
  5308.     set NewValueList = {}
  5309.     ifstr(i) $(fNetbeuiChosen) == FALSE
  5310.         set NewValueList =  >($(NewValueList), +
  5311.                              {DialinNBF, $(NoTitle), $(!REG_VT_DWORD), 0})
  5312.         set NewValueList = >($(NewValueList), +
  5313.                              {DialoutNBF, $(NoTitle), $(!REG_VT_DWORD), 0})
  5314.     endif
  5315.     ifstr(i) $(fTcpIpChosen) == FALSE
  5316.         set NewValueList = >($(NewValueList), +
  5317.                             {DialinIP, $(NoTitle), $(!REG_VT_DWORD), 0 })
  5318.         set NewValueList = >($(NewValueList), +
  5319.                             {DialoutIP, $(NoTitle), $(!REG_VT_DWORD), 0 })
  5320.     endif
  5321.     ifstr(i) $(fIpxChosen) == FALSE
  5322.         set NewValueList = >($(NewValueList), +
  5323.                             {DialinoutIPX, $(NoTitle), $(!REG_VT_DWORD), 0})
  5324.     endif
  5325.     Shell  "utility.inf", AddValueList, $(KeyMacParams), $(NewValueList)
  5326.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  5327.          Debug-Output "UpdateNetCardInfo:AddValueList bombed out"
  5328.          goto UpdateNetCardInfoEnd
  5329.     endif
  5330.     set RegistryErrorIndex = $($R0)
  5331.     CloseRegKey $(KeyMacParams)
  5332.     Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  5333.         goto UpdateNetCardInfoEnd
  5334.     endif
  5335.     set Status = STATUS_SUCCESSFUL
  5336. UpdateNetCardInfoEnd =+
  5337.     Debug-Output "UpdateNetcardInfo: Exit"
  5338.     return $(Status)
  5339. [UpdateNdisWanInfo]
  5340.     Debug-Output "UpdateNdisWanNetInfo: entry"
  5341.     set Status   = STATUS_FAILED
  5342.     Set KeyNull  = ""
  5343.     set NdisWanName = $(!NTN_SoftwareBase)"\Microsoft\NdisWan\CurrentVersion"
  5344.     set NdisWanRulesName = $(!NTN_SoftwareBase)"\Microsoft\NdisWan\CurrentVersion\NetRules"
  5345.     set NdisWanSvcName = $(!NTN_ServiceBase)"\NdisWan"
  5346.     set RasManLinkageName = $(!NTN_ServiceBase)"\RasMan\Linkage"
  5347.     OpenRegKey $(!REG_H_LOCAL) "" $(NdisWanName) $(!MAXIMUM_ALLOWED) KeyNdisWan
  5348.     ifstr $(KeyNdisWan) != $(KeyNull)
  5349.         SetRegValue $(KeyNdisWan) {Description, 0, +
  5350.                 $(!REG_VT_SZ),$(!ProductNDISWANDescription)}
  5351.         SetRegValue $(KeyNdisWan) {PathName, 0, +
  5352.                 $(!REG_VT_SZ),$(!ProductNDISWANImagePath)}
  5353.         SetRegValue $(KeyNdisWan) {ServiceName, 0, +
  5354.                 $(!REG_VT_SZ),$(!ProductNDISWANName)}
  5355.         SetRegValue $(KeyNdisWan) {Title, 0, +
  5356.                 $(!REG_VT_SZ),$(!ProductNDISWANTitle)}
  5357.         CloseRegKey $(KeyNdisWan)
  5358.     else
  5359.         Debug-Output "UpdateNdisWanInfo: could not open NdisWan key"
  5360.     endif
  5361.     OpenRegKey $(!REG_H_LOCAL) "" $(NdisWanRulesName) $(!MAXIMUM_ALLOWED) KeyRules
  5362.     ifstr $(KeyRules) != $(KeyNull)
  5363.         SetRegValue $(KeyRules) {bindable, 0, +
  5364.                 $(!REG_VT_MULTI_SZ),$(!NetRuleNDISWANBindable)}
  5365.         SetRegValue $(KeyRules) {bindform, 0, +
  5366.                 $(!REG_VT_SZ),$(!NetRuleNDISWANBindForm)}
  5367.         SetRegValue $(KeyRules) {class, 0, +
  5368.                 $(!REG_VT_MULTI_SZ),$(!NetRuleNDISWANClass)}
  5369.         SetRegValue $(KeyRules) {type, 0, +
  5370.                 $(!REG_VT_SZ),$(!NetRuleNDISWANType)}
  5371.         SetRegValue $(KeyRules) {InfOption, 0, +
  5372.                 $(!REG_VT_SZ), "NDISWAN"}
  5373.         CloseRegKey $(KeyRules)
  5374.     else
  5375.         Debug-Output "UpdateNdisWanInfo: could not open NdisWan NetRules key"
  5376.     endif
  5377.     OpenRegKey $(!REG_H_LOCAL) "" $(NdisWanSvcName) $(!MAXIMUM_ALLOWED) KeyService
  5378.     ifstr $(KeyService) != $(KeyNull)
  5379.         SetRegValue $(KeyService) {DisplayName, 0, +
  5380.                 $(!REG_VT_SZ),$(!ProductNDISWANDisplayName)}
  5381.         SetRegValue $(KeyService) {ImagePath, 0, +
  5382.                 $(!REG_VT_EXPAND_SZ),$(!ProductNDISWANImagePath)}
  5383.         SetRegValue $(KeyService) {Start, 0, $(!REG_VT_DWORD),2}
  5384.         SetRegValue $(KeyService) {Group, 0, $(!REG_VT_SZ), "NDISWAN"}
  5385.         DeleteRegValue $(KeyService) "DependOnService"
  5386.         DeleteRegValue $(KeyService) "DependOnGroup"
  5387.         OpenRegKey $(KeyService) "" "Linkage" $(!MAXIMUM_ALLOWED) KeyLinkage
  5388.         ifstr $(KeyLinkage) != $(KeyNull)
  5389.             DeleteRegValue $(KeyLinkage) "OtherDependencies"
  5390.             CloseRegKey $(KeyLinkage)
  5391.         endif
  5392.         CloseRegKey $(KeyService)
  5393.     else
  5394.         Debug-Output "UpdateNdisWanInfo: could not open NdisWan services key"
  5395.     endif
  5396.     Shell "" RemoveServiceDependency "RasMan" "RasHub"
  5397.     set Status   = STATUS_SUCCESSFUL
  5398. UpdateNdisWanInfoEnd =+
  5399.     Debug-Output "UpdateNdisWanInfo: Exit"
  5400.     return $(Status)
  5401. [UpdateAsyncMacNetRules]
  5402.     Debug-Output "UpdateAsyncMacNetRules: entry"
  5403.     set Status   = STATUS_FAILED
  5404.     Set KeyNull  = ""
  5405.     set AsyncMacRulesName = $(!NTN_SoftwareBase)"\Microsoft\AsyncMac\CurrentVersion\NetRules"
  5406.     OpenRegKey $(!REG_H_LOCAL) "" $(AsyncMacRulesName) $(!MAXIMUM_ALLOWED) KeyRules
  5407.     ifstr $(KeyRules) != $(KeyNull)
  5408.         set Status   = STATUS_SUCCESSFUL
  5409.         SetRegValue $(KeyRules) {bindable, 0, +
  5410.                 $(!REG_VT_MULTI_SZ),$(!NetRuleRASASYMACBindable)}
  5411.         CloseRegKey $(KeyRules)
  5412.     else
  5413.         Debug-Output "UpdateAsyncMacNetRules: could not open NdisWan NetRules key"
  5414.     endif
  5415.     Debug-Output "UpdateAsyncMacNetRules: Exit"
  5416.     return $(Status)
  5417. [UpdateAsyncMacParameters]
  5418.     Debug-Output "UpdateAsyncMacParameters: entry"
  5419.     set Status   = STATUS_SUCCESSFUL
  5420.     Set KeyNull  = ""
  5421.     set RasAsyMacParamKeyName = $(!NTN_ServiceBase)"\AsyncMac\Parameters"
  5422.     OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacParamKeyName) $(!MAXIMUM_ALLOWED) KeyMacParams
  5423.     ifstr $(KeyMacParams) != $(KeyNull)
  5424.         GetRegValue $(KeyMacParams), "DialinNBF" DialinNBFInfo
  5425.         Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  5426.             GetRegValue $(KeyMacParams), "Dialin" DialinNBFInfo
  5427.             set PrevNumDialinNBF  = *($(DialinNBFInfo), 4)
  5428.             SetRegValue $(KeyMacParams) {DialinNBF, 0, +
  5429.                                         $(!REG_VT_DWORD),$(PrevNumDialinNBF)}
  5430.             Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  5431.                 Debug-Output "UpdateAsyncMacParameters: deleting dialin key"
  5432.                 DeleteRegValue $(KeyMacParams) "Dialin"
  5433.             endif
  5434.         endif
  5435.         GetRegValue $(KeyMacParams), "DialoutNBF" DialoutNBFInfo
  5436.         Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  5437.             GetRegValue $(KeyMacParams), "Dialout" DialoutNBFInfo
  5438.             set PrevNumDialoutNBF    = *($(DialoutNBFInfo), 4)
  5439.             SetRegValue $(KeyMacParams) {DialoutNBF, 0, +
  5440.                                         $(!REG_VT_DWORD),$(PrevNumDialoutNBF)}
  5441.             Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  5442.                 Debug-Output "UpdateAsyncMacParameters: deleting dialout key"
  5443.                 DeleteRegValue $(KeyMacParams) "Dialout"
  5444.             endif
  5445.         endif
  5446.         CloseRegKey $(KeyMacParams)
  5447.     else
  5448.         Debug-Output "OEMNSVRA.INF: could not open AsyncMac Params key"
  5449.     endif
  5450.     Debug-Output "UpdateAsyncMacParameters: Exit"
  5451.     return $(Status)
  5452. [UpdateAsyncMacStartType]
  5453.     Debug-Output "UpdateAsyncMacStartType: entry"
  5454.     set Status   = STATUS_SUCCESSFUL
  5455.     Set KeyNull  = ""
  5456.     set RasAsyMacKeyName = $(!NTN_ServiceBase)"\AsyncMac"
  5457.     OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacKeyName) $(!MAXIMUM_ALLOWED) KeyMac
  5458.     ifstr $(KeyMac) != $(KeyNull)
  5459.         GetRegValue $(KeyMac), "Start" StartValue
  5460.         Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  5461.             set Start = *($(StartValue), 4)
  5462.             ifint $(Start) == 3
  5463.                 set Start = 2
  5464.                 SetRegValue $(KeyMac) {Start, 0, $(!REG_VT_DWORD), $(Start)}
  5465.             endif
  5466.         endif
  5467.         CloseRegKey $(KeyMac)
  5468.     else
  5469.         Debug-Output "OEMNSVRA.INF: could not open AsyncMac key"
  5470.     endif
  5471.     Debug-Output "UpdateAsyncMacStartType: Exit"
  5472.     return $(Status)
  5473. [UpdatePerfmonInfo]
  5474.     Debug-Output "UpdatePerfmonInfo: entry"
  5475.     set Status   = STATUS_FAILED
  5476.     Set KeyNull  = ""
  5477.     set RemoteAccessService = $(!NTN_ServiceBase)"\RemoteAccess"
  5478.     OpenRegKey $(!REG_H_LOCAL) "" $(RemoteAccessService) $(!MAXIMUM_ALLOWED) KeyService
  5479.     ifstr $(KeyService) != $(KeyNull)
  5480.         Shell "" UpdatePerfmonInfoHelper $(KeyService)
  5481.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  5482.             Debug-Output "error shelling UpdatePerfmonInfoHelper."
  5483.             goto UpdatePerfmonInfoEnd
  5484.         endif
  5485.         Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  5486.             Debug-Output "error returned by UpdatePerfmonInfo."
  5487.             goto UpdatePerfmonInfoEnd
  5488.         endif
  5489.         CloseRegKey $(KeyService)
  5490.         set Status = STATUS_SUCCESSFUL
  5491.     else
  5492.         Debug-Output "UpdatePerfmonInfo: error opening RemoteAccess service key"
  5493.     endif
  5494. UpdatePerfmonInfoEnd =+
  5495.     Debug-Output "UpdatePerfmonInfo: Exit"
  5496.     return $(Status)
  5497. [UpdatePerfmonInfoHelper]
  5498.     Debug-Output "UpdatePerfmonInfoHelper: entry"
  5499.     set Status   = STATUS_FAILED
  5500.     Set KeyNull  = ""
  5501.     set ServiceKey = $($0)
  5502.     set KeyPerformance = $(KeyNull)
  5503.     OpenRegKey $(ServiceKey) "" $(!RasPerfKeyName) $(!MAXIMUM_ALLOWED) KeyPerformance
  5504.     ifstr $(KeyPerformance) == $(KeyNull)
  5505.         CreateRegKey $(ServiceKey) {$(!RasPerfKeyName),$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyPerformance
  5506.         OpenRegKey $(ServiceKey) "" $(!RasPerfKeyName) $(!MAXIMUM_ALLOWED) KeyPerformance
  5507.         ifstr $(KeyPerformance) == $(KeyNull)
  5508.             Debug-Output "Error creating Performance key"
  5509.             goto UpdatePerfmonInfoHelperEnd
  5510.         endif
  5511.     endif
  5512.     set NewValueList = +
  5513.          {{Library ,$(NoTitle),$(!REG_VT_SZ),$(!RasPerfLibraryName)},+
  5514.          {Open, $(NoTitle),$(!REG_VT_SZ),$(!RasPerfOpenFunction)},+
  5515.          {Close, $(NoTitle),$(!REG_VT_SZ),$(!RasPerfCloseFunction)},+
  5516.          {Collect, $(NoTitle),$(!REG_VT_SZ),$(!RasPerfCollectFunction)}}
  5517.     Shell  "Utility.Inf", AddValueList, $(KeyPerformance), $(NewValueList)
  5518.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  5519.          Debug-Output "UpdatePerfmonInfoHelper: error shelling AddValueList"
  5520.          goto UpdatePerfmonInfoHelperEnd
  5521.     endif
  5522.     set RegistryErrorIndex = $($R0)
  5523.     Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  5524.         Debug-Output "UpdatePerfmonInfoHelper: AddValueList bombed out"
  5525.         goto UpdatePerfmonInfoHelperEnd
  5526.     endif
  5527.     CloseRegKey $(KeyPerformance)
  5528.     set Status = STATUS_SUCCESSFUL
  5529. UpdatePerfmonInfoHelperEnd =+
  5530.     Debug-Output "UpdatePerfmonInfoHelper: Exit"
  5531.     return $(Status)
  5532. [RenameRasHubToNdisWan]
  5533.     Debug-Output "RenameRasHubToNdisWan: entry"
  5534.     set Status   = STATUS_FAILED
  5535.     Set KeyNull  = ""
  5536.     OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) KeyNetcards
  5537.     ifstr $(KeyNetcards) == $(KeyNull)
  5538.          Debug-Output "RenameRasHubToNdisWan: could not open Netcards key"
  5539.          goto RenameRasHubToNdisWanEnd
  5540.     endif
  5541.     EnumRegKey $(KeyNetcards) NetcardsList
  5542.     ForListDo $(NetcardsList)
  5543.        set KeyName = *($($),1)
  5544.        OpenRegKey $(KeyNetcards) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  5545.        ifstr $(Card) == $(KeyNull)
  5546.            Debug-Output "RenameRasHubToNdisWan: could not open netcard key"
  5547.            CloseRegKey $(KeyNetcards)
  5548.            goto RenameRasHubToNdisWanEnd
  5549.        endif
  5550.        GetRegValue $(Card), "ProductName" ProductNameInfo
  5551.        set CardProductName = *($(ProductNameInfo), 4)
  5552.        ifstr(i) $(CardProductName) == $(!ProductRASHUBDIALINName)
  5553.            set ThisOption = DIALIN
  5554.        else-ifstr(i) $(CardProductName) == $(!ProductRASHUBDIALOUTName)
  5555.            set ThisOption = DIALOUT
  5556.        else-ifstr(i) $(CardProductName) == $(!ProductRASHUBDIALINIPName)
  5557.            set ThisOption = DIALINIP
  5558.        else-ifstr(i) $(CardProductName) == $(!ProductRASHUBDIALOUTIPName)
  5559.            set ThisOption = DIALOUTIP
  5560.        else-ifstr(i) $(CardProductName) == $(!ProductRASHUBDIALINOUTIPXName)
  5561.            set ThisOption = DIALINOUTIPX
  5562.        else
  5563.            goto endloop
  5564.        endif
  5565.        SetRegValue $(Card) {ProductName, 0, +
  5566.                             $(!REG_VT_SZ),$(!ProductNDISWAN$(ThisOption)Name)}
  5567.        SetRegValue $(Card) {Description, 0, +
  5568.                             $(!REG_VT_SZ),$(!ProductNDISWANDescription)}
  5569.        SetRegValue $(Card) {ServiceName, 0, $(!REG_VT_SZ), +
  5570.                             $(!ProductNDISWANName)$(KeyName)}
  5571.        SetRegValue $(Card) {Title, 0, $(!REG_VT_SZ),+
  5572.                             "["$(KeyName)"] "$(!ProductNDISWANTitle)}
  5573.        OpenRegKey $(Card) "" "NetRules" $(!MAXIMUM_ALLOWED) NetRules
  5574.        ifstr $(NetRules) == $(KeyNull)
  5575.            CloseRegKey $(KeyNetCards)
  5576.            CloseRegKey $(Card)
  5577.            Debug-Output "RenameRasHubToNdisWan: could not open "$(KeyName)"\NetRules key"
  5578.            goto RenameRasHubToNdisWanEnd
  5579.        Endif
  5580.        SetRegValue $(NetRules) {InfOption, 0, +
  5581.                             $(!REG_VT_SZ), "NDISWAN"}
  5582.        SetRegValue $(NetRules) {block, 0, +
  5583.                             $(!REG_VT_MULTI_SZ),$(!NetRuleHardware$(ThisOption)Block)}
  5584.        SetRegValue $(NetRules) {class, 0, +
  5585.                             $(!REG_VT_MULTI_SZ),$(!NetRuleHardware$(ThisOption)Class)}
  5586.        SetRegValue $(NetRules) {type, 0, +
  5587.                             $(!REG_VT_SZ),$(!NetRuleHardware$(ThisOption)Type)}
  5588.        Set TempProdName = """"$(!ProductNDISWANName)$(KeyName)""""
  5589.        Set TempBindForm = $(TempProdName)$(!NetRuleHardwareNDISWANBindForm)
  5590.        SetRegValue $(NetRules) {bindform, 0, $(!REG_VT_SZ),$(TempBindForm)}
  5591.        CloseRegKey $(NetRules)
  5592. endloop=+
  5593.        CloseRegKey $(Card)
  5594.     EndForListDo
  5595.     CloseRegKey $(KeyNetcards)
  5596.     set Status = STATUS_SUCCESSFUL
  5597. RenameRasHubToNdisWanEnd =+
  5598.     Debug-Output "RenameRasHubToNdisWan: Exit"
  5599.     return $(Status)
  5600. [UpgradeIpxInfo]
  5601.     Debug-Output "UpgradeIpxInfo: entry"
  5602.     set PORTSDLGHANDLE = $($0)
  5603.     set RasProtocolsName = $(!NTN_SoftwareBase)"\Microsoft\Ras\Protocols"
  5604.     set SapAgentName     = $(!NTN_SoftwareBase)"\Microsoft\NWSAPAGENT"
  5605.     set NwlnkRipName     = $(!NTN_SoftwareBase)"\Microsoft\NWLNKRIP"
  5606.     set IpxRouterName    = $(!NTN_ServiceBase)"\IpxRouter"
  5607.     OpenRegKey $(!REG_H_LOCAL) "" +
  5608.                       $(RasProtocolsName) $(!MAXIMUM_ALLOWED) KeyProtocols
  5609.     ifstr $(KeyProtocols) != ""
  5610.         set fIpxAllowed = 0
  5611.         GetRegValue $(KeyProtocols) "fIpxAllowed" IpxList
  5612.         ifint $(RegLastError) == 0
  5613.             set fIpxAllowed = *($(IpxList), 4)
  5614.         endif
  5615.         ifint $(fIpxAllowed) != 0
  5616.             Debug-Output "UpgradeIpxInfo: RAS is configured for IPX dialin"
  5617.             set KeyRouter = ""
  5618.             OpenRegKey $(!REG_H_LOCAL) "" +
  5619.                       $(IpxRouterName) $(!MAXIMUM_ALLOWED) KeyRouter
  5620.             ifstr $(KeyRouter) !=  ""
  5621.                 CloseRegKey $(KeyRouter)
  5622.                 Debug-Output "Renaming IpxRouter to NwlnkRip..."
  5623.                 LibraryProcedure Result $(PORTSDLGHANDLE) RenameIpxRouterToNwlnkRip
  5624.                 Shell "" RemoveServiceDependency "RemoteAccess" "IpxRouter"
  5625.                 Shell "" AddServiceDependency "RemoteAccess" "NwlnkRip"
  5626.                 Debug-Output "Renaming IpxRouter to NwlnkRip done..."
  5627.             endif
  5628.             OpenRegKey $(!REG_H_LOCAL) "" $(!RasIsnRipKeyName) +
  5629.                                           $(!MAXIMUM_ALLOWED) KeyService
  5630.             ifstr $(KeyService) != ""
  5631.                 OpenRegKey $(KeyService) "" "Parameters" +
  5632.                                         $(!MAXIMUM_ALLOWED) KeyParams
  5633.                 ifstr(i) $(KeyParams) != ""
  5634.                    GetRegValue $(KeyParams) "NetbiosRouting" NetbiosRoutingInfo
  5635.                    Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  5636.                       set NetbiosRouting = *($(NetbiosRoutingInfo), 4)
  5637.                    else
  5638.                       set NetbiosRouting = 2
  5639.                    endif
  5640.                    set NetbiosRouting = *($(NetbiosRoutingInfo), 4)
  5641.                    ifint $(NetbiosRouting) == 0
  5642.                       set NetbiosRouting = 2
  5643.                    else-ifint $(NetbiosRouting) == 1
  5644.                       set NetbiosRouting = 3
  5645.                    endif
  5646.                    SetRegValue $(KeyParams) {"NetbiosRouting" , 0, $(!REG_VT_DWORD), $(NetbiosRouting)}
  5647.                 endif
  5648.                 OpenRegKey $(KeyService) "" "Parameters\UseRef" +
  5649.                                             $(!MAXIMUM_ALLOWED) KeyUseRef
  5650.                 ifstr(i) $(KeyUseRef) == ""
  5651.                     ifstr(i) $(KeyParams) != ""
  5652.                        CreateRegKey $(KeyParams) {"UseRef", 0, GenericClass} +
  5653.                                           "" $(!MAXIMUM_ALLOWED) "" KeyUseRef
  5654.                        CloseRegKey $(KeyParams)
  5655.                     endif
  5656.                 endif
  5657.                 ifstr(i) $(KeyUseRef) != ""
  5658.                     SetRegValue $(KeyUseRef) {"RAS" , 0, $(!REG_VT_SZ), "1"}
  5659.                     CloseRegKey $(KeyUseRef)
  5660.                 endif
  5661.                 CloseRegKey $(KeyService)
  5662.             endif
  5663.             OpenRegKey $(!REG_H_LOCAL) "" $(SapAgentName) +
  5664.                                           $(!MAXIMUM_ALLOWED) KeyService
  5665.             ifstr $(KeyService) == ""
  5666.                 OpenRegKey $(!REG_H_LOCAL) "" $(!RasIsnSapKeyName) +
  5667.                                               $(!MAXIMUM_ALLOWED) KeySap
  5668.                 Ifstr(i) $(KeySap) != ""
  5669.                     Shell "utility.inf", RemoveService +
  5670.                                          $(!ProductRASISNSAPName) "YES"
  5671.                     Shell "" InstallIsnSapService
  5672.                 endif
  5673.                 CloseRegKey $(KeySap)
  5674.             else
  5675.                 CloseRegKey $(KeyService)
  5676.             endif
  5677.             OpenRegKey $(!REG_H_LOCAL) "" $(NwlnkRipName) +
  5678.                                           $(!MAXIMUM_ALLOWED) KeyService
  5679.             ifstr $(KeyService) == ""
  5680.                 OpenRegKey $(!REG_H_LOCAL) "" $(!RasIsnRipKeyName) +
  5681.                                               $(!MAXIMUM_ALLOWED) KeyRip
  5682.                 Ifstr(i) $(KeyRip) != ""
  5683.                     Shell "" InstallNwlnkRipService
  5684.                 CloseRegKey $(KeyRip)
  5685.             else
  5686.                 CloseRegKey $(KeyService)
  5687.             endif
  5688.             OpenRegKey $(!REG_H_LOCAL) ""  +
  5689.                        $(!NTN_ServiceBase)"\NWLNKIPX\Parameters"  +
  5690.                        $(!MAXIMUM_ALLOWED) KeyIpxParameters
  5691.             ifstr $(KeyIpxParameters) != $(KeyNull)
  5692.                 GetRegValue $(KeyIpxParameters), "SingleNetworkActive"  +
  5693.                             SingleNetworkActive
  5694.                 ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  5695.                     SetRegValue $(KeyIpxParameters) +
  5696.                                 {SingleNetworkActive, 0, $(!REG_VT_DWORD), 1}
  5697.                 endif
  5698.                 GetRegValue $(KeyIpxParameters), "DisableDialoutSap"  +
  5699.                             DisableDialoutSap
  5700.                 ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  5701.                     SetRegValue $(KeyIpxParameters) +
  5702.                                 {DisableDialoutSap, 0, $(!REG_VT_DWORD), 1}
  5703.                 endif
  5704.                 GetRegValue $(KeyIpxParameters), "DisableDialinNetbios"  +
  5705.                             DisableDialinNetbios
  5706.                 ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  5707.                     SetRegValue $(KeyIpxParameters) +
  5708.                                 {DisableDialinNetbios, 0, $(!REG_VT_DWORD), 1}
  5709.                 endif
  5710.                 CloseRegKey $(KeyIpxParameters)
  5711.             Endif
  5712.             else
  5713.                 Debug-Output "OEMNSVRA.INF: error opening NWLNKIPX\Parameters key"
  5714.             endif
  5715.         endif
  5716.         CloseRegKey $(KeyProtocols)
  5717.     else
  5718.         Debug-Output "UpgradeIpxInfo: error opening RAS\Protocols key"
  5719.     endif
  5720.     Debug-Output "UpgradeIpxInfo: exit"
  5721.     return
  5722. [SaveTcpipInfo]
  5723.     Debug-Output "SaveTcpipInfo: entry - AddIpInfo = "$($0)
  5724.     set AddTcpInfo = $($0)
  5725.     set Status     = STATUS_FAILED
  5726.     Set KeyNull    = ""
  5727.     set RasIpKeyName =  $(!NTN_SoftwareBase)"\Microsoft\Ras\Protocols\Ip"
  5728.     set RasSvrParamKeyName = $(!NTN_ServiceBase)"\RemoteAccess\Parameters"
  5729.     OpenRegKey $(!REG_H_LOCAL) "" $(RasIpKeyName) $(!MAXIMUM_ALLOWED) RasIpKey
  5730.     ifstr $(RasIpKey) != $(KeyNull)
  5731.         OpenRegKey $(!REG_H_LOCAL) "" $(RasSvrParamKeyName) $(!MAXIMUM_ALLOWED) KeySrvParams
  5732.         ifstr $(KeySrvParams) == $(KeyNull)
  5733.            Debug-Output "SaveTcpipInfo: could not open RasSvr Params key"
  5734.            CloseRegKey $(RasIpKey)
  5735.            return $(Status)
  5736.         endif
  5737.         ifstr(i) $(AddTcpInfo) == TRUE
  5738.             CreateRegKey $(KeySrvParams) {"Ip",$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" RemoteIpKey
  5739.             OpenRegKey $(KeySrvParams) "" "Ip" $(!MAXIMUM_ALLOWED) RemoteIpKey
  5740.             ifstr $(RemoteIpKey) != $(KeyNull)
  5741.                EnumRegValue $(RasIpKey) NewValueList
  5742.                Shell  "utility.inf", AddValueList, $(RemoteIpKey), $(NewValueList)
  5743.                CloseRegKey $(RemoteIpKey)
  5744.             endif
  5745.         else
  5746.             Debug-Output "SaveTpcipInfo: removing ip info"
  5747.             DeleteRegTree $(KeySrvParams) "IP"
  5748.         endif
  5749.         CloseRegKey $(RasIpKey)
  5750.         CloseRegKey $(KeySrvParams)
  5751.     endif
  5752.     Debug-Output "SaveTcpipInfo: exit"
  5753.     set Status = STATUS_SUCCESSFUL
  5754.     return $(Status)
  5755. [SaveIpxInfo]
  5756.     Debug-Output "SaveIpxInfo: entry RouterInstalled= "$($0)" AddIpxInfo = "$($1)
  5757.     set RouterInstalled = $($0)
  5758.     set AddIpxInfo      = $($1)
  5759.     set Status          = STATUS_FAILED
  5760.     Set KeyNull         = ""
  5761.     set RasIpxKeyName =  $(!NTN_SoftwareBase)"\Microsoft\Ras\Protocols\Ipx"
  5762.     set RasSvrParamKeyName = $(!NTN_ServiceBase)"\RemoteAccess\Parameters"
  5763.     OpenRegKey $(!REG_H_LOCAL) "" $(RasIpxKeyName) $(!MAXIMUM_ALLOWED) RasIpxKey
  5764.     ifstr $(RasIpxKey) != $(KeyNull)
  5765.         OpenRegKey $(!REG_H_LOCAL) "" $(RasSvrParamKeyName) +
  5766.                                             $(!MAXIMUM_ALLOWED) KeySrvParams
  5767.         ifstr $(KeySrvParams) == $(KeyNull)
  5768.            Debug-Output "SaveTcpipInfo: could not open RasSvr Params key"
  5769.            CloseRegKey $(RasIpxKey)
  5770.            return $(Status) $(fRouterInstalled)
  5771.         endif
  5772.         ifstr(i) $(AddIpxInfo) == TRUE
  5773.             CreateRegKey $(KeySrvParams) {"Ipx",$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" RemoteIpxKey
  5774.             OpenRegKey $(KeySrvParams) "" "Ipx" $(!MAXIMUM_ALLOWED) RemoteIpxKey
  5775.             ifstr $(RemoteIpxKey) != $(KeyNull)
  5776.                EnumRegValue $(RasIpxKey) NewValueList
  5777.                Shell  "utility.inf", AddValueList, $(RemoteIpxKey), $(NewValueList)
  5778.                SetRegValue $(RemoteIpxKey) {RouterInstalled, 0,$(!REG_VT_DWORD), $(RouterInstalled)}
  5779.                CloseRegKey $(RemoteIpxKey)
  5780.             endif
  5781.         else
  5782.             Debug-Output "SaveIpxInfo: removing ipx info"
  5783.             DeleteRegTree $(KeySrvParams) "IPX"
  5784.         endif
  5785.         CloseRegKey $(KeySrvParams)
  5786.         CloseRegKey $(RasIpxKey)
  5787.     endif
  5788.     Debug-Output "SaveIpxInfo: exit"
  5789.     set Status = STATUS_SUCCESSFUL
  5790.     return $(Status)
  5791. [AddServiceDependency]
  5792.     Debug-Output "AddServiceDependency: entry"
  5793.     set Status   = STATUS_FAILED
  5794.     Set KeyNull  = ""
  5795.     set DependentService = $(!NTN_ServiceBase)\$($0)
  5796.     set DependentName = $($0)
  5797.     set DependOn = $($1)
  5798.     set ServiceKey = $(KeyNull)
  5799.     OpenRegKey $(!REG_H_LOCAL) "" $(DependentService)"\Linkage" $(!MAXIMUM_ALLOWED) ServiceKey
  5800.     ifstr(i) $(ServiceKey) != $(KeyNull)
  5801.         GetRegValue $(ServiceKey) "OtherDependencies" ServicesList
  5802.         ifint $(RegLastError) != 0
  5803.            set ServiceValues = {}
  5804.         else
  5805.            set ServiceValues = *($(ServicesList),4)
  5806.         endif
  5807.         debug-output "AddServiceDependency: Old OtherDependencies: "$(ServiceValues)
  5808.         ifstr(i) $(ServiceValues) == {}
  5809.             Set ServiceValues = {$(DependOn)}
  5810.         else-ifstr(i) $(ServiceValues) == ""
  5811.             Set ServiceValues = {$(DependOn)}
  5812.         else-ifcontains(i) $(DependOn) in $(ServiceValues)
  5813.             return STATUS_SUCCESSFUL
  5814.         else
  5815.             Set ServiceValues = >($(ServiceValues), $(DependOn))
  5816.         endif
  5817.         debug-output "AddServiceDependency: New OtherDependencies: "$(ServiceValues)
  5818.         SetRegValue $(ServiceKey) {OtherDependencies, 0,+
  5819.                                    $(!REG_VT_MULTI_SZ), $(ServiceValues)}
  5820.         CloseRegKey $(ServiceKey)
  5821.         set Status = STATUS_SUCCESSFUL
  5822.     else
  5823.         Debug-Output "AddServiceDependency: error opening service "$(DependentService)"\Linkage"
  5824.     endif
  5825.     set KeyService = $(KeyNull)
  5826.     OpenRegKey $(!REG_H_LOCAL) "" $(DependentService) $(!MAXIMUM_ALLOWED) KeyService
  5827.     ifstr $(KeyService) != $(KeyNull)
  5828.         set newDependList = {$(DependOn)}
  5829.         GetRegValue    $(KeyService) "DependOnService" ServiceList
  5830.         ifint $(RegLastError) == 0
  5831.             Debug-Output "AddServiceDependency: old DependOnService List "*($(ServiceList), 4)
  5832.             ForListDo *($(ServiceList),4)
  5833.                 ifstr(i) $($) != $(DependOn)
  5834.                    set newDependList = >($(newDependList), $($))
  5835.                 endif
  5836.             EndForListDo
  5837.         endif
  5838.         GetRegValue    $(KeyService) "DependOnGroup" GrpList
  5839.         ifint $(RegLastError) == 0
  5840.             Debug-Output "AddServiceDependency: old DependOnGroup List "*($(GrpList), 4)
  5841.             ForListDo *($(GrpList),4)
  5842.                set grp = "+"$($)
  5843.                set newDependList = >($(newDependList), $(grp))
  5844.             EndForListDo
  5845.         endif
  5846.         Debug-Output "OEMNSVRA.INF: AddServiceDependency: new Dependency List "$(newDependList)
  5847.         LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, $(DependentName) $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), "", "", $(newDependList), "", "", ""
  5848.         CloseRegKey $(KeyService)
  5849.     else
  5850.         Debug-Output "AddServiceDependency: failed to open service linkage key"$(DependentService)
  5851.     endif
  5852.     Debug-Output "AddServiceDependency: exit"
  5853.     return $(Status)
  5854. [RemoveServiceDependency]
  5855.     Debug-Output "RemoveServiceDependency: entry"
  5856.     set Status   = STATUS_FAILED
  5857.     Set KeyNull  = ""
  5858.     set DependentService = $(!NTN_ServiceBase)\$($0)
  5859.     set DependentName = $($0)
  5860.     set DependOn = $($1)
  5861.     OpenRegKey $(!REG_H_LOCAL) "" $(DependentService)"\Linkage" $(!MAXIMUM_ALLOWED) ServiceKey
  5862.     ifstr(i) $(ServiceKey) != $(KeyNull)
  5863.         GetRegValue $(ServiceKey) "OtherDependencies" ServicesList
  5864.         ifint $(RegLastError) != 0
  5865.            set ServiceValues = {}
  5866.         else
  5867.            set ServiceValues = *($(ServicesList),4)
  5868.         endif
  5869.         debug-output "RemoveServiceDependency: old OtherDependencies list:"$(ServicesList)
  5870.         set ServiceValues = *($(ServicesList),4)
  5871.         debug-output "ServiceValues: "$(ServiceValues)
  5872.         ifcontains(i) $(DependOn) in $(ServiceValues)
  5873.             set NewServiceValues = {}
  5874.             ForListDo $(ServiceValues)
  5875.                 ifstr(i) $($) != $(DependOn)
  5876.                     set NewServiceValues = >($(NewServiceValues), $($))
  5877.                 endif
  5878.             EndForListDo
  5879.             debug-output "RemoveServiceDependency: new OtherDependencies list: "$(NewServiceValues)
  5880.             SetRegValue $(ServiceKey) {OtherDependencies, 0,+
  5881.                              $(!REG_VT_MULTI_SZ), $(NewServiceValues)}
  5882.         else
  5883.         endif
  5884.         CloseRegKey $(ServiceKey)
  5885.         set Status = STATUS_SUCCESSFUL
  5886.     else
  5887.         Debug-Output "RemoveServiceDependency: error opening service "$(DependentService)"\Linkage"
  5888.     endif
  5889.     set KeyService = $(KeyNull)
  5890.     OpenRegKey $(!REG_H_LOCAL) "" $(DependentService) $(!MAXIMUM_ALLOWED) KeyService
  5891.     ifstr $(KeyService) != $(KeyNull)
  5892.         set newDependList = {}
  5893.         GetRegValue    $(KeyService) "DeleteFlag" DeleteFlagValue
  5894.         ifint $(RegLastError) != 0
  5895.             GetRegValue    $(KeyService) "DependOnService" ServiceList
  5896.             ifint $(RegLastError) == 0
  5897.                 Debug-Output "RemoveServiceDependency: old DependOnService List "*($(ServiceList), 4)
  5898.                 ifcontains(i) $(DependOn) in *($(ServiceList),4)
  5899.                     ForListDo *($(ServiceList),4)
  5900.                         ifstr(i) $($) != $(DependOn)
  5901.                            set newDependList = >($(newDependList), $($))
  5902.                         endif
  5903.                     EndForListDo
  5904.                     GetRegValue $(KeyService) "DependOnGroup" GrpList
  5905.                     ifint $(RegLastError) == 0
  5906.                         ForListDo *($(GrpList),4)
  5907.                            set grp = "+"$($)
  5908.                            set newDependList = >($(newDependList), $(grp))
  5909.                         EndForListDo
  5910.                     endif
  5911.                     Debug-Output "OEMNSVRA.INF:RemoveServiceDependency: new DependOnService List "$(newDependList)
  5912.                     LibraryProcedure Result, $(!LIBHANDLE), +
  5913.                        SetupChangeServiceConfig, $(DependentName)  +
  5914.                        $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), +
  5915.                        $(!SERVICE_NO_CHANGE), "", "",  +
  5916.                        $(newDependList), "", "", ""
  5917.                 endif
  5918.             endif
  5919.         endif
  5920.         CloseRegKey $(KeyService)
  5921.     else
  5922.         Debug-Output "RemoveServiceDependency: failed to open service linkage key"$(DependentService)
  5923.     endif
  5924.     Debug-Output "RemoveServiceDependency: exit"
  5925.     return $(Status)
  5926. [QueryUserQuit]
  5927.     set Status     = STATUS_FAILED
  5928.     set UserAction = CANCEL
  5929.     set STF_MB_TEXT  = "The changes will not be saved. "+
  5930.                        "Are you sure you want to exit Setup."
  5931.     read-syms ExitWarningDlg$(!STF_LANGUAGE)
  5932.     ui start "ExitWarning"
  5933.     ifstr(i) $(DLGEVENT) == "YES"
  5934.         set Status     = STATUS_SUCCESSFUL
  5935.         set UserAction = "OK"
  5936.     else-ifstr(i) $(DLGEVENT) == "NO"
  5937.         set Status     = STATUS_SUCCESSFUL
  5938.         set UserAction = "CANCEL"
  5939.     else
  5940.     endif
  5941. fin_QueryUserQuit = +
  5942.     Return $(Status) $(UserAction)
  5943. [QueryRasUpgrade]
  5944.     set Status     = STATUS_FAILED
  5945.     set UserAction = CANCEL
  5946.     read-syms RasUpgrade$(!STF_LANGUAGE)
  5947.     set Text = $($0)$(Ver)$($1)$(Text1)$(Ver)$($2)$(Text2)$(Text3)
  5948.     set STF_MB_TEXT  = $(Text)
  5949.     read-syms ExitWarningDlg$(!STF_LANGUAGE)
  5950.     ui start "RasUpgrade"
  5951.     ifstr(i) $(DLGEVENT) == "YES"
  5952.         set Status     = STATUS_SUCCESSFUL
  5953.         set UserAction = "OK"
  5954.     else-ifstr(i) $(DLGEVENT) == "NO"
  5955.         set Status     = STATUS_SUCCESSFUL
  5956.         set UserAction = "CANCEL"
  5957.     else
  5958.     endif
  5959. fin_QueryRasUpgrade = +
  5960.     Return $(Status) $(UserAction)
  5961. [CP-List]
  5962. NBFCP       = "%SystemRoot%\SYSTEM32\RASNBFCP.DLL"
  5963. IPCP        = "%SystemRoot%\SYSTEM32\RASIPCP.DLL"
  5964. IPXCP       = "%SystemRoot%\SYSTEM32\RASIPXCP.DLL"
  5965. PAP         = "%SystemRoot%\SYSTEM32\RASPAP.DLL"
  5966. CHAP        = "%SystemRoot%\SYSTEM32\RASCHAP.DLL"
  5967. SPAP        = "%SystemRoot%\SYSTEM32\RASSPAP.DLL"
  5968. CBCP        = "%SystemRoot%\SYSTEM32\RASCBCP.DLL"
  5969. COMPCP      = "%SystemRoot%\SYSTEM32\RASCCP.DLL"
  5970. [Files-RemoveList]
  5971. RASADMINDLL    = $(!STF_WINDOWSSYSPATH)\RASADMIN.DLL
  5972. RASGTWYDLL     = $(!STF_WINDOWSSYSPATH)\RASGTWY.DLL
  5973. RASGPRXYDLL    = $(!STF_WINDOWSSYSPATH)\RASGPRXY.DLL
  5974. RASSRVEXE      = $(!STF_WINDOWSSYSPATH)\RASSRV.EXE
  5975. RASCTRSDLL     = $(!STF_WINDOWSSYSPATH)\RASCTRS.DLL
  5976. RASCTRSINI     = $(!STF_WINDOWSSYSPATH)\RASCTRS.INI
  5977. RASCTRNMH      = $(!STF_WINDOWSSYSPATH)\RASCTRNM.H
  5978. RASSPRXYEXE    = $(!STF_WINDOWSSYSPATH)\RASSPRXY.EXE
  5979. RASSAUTHDLL    = $(!STF_WINDOWSSYSPATH)\RASSAUTH.DLL
  5980. RASDIALEXE     = $(!STF_WINDOWSSYSPATH)\RASDIAL.EXE
  5981. RASPHONEHLP    = $(!STF_WINDOWSSYSPATH)\RASPHONE.HLP
  5982. RASGLOSSHLP    = $(!STF_WINDOWSSYSPATH)\RASGLOSS.HLP
  5983. RASAPI32DLL    = $(!STF_WINDOWSSYSPATH)\RASAPI32.DLL
  5984. RASCAUTHDLL    = $(!STF_WINDOWSSYSPATH)\RASCAUTH.DLL
  5985. RASADMINHLP    = $(!STF_WINDOWSSYSPATH)\RASADMIN.HLP
  5986. RASMANDLL      = $(!STF_WINDOWSSYSPATH)\RASMAN.DLL
  5987. RASMANEXE      = $(!STF_WINDOWSSYSPATH)\RASMAN.EXE
  5988. RASMSGDLL      = $(!STF_WINDOWSSYSPATH)\RASMSG.DLL
  5989. RASMXSDLL      = $(!STF_WINDOWSSYSPATH)\RASMXS.DLL
  5990. RASSERDLL      = $(!STF_WINDOWSSYSPATH)\RASSER.DLL
  5991. RASIPXCPDLL    = $(!STF_WINDOWSSYSPATH)\RASIPXCP.DLL
  5992. RASPPPDLL      = $(!STF_WINDOWSSYSPATH)\RASPPP.DLL
  5993. RASPPPENDLL    = $(!STF_WINDOWSSYSPATH)\RASPPPEN.DLL
  5994. RASPAPDLL      = $(!STF_WINDOWSSYSPATH)\RASPAP.DLL
  5995. RASCHAPDLL     = $(!STF_WINDOWSSYSPATH)\RASCHAP.DLL
  5996. RASSPAPDLL     = $(!STF_WINDOWSSYSPATH)\RASSPAP.DLL
  5997. RASIPCPDLL     = $(!STF_WINDOWSSYSPATH)\RASIPCP.DLL
  5998. RASIPHLPDLL    = $(!STF_WINDOWSSYSPATH)\RASIPHLP.DLL
  5999. RASNBFCPDLL    = $(!STF_WINDOWSSYSPATH)\RASNBFCP.DLL
  6000. RASNBIPCDLL    = $(!STF_WINDOWSSYSPATH)\RASNBIPC.DLL
  6001. RASCCPDLL      = $(!STF_WINDOWSSYSPATH)\RASCCP.DLL
  6002. RASCBCPDLL     = $(!STF_WINDOWSSYSPATH)\RASCBCP.DLL
  6003. ASYNCMACSYS    = $(!STF_WINDOWSSYSPATH)\DRIVERS\ASYNCMAC.SYS
  6004. NDISWANSYS     = $(!STF_WINDOWSSYSPATH)\DRIVERS\NDISWAN.SYS
  6005. RASARPSYS      = $(!STF_WINDOWSSYSPATH)\DRIVERS\RASARP.SYS
  6006. [Source Media Descriptions]
  6007.     1 = "Windows NT Server CD-ROM", TAGFILE = cdrom_s.40
  6008. [Signature]
  6009.     FileType = MICROSOFT_FILE
  6010. [GetSignature]
  6011.     read-syms Signature
  6012.     return $(FileType)
  6013. [ProductType]
  6014. STF_PRODUCT  = LanmanNT
  6015. STF_PLATFORM = I386
  6016. [Files-Ras-Admin]
  6017. 1,RASADMIN.EXE , SIZE=126224 , NODELETESOURCE
  6018. 1,RASSAPI.DLL , SIZE=22800 , NODELETESOURCE
  6019. 1,RASADMIN.CNT , SIZE=1330
  6020. 1,RASADMIN.HLP , SIZE=42084
  6021. [Files-Ras-Client]
  6022. 1,RASPHONE.EXE , SIZE=52496 , NODELETESOURCE
  6023. 1,RASSHELL.DLL , SIZE=18704 , NODELETESOURCE
  6024. 1,RASAPI16.DLL , SIZE=4512
  6025. 1,RASAPI32.DLL , SIZE=127248
  6026. 1,RASCAUTH.DLL , SIZE=28432
  6027. 1,RASCPL.CPL , SIZE=10512
  6028. 1,RASDIAL.EXE , SIZE=17168
  6029. 1,RASGLOSS.CNT , SIZE=2310
  6030. 1,RASGLOSS.HLP , SIZE=23767
  6031. 1,RASMON.EXE , SIZE=117520
  6032. 1,RASPHONE.CNT , SIZE=7381
  6033. 1,RASPHONE.HLP , SIZE=289828
  6034. 1,RASSCRPT.DLL , SIZE=54544
  6035. [Files-Ras-Common]
  6036. 1,RASADHLP.DLL , SIZE=10000
  6037. 1,RASAUTO.DLL , SIZE=73488
  6038. 1,RASAUTOU.EXE , SIZE=12048
  6039. 1,RASCBCP.DLL , SIZE=9488
  6040. 1,RASCCP.DLL , SIZE=11024
  6041. 1,RASCHAP.DLL , SIZE=24848
  6042. 1,RASDLG.DLL , SIZE=347408
  6043. 1,RASIPCP.DLL , SIZE=16656
  6044. 1,RASIPHLP.DLL , SIZE=27920
  6045. 1,RASIPXCP.DLL , SIZE=22800
  6046. 1,RASMAN.DLL , SIZE=61200
  6047. 1,RASMAN.EXE , SIZE=8976
  6048. 1,RASMSG.DLL , SIZE=28944
  6049. 1,RASMXS.DLL , SIZE=26896
  6050. 1,RASNBFCP.DLL , SIZE=15632
  6051. 1,RASNBIPC.DLL , SIZE=8976
  6052. 1,RASPAP.DLL , SIZE=13584
  6053. 1,RASPPPEN.DLL , SIZE=49936
  6054. 1,RASSER.DLL , SIZE=16656
  6055. 1,RASSPAP.DLL , SIZE=15120
  6056. 1,RASTAPI.DLL , SIZE=33040
  6057. [Files-Ras-Drivers]
  6058. 1,ASYNCMAC.SYS , SIZE=39152
  6059. 1,NDISTAPI.SYS , SIZE=8496
  6060. 1,NDISWAN.SYS , SIZE=57104
  6061. 1,RASACD.SYS , SIZE=8112
  6062. 1,RASARP.SYS , SIZE=12912
  6063. [Files-Ras-Inf]
  6064. modem = 1,MODEM.INF , SIZE=999 , NODELETESOURCE
  6065. pad = 1,PAD.INF , SIZE=999 , NODELETESOURCE
  6066. rasico = 1,RAS.ICO , SIZE=999 , NODELETESOURCE
  6067. rasread = 1,RASREAD.TXT , SIZE=999 , NODELETESOURCE
  6068. switch = 1,SWITCH.INF , SIZE=999 , NODELETESOURCE
  6069. [Files-Ras-Scp]
  6070. cis = 1,CIS.SCP , SIZE=999 , NODELETESOURCE
  6071. pppmenu = 1,PPPMENU.SCP , SIZE=999 , NODELETESOURCE
  6072. scriptdoc = 1,SCRIPT.DOC , SIZE=999 , NODELETESOURCE
  6073. slip = 1,SLIP.SCP , SIZE=999 , NODELETESOURCE
  6074. slipmenu = 1,SLIPMENU.SCP , SIZE=999 , NODELETESOURCE
  6075. [Files-Ras-Server]
  6076. 1,RASADMIN.DLL , SIZE=18192
  6077. 1,RASCTRS.DLL , SIZE=15120
  6078. 1,RASGPRXY.DLL , SIZE=15120
  6079. 1,RASGTWY.DLL , SIZE=47888
  6080. 1,RASSAUTH.DLL , SIZE=28432
  6081. 1,RASSPRXY.EXE , SIZE=9488
  6082. 1,RASSRV.EXE , SIZE=69392
  6083. [Files-Resource]
  6084. 1,RASCFG.DLL , SIZE=154384 , NODELETESOURCE
  6085. 1,RASFIL32.DLL , SIZE=12560 , NODELETESOURCE
  6086. 1,RASSETUP.CNT , SIZE=99 , NODELETESOURCE
  6087. 1,RASSETUP.HLP , SIZE=16757 , NODELETESOURCE
  6088. [LanguagesSupported]
  6089.     ENG
  6090. [OptionsTextENG]
  6091.     RAS = "Remote Access Service"
  6092. [FileConstantsENG]
  6093.     RasGroup    = "Remote Access Service"
  6094.     RasPhone    = "Remote Access"
  6095.     RasMon      = "Remote Access Monitor"
  6096.     RasAdmin    = "Remote Access Admin"
  6097.     ReadMe      = "Read Me"
  6098.     RasInternet = "Remote Access and the Internet"
  6099.     RasHelp     = "Remote Access Help"
  6100.     ProCaption   = "Remote Access Service Setup"
  6101.     ProCancel    = "Cance&l"
  6102.     ProCancelMsg = "Remote Access Service is not correctly installed. "+
  6103.                    "Are you sure you want to cancel copying files?"
  6104.     ProCancelCap = "Remote Access Service Setup Message"
  6105.     ProText1     = "Copying:"
  6106.     ProText2     = "To:"
  6107.     Error        = "Unable to determine proper source disk location; copy cannot be performed."
  6108.     FunctionTitle   ="Remote Access Setup"
  6109.     ProductRASDescription                = "Enables users to work offsite as though connected directly to a network."
  6110.     ProductRASTitle                      = "Remote Access Service"
  6111.     ProductRASDisplayName                = "Remote Access Service"
  6112.     ProductRASMANDescription             = "Windows NT Remote Access Connection Manager"
  6113.     ProductRASMANTitle                   = "Remote Access Connection Manager"
  6114.     ProductRASMANDisplayName             = "Remote Access Connection Manager"
  6115.     !ProductRASAUTODIALDescription       = "Windows NT Remote Access Autodial Manager"
  6116.     !ProductRASAUTODIALDisplayName       = "Remote Access Autodial Manager"
  6117.     !ProductRASAUTODIALTitle             = "Remote Access Autodial Manager"
  6118.     !ProductNDISWANDescription           = "Windows NT Remote Access WAN Wrapper"
  6119.     !ProductNDISWANTitle                 = "Remote Access WAN Wrapper"
  6120.     !ProductNDISWANDisplayName           = "Remote Access WAN Wrapper"
  6121.     ProductRASASYMACDescription          = "Windows NT Remote Access AsyMac Adapter Driver"
  6122.     ProductRASASYMACTitle                = "Remote Access Mac"
  6123.     ProductRASASYMACDisplayName          = "Remote Access Mac"
  6124.     ProductRASSVRDescription             = "Windows NT Remote Access NetBios Gateway"
  6125.     ProductRASSVRTitle                   = "Remote Access Server Service"
  6126.     ProductRASSVRDisplayName             = "Remote Access Server"
  6127.     !ProductRASISNRIPTitle               = "Remote Access NWLNKRIP Service"
  6128.     !ProductRASISNRIPDisplayName         = "Remote Access NWLNKRIP Service"
  6129.     !ProductRASISNSAPTitle               = "Remote Access NWLNKSAP Service"
  6130.     !ProductRASISNSAPDisplayName         = "Remote Access NWLNKSAP Service"
  6131.     !ProductRASARPTitle                  = "Remote Access ARP Service"
  6132.     !ProductRASARPDisplayName            = "Remote Access ARP Service"
  6133.     !ProductRASACDDisplayName            = "Remote Access Auto Connection Driver"
  6134.     !ProductNDISTAPIDisplayName          = "Microsoft NDIS TAPI driver"
  6135. [DialogConstantsENG]
  6136.     Help        = "&Help"
  6137.     Exit        = "E&xit"
  6138.     OK          = "OK"
  6139.     HelpContext = ""
  6140.     Continue    = "C&ontinue"
  6141.     Cancel      = "C&ancel"
  6142. [ExitWarningDlgENG]
  6143.     DlgType      = "MessageBox"
  6144.     STF_MB_TITLE = "Remote Access Service Setup"
  6145.     STF_MB_TYPE  = 3
  6146.     STF_MB_ICON  = 5
  6147.     STF_MB_DEF   = 2
  6148. [SetupAbortDlgENG]
  6149.     DlgType     = "Info"
  6150.     DlgTemplate = "RESTART"
  6151.     Caption     = "Remote Access Service Setup"
  6152.     DlgText     = "Setup for Remote Access Service failed."$(!LF)$(!LF)+
  6153.                   "Please choose Exit to exit back to the Windows NT System."
  6154.     Windows     = "E&xit to &Windows NT"
  6155. [AbortMessageENG]
  6156.   AbortText  =  "Aborting Remote Access Setup. Please restart the system "+
  6157.                 "to fix the problem."
  6158. [ShellCodeErrorMsgENG]
  6159.     DlgType      = "MessageBox"
  6160.     STF_MB_TITLE = "Error: "$(FunctionTitle)
  6161.     STF_MB_TEXT  = "An error occured running the shell command. "+
  6162.                    "Please restart the system to fix the problem."
  6163.     STF_MB_TYPE  = 1
  6164.     STF_MB_ICON  = 3
  6165.     STF_MB_DEF   = 1
  6166. [SuccessfulInstallENG]
  6167.   Success  = "Remote Access Service has been successfully installed. "$(!LF)$(!LF)+
  6168.              "Use Remote Access Admin or User Manager in the Administrative "+
  6169.              "Tools Folder to assign Remote Access permissions to users."
  6170. [MsgDlgENG]
  6171.     DlgType      = "MessageBox"
  6172.     STF_MB_TYPE  = 1
  6173.     STF_MB_ICON  = 2
  6174.     STF_MB_DEF   = 2
  6175. [StatusUpdatingRegistryENG]
  6176.     CreatingRas             = "Please wait while Remote Access is installed..."
  6177.     WritingRasParams        = "Writing Remote Access parameters..."
  6178.     WritingRasParamsAdd     = "Writing Remote Access parameters...Adding RAS binding "
  6179.     WritingRasParamsRemove  = "Writing Remote Access parameters...Removing RAS binding "
  6180.     RemovingRas             = "Removing Remote Access Service..."
  6181.     RemovingAdapters        = "Remote Access Setup: Removing RAS binding "
  6182.     RemovingResources       = "Removing Remote Access resource files..."
  6183.     UpdatingRas             = "Please wait while Remote Access is updated..."
  6184. [StatusDeterminingConfigENG]
  6185.     ReadingConfig      = "Determining current configuration ..."
  6186. [StatusCopyingResENG]
  6187.     Status = "Copying DLLs and INF files to disk ..."
  6188. [NonFatalError1ENG]
  6189.     NonFatal  = "Setup cannot function properly without a user name."
  6190. [FatalErrorMemENG]
  6191.     Fatal  = "Not enough memory is available. Remote Access requires atleast 2 Meg."
  6192. [NoConfigAdminENG]
  6193.     NoConfigAdmin = "The only component installed currently is RasAdmin which "+
  6194.                     "cannot be configured."
  6195. [VerExistsENG]
  6196.     Ver   = " version "
  6197.     Text1 = " is already installed. "
  6198. [NetworkConfigErrorENG]
  6199.     Text1 = "Setup encountered an error while determining the "+
  6200.             "network configuration.  Please make sure that "+
  6201.             "the network is properly configured before attempting "+
  6202.             "to install Remote Access Service."
  6203.     Text2 = "The Microsoft Windows Workstation and Server Service must be "+
  6204.             "installed for proper operation of Remote Access Service."$(!LF)$(!LF)+
  6205.             "To install Workstation or Server Service:"$(!LF)$(!LF)+
  6206.             "1. Invoke 'Network' control panel applet."$(!LF)+
  6207.             "2. Choose Add Software and select Workstation or Server from the list."
  6208. [NoPortsConfiguredENG]
  6209.    NoPortsError =+
  6210.        "Remote Access is not configured with any ports. "+
  6211.        "You have an invalid RAS configuration. "+
  6212.        "Please configure Remote Access Service and add "+
  6213.        "ports using the Network option in Control Panel "+
  6214.        "after restarting the system."
  6215. [QueryInstalledProtocolsErrorENG]
  6216.     Text  = "Setup encountered an error while determining the "+
  6217.             "installed network protocols.  Try restarting the "+
  6218.             "system to correct the problem. Contact your system "+
  6219.             "administrator, if the problem persists."
  6220. [RasUpgradeENG]
  6221.     Ver = " ver "
  6222.     Text1 = " exists on the system. Are you sure you want to upgrade to"
  6223.     Text2 = "?. "
  6224.     Text3 = "Selecting YES will result in the new version replacing the old."
  6225. [InstallLoopbackENG]
  6226. Message = "RAS Setup has discovered that you have configured one or more "+
  6227.           "ports to receive calls and your computer does not have a "+
  6228.           "network adapter installed. Setup will install the MS Loopback "+
  6229.           "Adapter to enable remote clients to use resources on this computer."
  6230. Error   = "RAS setup encountered an error while invoking the OEMNADLB.INF file "+
  6231.           "to install the MS Loopback Adapter. You can install the Loopback Adapter "+
  6232.           "from the Network option in Control Panel after restarting the system. "+
  6233.           "Remote Clients will not be able to dialin and use resources on this computer "+
  6234.           "till you install the Loopback Adapter."
  6235. [NoNetbeuiDlgENG]
  6236.     NoNetbeuiWarning =+
  6237.         "The NetBEUI protocol is either not installed or not configured "+
  6238.         "for Remote Access.  NetBEUI provides the fastest throughput to "+
  6239.         "NetBIOS resources when accessed over a Remote Access connection. "+
  6240.         "If clients will access remote NetBIOS resources, configure RAS "+
  6241.         "to use NetBEUI. "$(!LF)$(!LF)+
  6242.         "You can add the NetBEUI protocol to your computer using the "+
  6243.         "Network option in Control Panel."
  6244. [NoProtocolsDlgENG]
  6245.     NoProtocolsWarning =+
  6246.        "Remote Access is not configured with any network protocols. "+
  6247.        "You have an invalid RAS configuration. "+
  6248.        "You can configure RAS to support "+
  6249.        "network protocols using the Network option in Control Panel "+
  6250.        "after restarting the system."
  6251. [UpgradeErrorsENG]
  6252. UpgradeIsdnInfoError = "Remote Access Setup encoutered an error while "+
  6253.                        "updating the ISDN information. Please remove and "+
  6254.                        "reinstall Remote Access to ensure proper operation."
  6255. [RasErrorsENG]
  6256. ErrorBadArgs = "OEMNSVRA.INF specified invalid number of arguments "+
  6257.                "to RASCFG.DLL. Remote Access Setup will terminate now."
  6258. ErrorNoPorts = "Dial-Up Networking setup failed to detect any installed "+
  6259.                "ports on this computer. Setup will terminate now."
  6260. ErrorUnknown = "Dial-Up Networking setup encountered an unknown failure "+
  6261.                "and will terminate now. Please contact your administrator "+
  6262.                "to deteremine the cause of the problem."
  6263. InvalidMode  = "Dial-Up Networking setup was invoked with an invalid "+
  6264.                "RasInstallMode environment variable. It should be set to "+
  6265.                "either install or configure. The value currently passed to "+
  6266.                "setup is "$(RasInstallMode)"."
  6267. UnableToLoadSetupdll = "Dial-Up Networking setup was unable to load setupdll.dll "+
  6268.                        "in the system32 directory. Please make sure this file is "+
  6269.                        "present on your computer. Setup will now exit. "
  6270. UnableToLoadNcpaCpl = "Dial-Up Networking setup was unable to load ncpa.cpl "+
  6271.                        "in the system32 directory. Please make sure this file is "+
  6272.                        "present on your computer. Setup will now exit. "
  6273. NoProductType = "Dial-Up Networking setup was unable to determine your "+
  6274.                 "computer product type. Make sure that the following registry "+
  6275.                 "value exists on your computer. "+
  6276.                 "HEKY_LOCAL_MACHINE\System\CurrentControlSet\Control\ProductOptions. "+
  6277.                 "Setup will now exit."
  6278. UnknownProductType = "Dial-Up Networking setup detected an unsupported product type "$(TempProductType)". "+
  6279.                      "Make sure that the following registry value HEKY_LOCAL_MACHINE\System\CurrentControlSet\Control\ProductOptions\ProductType "+
  6280.                      "is one of the following valid values WinNT, LanManNT or ServerNT. Setup will now exit."
  6281. [Billboard1ENG]
  6282. Status = "Remote Access Setup is installing the NetBEUI transport..."
  6283. [Billboard2ENG]
  6284. Status = "Remote Access Setup is installing the TCP/IP transport..."
  6285. [Billboard3ENG]
  6286. Status = "Remote Access Setup is installing NWLINK and related services..."
  6287.