home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / d / d423_liu / 8.ddi / OEMNXPIP.IN_ / OEMNXPIP.IN
Encoding:
INI File  |  1993-07-24  |  49.0 KB  |  1,122 lines

  1. [Identification]
  2.     OptionType = NetTransport
  3. [Options]
  4.     NWLINK
  5. [FileConstants]
  6. Manufacturer            = "Microsoft"
  7. ProductMajorVersion     = "1"
  8. ProductMinorVersion     = "0"
  9. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  10. NWLINKEventDLL   = "%SystemRoot%\System32\nwlnkmsg.dll"
  11. NWLINKSPXEventDLL   = "%SystemRoot%\System32\nwlnkmsg.dll"
  12. NWNBLINKEventDLL    = "%SystemRoot%\System32\nwnblink.dll"
  13. ProductNWLINKWshDllPath  = "%SystemRoot%\System32\wshnwlnk.dll"
  14. ProductNWLINKName        = "NWLINKIPX"
  15. ProductNWLINKImagePath   = "%SystemRoot%\System32\nwlnksvc.exe"
  16. ProductNWLINKSvcType     = "serviceshare"
  17. NetRuleNWLINKType        = "nwlinkipx nwlinkipxTransport streamsStack"
  18. NetRuleNWLINKUse         = $(SoftwareType)" yes yes"
  19. NetRuleNWLINKBindForm    = """NWLINKIPX"" yes yes container"
  20. NetRuleNWLINKClass       = "nwlinkipxTransport basic yes"
  21. ProductNWLINKSYSName     = "NWLINKsys"
  22. ProductNWLINKSYSImagePath= "\SystemRoot\System32\drivers\nwlink.sys"
  23. ProductNWLINKSYSSvcType  = "kernel"
  24. ProductNWNBLINKName         = "NWNBLINK"
  25. ProductNWNBLINKImagePath    = "%SystemRoot%\System32\nwnblink.exe"
  26. ProductNWNBLINKSvcType      = "serviceshare"
  27. NetRuleNWNBLINKType         = "nwnblink nwnblinkNbTransport streamsStack"
  28. NetRuleNWNBLINKUse          = $(SoftwareType)
  29. NetRuleNWNBLINKBindForm     = """NWNBLINK"" yes yes container"
  30. NetRuleNWNBLINKClassList    = {"nwnblinkNbTransport netBiosTransport yes"}
  31. ProductNWNBLINKSYSName      = "NWNBLINKsys"
  32. ProductNWNBLINKSYSImagePath = "\SystemRoot\System32\drivers\nwnblink.sys"
  33. ProductNWNBLINKSYSSvcType   = "kernel"
  34. ProductNWLINKSPXName        = "NWLINKSPX"
  35. ProductNWLINKSPXImagePath   = "%SystemRoot%\System32\nwlnksvc.exe"
  36. ProductNWLINKSPXSvcType     = "adapter"
  37. CompetitorServiceName = "IPXSPXII"
  38. CompetitorKeyName  = $(!NTN_ServiceBase)"\"$(CompetitorServiceName)
  39. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(Product$(Option)Name)"\CurrentVersion"
  40. LinkageKeyName  = $(!NTN_ServiceBase)"\NWLINKIPX\Linkage"
  41. ServiceNWLINKKeyName = $(!NTN_ServiceBase)"\NWLINKIPX"
  42. ServiceNWLINKSPXKeyName = $(!NTN_ServiceBase)"\NWLINKSPX"
  43. ServiceKeyName  = $(!NTN_ServiceBase)
  44. [GeneralConstants]
  45. UtilityInf       = "UTILITY.INF"
  46. subroutineinf    = "SUBROUTN.INF"
  47. SoftwareType     = "transport"
  48. Exit_Code        = 0
  49. BillboardVisible = 0
  50. from             = ""
  51. to               = ""
  52. ExitCodeOk       = 0
  53. ExitCodeCancel   = 1
  54. ExitCodeFatal    = 2
  55. KeyNull          = ""
  56. MAXIMUM_ALLOWED    = 33554432
  57. RegistryErrorIndex = NO_ERROR
  58. KeyProduct    = ""
  59. KeyParameters = ""
  60. TRUE          = 1
  61. FALSE         = 0
  62. NoTitle       = 0
  63. ExitState     = "Active"
  64. OldVersionExisted = $(FALSE)
  65. DriverPath   = $(!STF_NTPATH)\drivers
  66. [date]
  67.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  68. [Identify]
  69.     read-syms Identification
  70.     set Status     = STATUS_SUCCESSFUL
  71.     set Identifier = $(OptionType)
  72.     set Media      = #("Source Media Descriptions", 1, 1)
  73.     Return $(Status) $(Identifier) $(Media)
  74. [ReturnOptions]
  75.     set Status         = STATUS_FAILED
  76.     set OptionList     = {}
  77.     set OptionTextList = {}
  78.     set LanguageList = ^(LanguagesSupported, 1)
  79.     Ifcontains(i) $($0) in $(LanguageList)
  80.         goto returnoptions
  81.     else
  82.         set Status = STATUS_NOLANGUAGE
  83.         goto finish_ReturnOptions
  84.     endif
  85. returnoptions = +
  86.     set OptionList     = ^(Options, 1)
  87.     set OptionTextList = ^(OptionsText$($0), 1)
  88.     set Status         = STATUS_SUCCESSFUL
  89. finish_ReturnOptions = +
  90.     Return $(Status) $(OptionList) $(OptionTextList)
  91. [InstallOption]
  92.     set Option   = $($1)
  93.     set SrcDir   = $($2)
  94.     set AddCopy  = $($3)
  95.     set DoCopy   = $($4)
  96.     set DoConfig = $($5)
  97.     Debug-Output "NWLINK.INF: At InstallOption"
  98.     set LanguageList = ^(LanguagesSupported, 1)
  99.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  100.         return STATUS_NOLANGUAGE
  101.     endif
  102.     Debug-Output "NWLINK.INF: STF_CWDIR is: "$(!STF_CWDIR)
  103.     Debug-Output "NWLINK.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  104.     set-subst LF = "\n"
  105.     read-syms GeneralConstants
  106.     read-syms FileConstants
  107.     read-syms DialogConstants$(!STF_LANGUAGE)
  108.     read-syms FileConstants$(!STF_LANGUAGE)
  109.     detect date
  110.     set-title  $(FunctionTitle)
  111.     set to   = Begin
  112.     set from = Begin
  113.     set CommonStatus = STATUS_SUCCESSFUL
  114.     EndWait
  115. Begin = +
  116.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  117.         set StartLabel = removeadapter
  118.         set OEM_ABANDON_OPTIONS = {+
  119.             $(ProductNWLINKSYSName),+
  120.             $(ProductNWLINKSPXName),+
  121.             $(ProductNWNBLINKSYSName)}
  122.         set OEM_ABANDON_SOFTWARE = {+
  123.             $(ProductNWLINKName),+
  124.             $(ProductNWNBLINKName),+
  125.             Streams}
  126.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  127.         set StartLabel = UpgradeSoftware
  128.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  129.         set StartLabel = configureadapter
  130.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  131.         set StartLabel = bindingadapter
  132.     else
  133.         set StartLabel = installadapter
  134.         set OEM_ABANDON_SOFTWARE = {}
  135.         set OEM_ABANDON_OPTIONS = {}
  136.     endif
  137.     set from = $(fatal)
  138.     set to   = $(fatal)
  139.     goto $(StartLabel)
  140. installadapter = +
  141.     Debug-Output "NWLINK.INF: At installadapter"
  142.     OpenRegKey $(!REG_H_LOCAL) "" $(CompetitorKeyName) $(!REG_KEY_READ) BadKey
  143.     Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  144.         Debug-Output "OEMNXPIP.INF:  Service "$(CompetitorServiceName)" exists.  CANNOT INSTALL!"
  145.         GetRegValue $(BadKey) "DisplayName" DisplayList
  146.         Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  147.             Set CompetitorDisplayName = *($(DisplayList),4)
  148.         Endif
  149.         CloseRegKey $(BadKey)
  150.         read-syms FatalError1$(!STF_LANGUAGE)
  151.         Goto fatal
  152.     Endif
  153.     Ifstr(i) $(!NTN_InstallMode) == "install"
  154.         Ifstr(i) $(DoCopy) == "YES"
  155.             Debug-Output "NWLINK.INF: Calling DoAskSource 1"
  156.             Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  157.             Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  158.                Goto ShellCodeError
  159.             Else-Ifstr(i) $($R0) == STATUS_FAILED
  160.                Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  161.                ifint $($ShellCode) != $(!SHELL_CODE_OK)
  162.                   goto ShellCodeError
  163.                endif
  164.                set Error = $($R0)
  165.                Goto fatal
  166.             Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  167.                Goto successful
  168.             Endif
  169.             Set SrcDir = $($R1)
  170.         Endif
  171.         install "Install-Option"
  172.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  173.             Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  174.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  175.                 goto ShellCodeError
  176.             endif
  177.             set Error = $($R0)
  178.             goto fatal
  179.         endif
  180.     endif
  181.     Debug-Output "NWLINK.INF: Opening key for the product"
  182.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  183.     Debug-Output "NWLINK.INF: Back from opening key for the product"
  184.     Ifstr $(KeyProduct) != $(KeyNull)
  185.         CloseRegKey $(KeyProduct)
  186.         Shell $(UtilityInf), VerExistedDlg, $(Product$(Option)Title),+
  187.             $(ProductVersion)
  188.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  189.             Debug-Output "NWLINK.INF: ShellCode error: cannot get an error string."
  190.             goto ShellCodeError
  191.         endif
  192.         goto end
  193.     endif
  194.     Debug-Output "NWLINK.INF: Put up box that we are installing"
  195.     set OEM_ABANDON_ON  = TRUE
  196.     read-syms Billboard1$(!STF_LANGUAGE)
  197.     Shell "subroutn.inf" PushBillboard NETSTATUSDLG $(Status)
  198.     Set BillboardVisible = 1
  199.     Set DoNWLINK      = FALSE
  200.     Set DoNWLINKsys   = FALSE
  201.     Set DoNWLINKSPX   = FALSE
  202.     Set DoNWNBLINK       = FALSE
  203.     Set DoNWNBLINKsys    = FALSE
  204.     Set DoAFD        = FALSE
  205.     Set DoStreams    = FALSE
  206.     Ifstr(i) $(Option) == NWLINK
  207.         Set DoNWLINK      = TRUE
  208.         Set DoNWLINKSPX   = TRUE
  209.         Set DoNWLINKsys   = TRUE
  210.         Set DoNWNBLINK       = TRUE
  211.         Set DoNWNBLINKsys    = TRUE
  212.         Set DoAFD        = TRUE
  213.         Set DoStreams    = TRUE
  214.     Else-ifstr(i) $(Option) == NWNBLINK
  215.         Set DoNWNBLINK       = TRUE
  216.         Set DoNWNBLINKSPX    = TRUE
  217.         Set DoNWNBLINKsys    = TRUE
  218.     Else
  219.         Debug-Output "NWLINK.INF: Unrecognized option"
  220.     Endif
  221.     Debug-Output "NWLINK.INF: Start the install"
  222.     StartWait
  223.     ifstr(i) $(DoNWLINK) == TRUE
  224.         Set ThisOption = NWLINK
  225.         Set OEM_ABANDON_SOFTWARE = >($(OEM_ABANDON_SOFTWARE), $(Product$(ThisOption)Name))
  226.         Debug-Output "NWLINK.INF: installing NWLINK."
  227.         Shell $(UtilityInf), AddSoftwareComponent,+
  228.             $(Manufacturer),+
  229.             $(Product$(ThisOption)Name),+
  230.             $(Product$(ThisOption)Name),+
  231.             $(Product$(ThisOption)DisplayName),+
  232.             $(STF_CONTEXTINFNAME),+
  233.             $(Product$(ThisOption)ImagePath),+
  234.             $(Product$(ThisOption)SvcType),+
  235.             "TDI",+
  236.             {"NWLINKsys"},+
  237.             ""
  238.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  239.             Debug-Output "NWLINK.INF: ShellCode error, add software component"
  240.             goto ShellCodeError
  241.         endif
  242.         set RegistryErrorIndex = $($R0)
  243.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  244.             EndWait
  245.             Debug-Output "NWLINK.INF: Registry error: add software components"
  246.             CloseRegKey $($R1)
  247.             CloseRegKey $($R2)
  248.             CloseRegKey $($R3)
  249.             CloseRegKey $($R4)
  250.             CloseRegKey $($R5)
  251.             goto fatalregistry
  252.         endif
  253.         Set NWLINKVersKeyHandle  = $($R1)
  254.         Set NWLINKRulesKeyHandle = $($R2)
  255.         Set NWLINKSvcKeyHandle   = $($R3)
  256.         Set NWLINKParmKeyHandle  = $($R4)
  257.         Set NWLINKLinkageHandle  = $($R5)
  258.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  259.                            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  260.                            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  261.                            {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  262.                            {Description,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Description)},+
  263.                            {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Name)},+
  264.                            {Review,$(NoTitle),$(!REG_VT_DWORD),1},+
  265.                            {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  266.         Shell  $(UtilityInf), AddValueList, $(NWLINKVersKeyHandle), $(NewValueList)
  267.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  268.             Debug-Output "NWLINK.INF: ShellCode error, add value list"
  269.             goto ShellCodeError
  270.         endif
  271.         set RegistryErrorIndex = $($R0)
  272.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  273.             EndWait
  274.             Debug-Output "NWLINK.INF: Registry error: add value list."
  275.             CloseRegKey $(NWLINKVersKeyHandle)
  276.             CloseRegKey $(NWLINKRulesKeyHandle)
  277.             CloseRegKey $(NWLINKSvcKeyHandle)
  278.             CloseRegKey $(NWLINKParmKeyHandle)
  279.             CloseRegkey $(NWLINKLinkageHandle)
  280.             goto fatalregistry
  281.         Endif
  282.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  283.                             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)},+
  284.                             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)BindForm)},+
  285.                             {class,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Class)},+
  286.                             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)} }
  287.         Shell  $(UtilityInf), AddValueList, $(NWLINKRulesKeyHandle), $(NewValueList)
  288.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  289.             Debug-Output "NWLINK.INF: ShellCode error."
  290.             goto ShellCodeError
  291.         endif
  292.         set RegistryErrorIndex = $($R0)
  293.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  294.             CloseRegKey $(NWLINKVersKeyHandle)
  295.             CloseRegKey $(NWLINKRulesKeyHandle)
  296.             CloseRegKey $(NWLINKParmKeyHandle)
  297.             CloseRegKey $(NWLINKLinkageHandle)
  298.             CloseRegKey $(NWLINKSvcKeyHandle)
  299.             EndWait
  300.             Debug-Output "NWLINK.INF: Registry error: add value list."
  301.             goto fatalregistry
  302.         endif
  303.         Shell $(UtilityInf) AddValueList, $(NWLINKParmKeyHandle),+
  304.             {{"WindowSize", $(NoTitle), $(!REG_VT_DWORD), 4} +
  305.              {"KeepaliveTimeout", $(NoTitle), $(!REG_VT_DWORD), 12} +
  306.              {"KeepaliveCount",   $(NoTitle), $(!REG_VT_DWORD), 8} +
  307.              {"ConnectionTimeout",$(NoTitle), $(!REG_VT_DWORD), 2} +
  308.              {"ConnectionCount",  $(NoTitle), $(!REG_VT_DWORD), 10} +
  309.              {"RipTimeout",       $(NoTitle), $(!REG_VT_DWORD), 1} +
  310.              {"RipCount",         $(NoTitle), $(!REG_VT_DWORD), 5}}
  311.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  312.             Debug-Output "NWLINK.INF: ShellCode error."
  313.             goto ShellCodeError
  314.         endif
  315.         set RegistryErrorIndex = $($R0)
  316.         CloseRegKey $(NWLINKVersKeyHandle)
  317.         CloseRegKey $(NWLINKRulesKeyHandle)
  318.         CloseRegKey $(NWLINKParmKeyHandle)
  319.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  320.             CloseRegKey $(NWLINKLinkageHandle)
  321.             CloseRegKey $(NWLINKSvcKeyHandle)
  322.             EndWait
  323.             Debug-Output "NWLINK.INF: Registry error: add value list."
  324.             goto fatalregistry
  325.         endif
  326.         Set NewValueList = {{OtherDependencies,$(NoTitle),$(!REG_VT_MULTI_SZ),{"NWLINKsys"}}}
  327.         Shell  $(UtilityInf), AddValueList, $(NWLINKLinkageHandle), $(NewValueList)
  328.         CloseRegKey $(NWLINKLinkageHandle)
  329.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  330.             CloseRegKey $(NWLINKSvcKeyHandle)
  331.             Debug-Output "NWLINK.INF: ShellCode error."
  332.             goto ShellCodeError
  333.         endif
  334.         CreateRegKey $(NWLINKSvcKeyHandle) {"Performance",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyPerformance
  335.         ifstr(i) $(KeyPerformance) != ""
  336.             Set NewValueList = {+
  337.                 {Close,$(NoTitle),$(!REG_VT_SZ),"CloseIPXPerformanceData"},+
  338.                 {Collect,$(NoTitle),$(!REG_VT_SZ),"CollectIPXPerformanceData"},+
  339.                 {Library,$(NoTitle),$(!REG_VT_SZ),"perfctrs.dll"},+
  340.                 {Open,$(NoTitle),$(!REG_VT_SZ),"OpenIPXPerformanceData"},+
  341.                 }
  342.             Shell  $(UtilityInf), AddValueList, $(KeyPerformance), $(NewValueList)
  343.             CloseRegKey $(KeyPerformance)
  344.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  345.                 Debug-Output "NWLINK.INF: ShellCode error."
  346.                 goto ShellCodeError
  347.             endif
  348.         endif
  349.         Shell "" CreateNWLINKConfiguration $(NWLINKSvcKeyHandle)
  350.         CloseRegKey $(NWLINKSvcKeyHandle)
  351.         Set RegistryErrorIndex = $($R0)
  352.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  353.             EndWait
  354.             Debug-Output "NWLINK.INF: Registry error: Create NWLINK configuration."
  355.             goto fatalregistry
  356.         endif
  357.         Shell $(UtilityInf) AddRpcProtocol "ncacn_nb_ipx" "rpcltc5.dll" "rpclts5.dll"
  358.         Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  359.             Debug-Output "OEMNXPIP.INF: ShellCode error adding RPC procotol for IPX"
  360.             goto ShellCodeError
  361.         Endif
  362.         Set RegistryErrorIndex = $($R0)
  363.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  364.             Debug-Output "OEMNXPIP.INF: ERROR adding RPC protocol data"
  365.             EndWait
  366.             goto fatalregistry
  367.         Endif
  368.         Shell $(UtilityInf) AddRpcProtocol "ncacn_spx" "rpcltc6.dll" "rpclts6.dll"
  369.         Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  370.             Debug-Output "OEMNXPIP.INF: ShellCode error adding RPC procotol for SPX"
  371.             goto ShellCodeError
  372.         endif
  373.         Set RegistryErrorIndex = $($R0)
  374.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  375.             Debug-Output "OEMNXPIP.INF: ERROR adding RPC protocol data (2)"
  376.             EndWait
  377.             goto fatalregistry
  378.         Endif
  379.     Endif
  380.     Ifstr(i) $(DoNWLINKsys) == TRUE
  381.         Set ThisOption = NWLINKSYS
  382.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(Product$(ThisOption)Name))
  383.         Debug-Output "NWLINK.INF: installing NWLINKSYS..."
  384.         Shell $(UtilityInf), CreateService,+
  385.             $(Product$(ThisOption)Name),+
  386.             $(Product$(ThisOption)DisplayName),+
  387.             $(Product$(ThisOption)ImagePath),+
  388.             $(Product$(ThisOption)SvcType) "",+
  389.             {"Streams"}, "", $(NWLINKEventDLL), ""
  390.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  391.             Debug-Output "NWLINK.INF: ShellCode error"
  392.             goto ShellCodeError
  393.         endif
  394.         set RegistryErrorIndex = $($R0)
  395.         CloseRegKey $($R2)
  396.         CloseRegKey $($R3)
  397.         Set NWLINKSysSvcKeyHandle = $($R1)
  398.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  399.             EndWait
  400.             CloseRegKey $(NWLINKSysSvcKeyHandle)
  401.             CloseRegKey $($R2)
  402.             CloseRegKey $($R3)
  403.             Debug-Output "NWLINK.INF: Registry error: add software components"
  404.             goto fatalregistry
  405.         endif
  406.         CloseRegKey $(NWLINKSysSvcKeyHandle)
  407.         Ifstr $(RegistryErrorIndex) != NO_ERROR
  408.             goto fatalRegistry
  409.         Endif
  410.     Endif
  411.     ifstr(i) $(DoNWLINKSPX) == TRUE
  412.         Set ThisOption = NWLINKSPX
  413.         Set OEM_ABANDON_SOFTWARE = >($(OEM_ABANDON_SOFTWARE), $(Product$(ThisOption)Name))
  414.         Debug-Output "NWLINK.INF: installing NWLINKSPX."
  415.         Shell $(UtilityInf), CreateService,+
  416.             $(Product$(ThisOption)Name),+
  417.             $(Product$(ThisOption)DisplayName),+
  418.             $(Product$(ThisOption)ImagePath),+
  419.             $(Product$(ThisOption)SvcType) "",+
  420.             {}, "", $(NWLINKEventDLL), ""
  421.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  422.             Debug-Output "NWLINK.INF: ShellCode error, add software component"
  423.             goto ShellCodeError
  424.         endif
  425.         set RegistryErrorIndex = $($R0)
  426.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  427.             EndWait
  428.             Debug-Output "NWLINK.INF: Registry error: add software components"
  429.             CloseRegKey $($R1)
  430.             CloseRegKey $($R2)
  431.             CloseRegKey $($R3)
  432.             goto fatalregistry
  433.         endif
  434.         Set NWLINKSPXSvcKeyHandle   = $($R1)
  435.         CloseRegKey $($R2)
  436.         Set NWLINKSPXLinkageHandle   = $($R3)
  437.         Set NewValueList = {{Export,$(NoTitle),$(!REG_VT_MULTI_SZ),{"\Device\Streams\NWLINKSPX"}}}
  438.         Shell  $(UtilityInf), AddValueList, $(NWLINKSPXLinkageHandle), $(NewValueList)
  439.         CloseRegKey $(NWLINKSPXLinkageHandle)
  440.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  441.             CloseRegKey $(NWLINKSPXSvcKeyHandle)
  442.             Debug-Output "NWLINK.INF: ShellCode error."
  443.             goto ShellCodeError
  444.         endif
  445.         CreateRegKey $(NWLINKSPXSvcKeyHandle) {"Performance",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyPerformance
  446.         ifstr(i) $(KeyPerformance) != ""
  447.             Set NewValueList = {+
  448.                 {Close,$(NoTitle),$(!REG_VT_SZ),"CloseSPXPerformanceData"},+
  449.                 {Collect,$(NoTitle),$(!REG_VT_SZ),"CollectSPXPerformanceData"},+
  450.                 {Library,$(NoTitle),$(!REG_VT_SZ),"perfctrs.dll"},+
  451.                 {Open,$(NoTitle),$(!REG_VT_SZ),"OpenSPXPerformanceData"},+
  452.                 }
  453.             Shell  $(UtilityInf), AddValueList, $(KeyPerformance), $(NewValueList)
  454.             CloseRegKey $(KeyPerformance)
  455.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  456.                 Debug-Output "NWLINK.INF: ShellCode error."
  457.                 goto ShellCodeError
  458.             endif
  459.         endif
  460.         CloseRegKey $(NWLINKSPXSvcKeyHandle)
  461.         Set RegistryErrorIndex = $($R0)
  462.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  463.             EndWait
  464.             Debug-Output "NWLINK.INF: Registry error: Create NWLINK configuration."
  465.             goto fatalregistry
  466.         endif
  467.     Endif
  468.     Ifstr(i) $(DoNWNBLINK) == TRUE
  469.         Set ThisOption = NWNBLINK
  470.         Set OEM_ABANDON_SOFTWARE = >($(OEM_ABANDON_SOFTWARE), $(Product$(ThisOption)Name))
  471.         Debug-Output "NWLINK.INF: installing NWNBLINK..."
  472.         Shell $(UtilityInf), AddSoftwareComponent,+
  473.             $(Manufacturer),+
  474.             $(Product$(ThisOption)Name),+
  475.             $(Product$(ThisOption)Name),+
  476.             $(Product$(ThisOption)DisplayName),+
  477.             $(STF_CONTEXTINFNAME),+
  478.             $(Product$(ThisOption)ImagePath),+
  479.             $(Product$(ThisOption)SvcType),+
  480.             "TDI",+
  481.             {},+
  482.             ""
  483.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  484.             Debug-Output "NWLINK.INF: ShellCode error"
  485.             goto ShellCodeError
  486.         endif
  487.         set RegistryErrorIndex = $($R0)
  488.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  489.             EndWait
  490.             Debug-Output "NWLINK.INF: Registry error: add software components"
  491.             CloseRegKey $($R1)
  492.             CloseRegKey $($R2)
  493.             CloseRegKey $($R3)
  494.             CloseRegKey $($R4)
  495.             CloseRegKey $($R5)
  496.             goto fatalregistry
  497.         endif
  498.         Set NWNBLINKProductKey      = $($R1)
  499.         Set NWNBLINKNetRuleKey      = $($R2)
  500.         Set NWNBLINKServiceKey      = $($R3)
  501.         Set NWNBLINKParameterKey    = $($R4)
  502.         Set NWNBLINKLinkageKey      = $($R5)
  503.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  504.                            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  505.                            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  506.                            {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  507.                            {Description,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Description)},+
  508.                            {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Name)},+
  509.                            {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  510.         Shell  $(UtilityInf), AddValueList, $(NWNBLINKProductKey), $(NewValueList)
  511.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  512.             Debug-Output "NWLINK.INF: ShellCode error."
  513.             goto ShellCodeError
  514.         endif
  515.         set RegistryErrorIndex = $($R0)
  516.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  517.             EndWait
  518.             Debug-Output "NWLINK.INF: Registry error: add value list."
  519.             CloseRegKey $(NWNBLINKProductKey)
  520.             CloseRegKey $(NWNBLINKNetRuleKey)
  521.             CloseRegKey $(NWNBLINKServiceKey)
  522.             CloseRegKey $(NWNBLINKParameterKey)
  523.             CloseRegKey $(NWNBLINKLinkageKey)
  524.             goto fatalregistry
  525.         endif
  526.         set NewValueList = {{OtherDependencies,$(NoTitle),$(!REG_VT_MULTI_SZ),{"NWLINKIPX","NWNBLINKsys"}}}
  527.         Shell  $(UtilityInf), AddValueList, $(NWNBLINKLinkageKey), $(NewValueList)
  528.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  529.             Debug-Output "NWLINK.INF: ShellCode error."
  530.             goto ShellCodeError
  531.         endif
  532.         set RegistryErrorIndex = $($R0)
  533.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  534.             EndWait
  535.             Debug-Output "NWLINK.INF: Registry error: add value list."
  536.             CloseRegKey $(NWNBLINKProductKey)
  537.             CloseRegKey $(NWNBLINKNetRuleKey)
  538.             CloseRegKey $(NWNBLINKServiceKey)
  539.             CloseRegKey $(NWNBLINKParameterKey)
  540.             CloseRegKey $(NWNBLINKLinkageKey)
  541.             goto fatalregistry
  542.         endif
  543.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  544.                             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)},+
  545.                             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)BindForm)},+
  546.                             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRule$(ThisOption)ClassList)},+
  547.                             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)} }
  548.         Shell  $(UtilityInf), AddValueList, $(NWNBLINKNetRuleKey), $(NewValueList)
  549.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  550.             Debug-Output "NWLINK.INF: ShellCode error."
  551.             goto ShellCodeError
  552.         endif
  553.         set RegistryErrorIndex = $($R0)
  554.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  555.             EndWait
  556.             Debug-Output "NWLINK.INF: Registry error: add value list."
  557.             CloseRegKey $(NWNBLINKProductKey)
  558.             CloseRegKey $(NWNBLINKNetRuleKey)
  559.             CloseRegKey $(NWNBLINKServiceKey)
  560.             CloseRegKey $(NWNBLINKParameterKey)
  561.             CloseRegKey $(NWNBLINKLinkageKey)
  562.             goto fatalregistry
  563.         endif
  564.         Set NewValueList = {{NbProvider,$(NoTitle),$(!REG_VT_SZ),"_ipx"},+
  565.                 {EndPoint,$(NoTitle),$(!REG_VT_DWORD),1}}
  566.         Shell  $(UtilityInf), AddValueList, $(NWNBLINKParameterKey), $(NewValueList)
  567.         Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  568.             Debug-Output "NWLINK.INF: ShellCode error."
  569.             goto ShellCodeError
  570.         Endif
  571.         set RegistryErrorIndex = $($R0)
  572.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  573.             EndWait
  574.             CloseRegKey $(NWNBLINKProductKey)
  575.             CloseRegKey $(NWNBLINKNetRuleKey)
  576.             CloseRegKey $(NWNBLINKServiceKey)
  577.             CloseRegKey $(NWNBLINKParameterKey)
  578.             CloseRegKey $(NWNBLINKLinkageKey)
  579.             Debug-Output "NWLINK.INF: Registry error: add value list."
  580.             goto fatalregistry
  581.         endif
  582.         Shell $(UtilityInf) AddValueList, $(NWNBLINKParameterKey),+
  583.             {{"KeepaliveTimeout", $(NoTitle), $(!REG_VT_DWORD), 60} +
  584.              {"KeepaliveCount",   $(NoTitle), $(!REG_VT_DWORD), 8} +
  585.              {"ConnectionTimeout",$(NoTitle), $(!REG_VT_DWORD), 2} +
  586.              {"ConnectionCount",  $(NoTitle), $(!REG_VT_DWORD), 5} +
  587.              {"BroadcastTimeout", $(NoTitle), $(!REG_VT_DWORD), 1} +
  588.              {"BroadcastCount",   $(NoTitle), $(!REG_VT_DWORD), 3} +
  589.              {"Internet",         $(NoTitle), $(!REG_VT_DWORD), 1}}
  590.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  591.             Debug-Output "NWLINK.INF: ShellCode error."
  592.             goto ShellCodeError
  593.         endif
  594.         set RegistryErrorIndex = $($R0)
  595.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  596.             EndWait
  597.             CloseRegKey $(NWNBLINKProductKey)
  598.             CloseRegKey $(NWNBLINKNetRuleKey)
  599.             CloseRegKey $(NWNBLINKServiceKey)
  600.             CloseRegKey $(NWNBLINKParameterKey)
  601.             CloseRegKey $(NWNBLINKLinkageKey)
  602.             Debug-Output "NWLINK.INF: Registry error: add value list."
  603.             goto fatalregistry
  604.         endif
  605.         CreateRegKey $(NWNBLINKServiceKey) {"Performance",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyPerformance
  606.         ifstr(i) $(KeyPerformance) != ""
  607.             Set NewValueList = {+
  608.                 {Close,$(NoTitle),$(!REG_VT_SZ),"CloseNWNBPerformanceData"},+
  609.                 {Collect,$(NoTitle),$(!REG_VT_SZ),"CollectNWNBPerformanceData"},+
  610.                 {Library,$(NoTitle),$(!REG_VT_SZ),"perfctrs.dll"},+
  611.                 {Open,$(NoTitle),$(!REG_VT_SZ),"OpenNWNBPerformanceData"},+
  612.                 }
  613.             Shell  $(UtilityInf), AddValueList, $(KeyPerformance), $(NewValueList)
  614.             CloseRegKey $(KeyPerformance)
  615.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  616.                 Debug-Output "NWLINK.INF: ShellCode error."
  617.                 goto ShellCodeError
  618.             endif
  619.             set RegistryErrorIndex = $($R0)
  620.         endif
  621.         CloseRegKey $(NWNBLINKProductKey)
  622.         CloseRegKey $(NWNBLINKNetRuleKey)
  623.         CloseRegKey $(NWNBLINKServiceKey)
  624.         CloseRegKey $(NWNBLINKParameterKey)
  625.         CloseRegKey $(NWNBLINKLinkageKey)
  626.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  627.             EndWait
  628.             Debug-Output "NWLINK.INF: Registry error: add value list."
  629.             goto fatalregistry
  630.         endif
  631.     Endif
  632.     Ifstr(i) $(DoNWNBLINKsys) == TRUE
  633.         Set ThisOption = NWNBLINKSYS
  634.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(Product$(ThisOption)Name))
  635.         Debug-Output "NWLINK.INF: installing NWNBLINKSYS..."
  636.         Shell $(UtilityInf), CreateService,+
  637.             $(Product$(ThisOption)Name),+
  638.             $(Product$(ThisOption)DisplayName),+
  639.             $(Product$(ThisOption)ImagePath),+
  640.             $(Product$(ThisOption)SvcType), "", {"Streams"}, "",+
  641.             $(NWNBLINKEventDLL)
  642.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  643.             Debug-Output "NWLINK.INF: ShellCode error"
  644.             goto ShellCodeError
  645.         endif
  646.         set RegistryErrorIndex = $($R0)
  647.         CloseRegKey $($R1)
  648.         CloseRegKey $($R2)
  649.         CloseRegKey $($R3)
  650.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  651.             EndWait
  652.             Debug-Output "NWLINK.INF: Registry error: add software components"
  653.             goto fatalregistry
  654.         endif
  655.     Endif
  656.     Ifstr(i) $(DoAFD) == TRUE
  657.         Shell $(UtilityInf) AddAFD
  658.     Endif
  659.     EndWait
  660.     Ifint $(BillboardVisible) != 0
  661.         Shell "subroutn.inf" PopBillboard
  662.         Set BillboardVisible = 0
  663.     Endif
  664.     ifstr(i) $(DoStreams) == TRUE
  665.         Set ThisOption = STREAMS
  666.         Debug-Output "NWLINK.INF: installing STREAMS..."
  667.         Set !STF_SRCDIR_OVERRIDE = $(SrcDir)
  668.         Shell $(UtilityInf) AddStreams
  669.         Set !STF_SRCDIR_OVERRIDE = ""
  670.         set RegistryErrorIndex = $($R0)
  671.         ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  672.             EndWait
  673.             goto fatalregistry
  674.         endif
  675.         Set OEM_ABANDON_SOFTWARE = >($(OEM_ABANDON_SOFTWARE), Streams)
  676.     endif
  677.     goto successful
  678. configureadapter = +
  679.     Debug-Output "NWLINK.INF: At ConfigureAdapter"
  680.     ifstr(i) $(Option) == "NWLINK"
  681.         Set BindList = {}
  682.         Set DisabledList = {}
  683.         OpenRegKey $(!REG_H_LOCAL) "" $(LinkageKeyName) $(MAXIMUM_ALLOWED) LinkageKey
  684.         ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  685.             GetRegValue $(LinkageKey) "Bind" BindList
  686.             ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  687.                set BindList = *($(BindList),4)
  688.             else
  689.                Set BindList = {}
  690.             endif
  691.             OpenRegKey $(LinkageKey) "" Disabled $(MAXIMUM_ALLOWED) DisabledKey
  692.             ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  693.                 GetRegValue $(DisabledKey) "Bind" DisabledList
  694.                 ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  695.                    Set DisabledList = *($(DisabledList),4)
  696.                 else
  697.                    Set DisabledList = {}
  698.                 endif
  699.                 CloseRegKey $(DisabledKey)
  700.             endif
  701.             CloseRegKey $(LinkageKey)
  702.         endif
  703.         ForListDo $(DisabledList)
  704.             Set BindList = >($(BindList),$($))
  705.         EndForListDo
  706.         ifstr(i) $(BindList) == {}
  707.             debug-output "NWLINK.INF: no binding info; warning user"
  708.             read-syms InfoDlgCantConfigure
  709.             goto infomsg
  710.         endif
  711.         Debug-Output "NWLINK.INF: configureadapter, BindList = "$(BindList)
  712.         set OldVersionExisted = $(TRUE)
  713.         set CardList = ""
  714.         ForListDo $(BindList)
  715.             Split-String $($), "\", BindInfo
  716.             QueryListSize BindElem $(BindInfo)
  717.             Set BindName = *($(BindInfo),$(BindElem))
  718.             OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(BindName) $(MAXIMUM_ALLOWED) CardServiceKey
  719.             ifstr(i) $(CardServiceKey) != ""
  720.                 CloseRegKey $(CardServiceKey)
  721.                 Set CardList = $(CardList)"@"$(BindName)
  722.             endif
  723.         EndForListDo
  724.         ifstr(i) $(CardList) != ""
  725.             Debug-Output "NWLINK.INF: configureadapter, CardList = "$(CardList)
  726.             set FLibraryErrCtl = 1
  727.             LoadLibrary "x", $(!STF_WINDOWSSYSPATH)\nwlnkcfg.dll NWLINKLIB_HANDLE
  728.             LibraryProcedure ResultList, $(NWLINKLIB_HANDLE), nwlink_setup_dialog, $(!STF_HWND), +
  729.                             $(CardList), $(!STF_COMPUTERNAME), $(!STF_WINDOWSSYSPATH)\nwlnkcfg.dll
  730.             FreeLibrary $(NWLINKLIB_HANDLE)
  731.             set FLibraryErrCtl = 0
  732.             Debug-Output "NWLINK.INF: configureadapter, ResultList = "$(ResultList)
  733.             Set Result = *($(ResultList),1)
  734.             Set AdapterChosen = *($(ResultList),2)
  735.             Ifint $(Result) == 0
  736.                 set CommonStatus = STATUS_NO_EFFECT
  737.             Else
  738.                 set CommonStatus = STATUS_REBOOT
  739.                 Ifstr(i) $(AdapterChosen) != ""
  740.                      Set BindingChosen = ""
  741.                      ForListDo $(BindList)
  742.                          Split-String $($), "\", BindInfo
  743.                          QueryListSize BindElem $(BindInfo)
  744.                          Set AdapterName = *($(BindInfo),$(BindElem))
  745.                          Ifstr(i) $(AdapterName) == $(AdapterChosen)
  746.                              Set BindingChosen = $($)
  747.                          Endif
  748.                      EndForListDo
  749.                      Ifstr(i) $(BindingChosen) != ""
  750.                          Debug-Output "NWLINK.INF: configureadapter, BindingChosen = "$(BindingChosen)
  751.                          set FLibraryErrCtl = 1
  752.                          LibraryProcedure ResultList $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), +
  753.                                ACTIVBIND, $(ProductNWLINKName) {$(BindingChosen)}
  754.                          Set Result = *($(ResultList),1)
  755.                          set FLibraryErrCtl = 0
  756.                          Debug-Output "NWLINK.INF: configureadapter, ACTIVBIND returned error: "$(Result)
  757.                      Else
  758.                          Debug-Output "NWLINK.INF: configureadapter, ERROR: AdapterChosen not found in bindings list!"
  759.                      Endif
  760.                 Endif
  761.             Endif
  762.         else
  763.             set CommonStatus = STATUS_USERCANCEL
  764.         endif
  765.     else
  766.         Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  767.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  768.             Debug-Output "OEMNXPIP.INF: ShellCode error: cannot get an error string."
  769.             goto ShellCodeError
  770.         endif
  771.         set Error = $($R0)
  772.         set from = end
  773.         set to = end
  774.         set CommonStatus = STATUS_NO_EFFECT
  775.         goto nonfatal
  776.     endif
  777.     goto end
  778. bindingadapter =+
  779.     set FLibraryErrCtl = 1
  780.     LibraryProcedure ResultList, $(!NCPA_HANDLE), CPlSetup, $(!STF_HWND), MCSCFGCHK "NWLINKIPX"
  781.     set FLibraryErrCtl = 0
  782.     Set Result = *($(ResultList),1)
  783.     ifint $(Result) == 0
  784.         Debug-Output "OEMNXPIP.INF:  reconfiguration not required"
  785.         set CommonStatus = STATUS_USERCANCEL
  786.         goto successful
  787.     else
  788.         Debug-Output "OEMNXPIP.INF:  reconfiguration required"
  789.     endif
  790.     goto configureadapter
  791. removeadapter = +
  792.     Debug-Output "NWLINK.INF: At removeadapter"
  793.     Shell $(UtilityInf) RemoveRpcProtocol "ncacn_nb_ipx"
  794.     Ifstr(i) $($0) != NO_ERROR
  795.         Debug-Output "OEMNXPIP.INF: ERROR deleting IPX RPC protocol data"
  796.     Endif
  797.     Shell $(UtilityInf) RemoveRpcProtocol "ncacn_spx"
  798.     Ifstr(i) $($0) != NO_ERROR
  799.         Debug-Output "OEMNXPIP.INF: ERROR deleting SPX RPC protocol data"
  800.     Endif
  801.     ForListDo $(OEM_ABANDON_SOFTWARE)
  802.         DEBUG-OUTPUT "Remove component: "$($)
  803.         ifstr(i) $($) == "Streams"
  804.             Shell $(UtilityInf), RemoveStreams
  805.         else
  806.             Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), $($)
  807.         endif
  808.     EndForListDo
  809.     ForListDo  $(OEM_ABANDON_OPTIONS)
  810.         DEBUG-OUTPUT "Remove component: "$($)
  811.         ifstr(i) $($) != $(ProductNWLINKSPXName)
  812.             Set UseSvcctrl = "YES"
  813.         else
  814.             Set UseSvcctrl = "NO"
  815.         endif
  816.         Shell $(UtilityInf), RemoveService, $($), $(UseSvcctrl)
  817.     EndForListDo
  818.     goto end
  819. UpgradeSoftware = +
  820.     Debug-Output "NWLINK.INF: At UpgradeSoftware"
  821.     ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  822.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  823.         Ifstr $(KeyProduct) != $(KeyNull)
  824.             GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  825.             set Version = *($(VersionInfo), 4)
  826.             Split-String $(!NTN_Infname), "\", FilenameList
  827.             QueryListSize ListSize $(FilenameList)
  828.             set !UG_Filename = *($(FilenameList), $(ListSize))
  829.             install "Install-Update"
  830.             ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  831.                 goto fatal
  832.             endif
  833.             SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  834.             SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  835.             ifint $(Version) != $(ProductVersion)
  836.             endif
  837.             CloseRegKey $(KeyProduct)
  838.         else
  839.             goto fatalregistry
  840.         endif
  841.     endif
  842.     goto end
  843. successful = +
  844.     goto end
  845. infomsg =+
  846.    read-syms InfoDlg
  847.    ui start "Warning"
  848.    set CommonStatus = STATUS_USERCANCEL
  849.    goto end
  850. warning = +
  851.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  852.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  853.         goto ShellCodeError
  854.     endif
  855.     ifstr(i) $($R1) == "OK"
  856.         goto $(to)
  857.     else-ifstr(i) $($R1) == "CANCEL"
  858.         goto $(from)
  859.     else
  860.         goto "end"
  861.     endif
  862. nonfatal = +
  863.     ifstr(i) $(Error) == ""
  864.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  865.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  866.             goto ShellCodeError
  867.         endif
  868.         set Error = $($R0)
  869.     endif
  870.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(Error)
  871.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  872.         goto ShellCodeError
  873.     endif
  874.     ifstr(i) $($R1) == "OK"
  875.         goto $(from)
  876.     else
  877.         goto "end"
  878.     endif
  879. fatalregistry = +
  880.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  881.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  882.         goto ShellCodeError
  883.     endif
  884.     set Error = $($R0)
  885.     goto fatal
  886. fatal = +
  887.     ifstr(i) $(Error) == ""
  888.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  889.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  890.             goto ShellCodeError
  891.         endif
  892.         set Error = $($R0)
  893.     endif
  894.     Ifint $(BillboardVisible) != 0
  895.         Shell "subroutn.inf" PopBillboard
  896.         Set BillboardVisible = 0
  897.     Endif
  898.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  899.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  900.         goto ShellCodeError
  901.     endif
  902.    goto setfailed
  903. ShellCodeError = +
  904.     set DlgType      = "MessageBox"
  905.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  906.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  907.     set STF_MB_TYPE  = 1
  908.     set STF_MB_ICON  = 3
  909.     set STF_MB_DEF   = 1
  910.     ui start "Error Message"
  911.     goto setfailed
  912. setfailed = +
  913.     set CommonStatus = STATUS_FAILED
  914.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  915.         set OEM_ABANDON_ON = FALSE
  916.         goto removeadapter
  917.     endif
  918.     goto end
  919. end = +
  920.     goto term
  921. term = +
  922.     Return $(CommonStatus)
  923. [CreateNWLINKConfiguration]
  924.     read-syms GeneralConstants
  925.     Set NWLINKSvcKeyHandle = $($0)
  926.     Debug-Output "NWLINK.INF: installing NWLINK configuration:"
  927.     CreateRegKey $(NWLINKSvcKeyHandle) {"NetConfig",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyNetConfig
  928.     CreateRegKey $(KeyNetConfig) {"Driver01",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyDriver
  929.     Shell $(UtilityInf) AddValueList, $(KeyDriver),+
  930.         {{"AdapterName",      $(NoTitle), $(!REG_VT_SZ),    ""} +
  931.          {"NetworkNumber",    $(NoTitle), $(!REG_VT_DWORD), 0} +
  932.          {"PktType",          $(NoTitle), $(!REG_VT_DWORD), 1} +
  933.          {"BindSap",          $(NoTitle), $(!REG_VT_DWORD), 33079} +
  934.          {"SourceRouting",    $(NoTitle), $(!REG_VT_DWORD), 1} +
  935.          {"SourceRouteDef",   $(NoTitle), $(!REG_VT_DWORD), 0} +
  936.          {"SourceRouteBcast", $(NoTitle), $(!REG_VT_DWORD), 0} +
  937.          {"SourceRouteMcast", $(NoTitle), $(!REG_VT_DWORD), 0} +
  938.          {"EnableFuncaddr",   $(NoTitle), $(!REG_VT_DWORD), 1} +
  939.          {"MaxPktSize",       $(NoTitle), $(!REG_VT_DWORD), 0}}
  940.     CloseRegKey $(KeyDriver)
  941.     CreateRegKey $(KeyNetConfig) {"Driver02",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyDriver
  942.     Shell $(UtilityInf) AddValueList, $(KeyDriver),+
  943.         {{"AdapterName",      $(NoTitle), $(!REG_VT_SZ),    ""} +
  944.          {"NetworkNumber",    $(NoTitle), $(!REG_VT_DWORD), 0} +
  945.          {"PktType",          $(NoTitle), $(!REG_VT_DWORD), 1} +
  946.          {"BindSap",          $(NoTitle), $(!REG_VT_DWORD), 33079} +
  947.          {"SourceRouting",    $(NoTitle), $(!REG_VT_DWORD), 1} +
  948.          {"SourceRouteDef",   $(NoTitle), $(!REG_VT_DWORD), 0} +
  949.          {"SourceRouteBcast", $(NoTitle), $(!REG_VT_DWORD), 0} +
  950.          {"SourceRouteMcast", $(NoTitle), $(!REG_VT_DWORD), 0} +
  951.          {"EnableFuncaddr",   $(NoTitle), $(!REG_VT_DWORD), 1} +
  952.          {"MaxPktSize",       $(NoTitle), $(!REG_VT_DWORD), 0}}
  953.     CloseRegKey $(KeyDriver)
  954.     CreateRegKey $(KeyNetConfig) {"Driver03",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyDriver
  955.     Shell $(UtilityInf) AddValueList, $(KeyDriver),+
  956.         {{"AdapterName",      $(NoTitle), $(!REG_VT_SZ),    ""} +
  957.          {"NetworkNumber",    $(NoTitle), $(!REG_VT_DWORD), 0} +
  958.          {"PktType",          $(NoTitle), $(!REG_VT_DWORD), 1} +
  959.          {"BindSap",          $(NoTitle), $(!REG_VT_DWORD), 33079} +
  960.          {"SourceRouting",    $(NoTitle), $(!REG_VT_DWORD), 1} +
  961.          {"SourceRouteDef",   $(NoTitle), $(!REG_VT_DWORD), 0} +
  962.          {"SourceRouteBcast", $(NoTitle), $(!REG_VT_DWORD), 0} +
  963.          {"SourceRouteMcast", $(NoTitle), $(!REG_VT_DWORD), 0} +
  964.          {"EnableFuncaddr",   $(NoTitle), $(!REG_VT_DWORD), 1} +
  965.          {"MaxPktSize",       $(NoTitle), $(!REG_VT_DWORD), 0}}
  966.     CloseRegKey $(KeyDriver)
  967.     CreateRegKey $(KeyNetConfig) {"Driver04",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyDriver
  968.     Shell $(UtilityInf) AddValueList, $(KeyDriver),+
  969.         {{"AdapterName",      $(NoTitle), $(!REG_VT_SZ),    ""} +
  970.          {"NetworkNumber",    $(NoTitle), $(!REG_VT_DWORD), 0} +
  971.          {"PktType",          $(NoTitle), $(!REG_VT_DWORD), 1} +
  972.          {"BindSap",          $(NoTitle), $(!REG_VT_DWORD), 33079} +
  973.          {"SourceRouting",    $(NoTitle), $(!REG_VT_DWORD), 1} +
  974.          {"SourceRouteDef",   $(NoTitle), $(!REG_VT_DWORD), 0} +
  975.          {"SourceRouteBcast", $(NoTitle), $(!REG_VT_DWORD), 0} +
  976.          {"SourceRouteMcast", $(NoTitle), $(!REG_VT_DWORD), 0} +
  977.          {"EnableFuncaddr",   $(NoTitle), $(!REG_VT_DWORD), 1} +
  978.          {"MaxPktSize",    $(NoTitle), $(!REG_VT_DWORD), 0}}
  979.     CloseRegKey $(KeyDriver)
  980.     CreateRegKey $(KeyNetConfig) {"Driver05",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyDriver
  981.     Shell $(UtilityInf) AddValueList, $(KeyDriver),+
  982.         {{"AdapterName",      $(NoTitle), $(!REG_VT_SZ),    ""} +
  983.          {"NetworkNumber",    $(NoTitle), $(!REG_VT_DWORD), 0} +
  984.          {"PktType",          $(NoTitle), $(!REG_VT_DWORD), 1} +
  985.          {"BindSap",          $(NoTitle), $(!REG_VT_DWORD), 33079} +
  986.          {"SourceRouting",    $(NoTitle), $(!REG_VT_DWORD), 1} +
  987.          {"SourceRouteDef",   $(NoTitle), $(!REG_VT_DWORD), 0} +
  988.          {"SourceRouteBcast", $(NoTitle), $(!REG_VT_DWORD), 0} +
  989.          {"SourceRouteMcast", $(NoTitle), $(!REG_VT_DWORD), 0} +
  990.          {"EnableFuncaddr",   $(NoTitle), $(!REG_VT_DWORD), 1} +
  991.          {"MaxPktSize",       $(NoTitle), $(!REG_VT_DWORD), 0}}
  992.     CloseRegKey $(KeyDriver)
  993.     CloseRegKey $(KeyNetConfig)
  994. CreateNWLINKConfigDone = +
  995.     Debug-Output "NWLINK.INF: installing NWLINK.....done."
  996.     Return NO_ERROR
  997. [Install-Option]
  998.     set STF_VITAL = ""
  999.     ifstr(i) $(!AddCopy) == "YES"
  1000.         Debug-Output "NWLINK.INF: Adding files to copy list"
  1001.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1002.         AddSectionFilesToCopyList Files-NWLINKEXE $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1003.     endif
  1004.     ifstr(i) $(DoCopy) == "YES"
  1005.        Debug-Output "NWLINK.INF: Copying Files"
  1006.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1007.        CopyFilesInCopyList
  1008.     endif
  1009.     ifstr(i) $(DoConfig) == "YES"
  1010.     endif
  1011.     Exit
  1012. [Install-Update]
  1013.    set STF_VITAL        = ""
  1014.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  1015.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1016.    AddSectionFilesToCopyList Files-NWLINKEXE $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1017.    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1018.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1019.    CopyFilesInCopyList
  1020.    Exit
  1021. [Source Media Descriptions]
  1022.     1    = "Windows NT Advanced Server Setup Disk #1"   , TAGFILE = disk1
  1023.     2    = "Windows NT Advanced Server Setup Disk #2"   , TAGFILE = disk2
  1024.     3    = "Windows NT Advanced Server Setup Disk #3"   , TAGFILE = disk3
  1025.     4    = "Windows NT Advanced Server Setup Disk #4"   , TAGFILE = disk4
  1026.     5    = "Windows NT Advanced Server Setup Disk #5"   , TAGFILE = disk5
  1027.     6    = "Windows NT Advanced Server Setup Disk #6"   , TAGFILE = disk6
  1028.     7    = "Windows NT Advanced Server Setup Disk #7"   , TAGFILE = disk7
  1029.     8    = "Windows NT Advanced Server Setup Disk #8"   , TAGFILE = disk8
  1030.     9    = "Windows NT Advanced Server Setup Disk #9"   , TAGFILE = disk9
  1031.     10    = "Windows NT Advanced Server Setup Disk #10"  , TAGFILE = disk10
  1032.     11    = "Windows NT Advanced Server Setup Disk #11"  , TAGFILE = disk11
  1033.     12    = "Windows NT Advanced Server Setup Disk #12"  , TAGFILE = disk12
  1034.     13    = "Windows NT Advanced Server Setup Disk #13"  , TAGFILE = disk13
  1035.     14    = "Windows NT Advanced Server Setup Disk #14"  , TAGFILE = disk14
  1036.     15    = "Windows NT Advanced Server Setup Disk #15"  , TAGFILE = disk15
  1037.     16    = "Windows NT Advanced Server Setup Disk #16"  , TAGFILE = disk16
  1038.     17    = "Windows NT Advanced Server Setup Disk #17"  , TAGFILE = disk17
  1039.     18    = "Windows NT Advanced Server Setup Disk #18"  , TAGFILE = disk18
  1040.     19    = "Windows NT Advanced Server Setup Disk #19"  , TAGFILE = disk19
  1041.     20    = "Windows NT Advanced Server Setup Disk #20"  , TAGFILE = disk20
  1042.     21    = "Windows NT Advanced Server Setup Disk #21"  , TAGFILE = disk21
  1043.     22    = "Windows NT Advanced Server Setup Disk #22"  , TAGFILE = disk22
  1044.     23    = "Windows NT Advanced Server Setup Disk #23"  , TAGFILE = disk23
  1045.     24    = "Windows NT Advanced Server Setup Disk #24"  , TAGFILE = disk24
  1046.     25    = "Windows NT Advanced Server Setup Disk #25"  , TAGFILE = disk25
  1047.     26    = "Windows NT Advanced Server Setup Disk #26"  , TAGFILE = disk26
  1048.     27    = "Windows NT Advanced Server Setup Disk #27"  , TAGFILE = disk27
  1049.     28    = "Windows NT Advanced Server Setup Disk #28"  , TAGFILE = disk28
  1050.     29    = "Windows NT Advanced Server Setup Disk #29"  , TAGFILE = disk29
  1051. [ProductType]
  1052. STF_PRODUCT  = LanmanNT
  1053. STF_PLATFORM = I386
  1054. [Files-Inf]
  1055. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  1056. [Files-NWLINK]
  1057. 10,NWLINK.SYS , SIZE=68096
  1058. 10,NWNBLINK.SYS , SIZE=55296
  1059. [Files-NWLINKEXE]
  1060. 10,NWLNKCFG.DLL , SIZE=19968
  1061. 10,NWLNKMSG.DLL , SIZE=9216
  1062. 10,NWNBLINK.DLL , SIZE=9216
  1063. 10,WSHNWLNK.DLL , SIZE=16384
  1064. 10,IPXROUTE.EXE , SIZE=13824
  1065. 10,NWLNKSVC.EXE , SIZE=43008
  1066. 10,NWNBLINK.EXE , SIZE=25088
  1067. [LanguagesSupported]
  1068.     ENG
  1069. [OptionsTextENG]
  1070.     NWLINK     = "NWLink IPX/SPX Compatible Transport"
  1071. [FileConstantsENG]
  1072. ProCaption   = "Windows NT Setup"
  1073. ProCancel    = "Cancel"
  1074. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  1075.                "Are you sure you want to cancel copying files?"
  1076. ProCancelCap = "Network Setup Message"
  1077. ProText1     = "Copying:"
  1078. ProText2     = "To:"
  1079. FunctionTitle            = "NWLink Setup"
  1080. ProductNWLINKDescription  = "NWLink Transport Driver"
  1081. ProductNWNBLINKDescription   = "NWLink NetBIOS Driver"
  1082. ProductNWLINKDisplayName = "NWLink"
  1083. ProductNWLINKTitle       = "NWLink Transport"
  1084. ProductNWLINKSYSDisplayName = "NWLinksys"
  1085. ProductNWLINKSYSTitle    = "NWLINK Transport Driver"
  1086. ProductNWNBLINKDisplayName  = "NWNBLink"
  1087. ProductNWNBLINKTitle        = "NWLink NetBIOS"
  1088. ProductNWNBLINKSYSDisplayName = "NWNBLinksys"
  1089. ProductNWNBLINKSYSTitle     = "NWLINK NetBIOS Driver"
  1090. CompetitorDisplayName = "Novell IPX/SPX II Transport"
  1091. ShellCodeErrorTitle     = "Error: "$(FunctionTitle)
  1092. ShellCodeErrorText      = "Shell Code Error."
  1093. [DialogConstantsENG]
  1094. Help        = "&Help"
  1095. Exit        = "Cancel"
  1096. OK          = "OK"
  1097. HelpContext = ""
  1098. Continue    = "C&ontinue"
  1099. Cancel      = "C&ancel"
  1100. [FileDependentDlgENG]
  1101. [InfoDlg]
  1102. STF_MB_TITLE = "Information Message"
  1103. DlgType      = "MessageBox"
  1104. STF_MB_TEXT  = $(InfoMsgText)
  1105. STF_MB_TYPE  = 1
  1106. STF_MB_ICON  = 5
  1107. STF_MB_DEF   = 1
  1108. [InfoDlgCantConfigure]
  1109. InfoMsgText = "The NWLINK service is not currently configured to use any adapters."+
  1110.     "  If you have just installed it, return to the Networks dialog and "+
  1111.     "click  OK.  You will then have the opportunity to configure the adapters."
  1112. [Billboard1ENG]
  1113. Status = "Installing NWLINK and related services..."
  1114. [FatalError1ENG]
  1115. Error = "Another IPX/SPX protocol driver is currently installed in this machine, "+
  1116.         "and the network interface cannot operate properly with both drivers installed. "+
  1117.         "If you still wish to install the NWLINK protocol driver, you must first "+
  1118.         "remove the "$(CompetitorDisplayName)" component."
  1119.  
  1120.  
  1121.  
  1122.