home *** CD-ROM | disk | FTP | other *** search
/ PC World 2004 March / PCWorld_2004-03_cd.bin / Hardware / VIAeth / oemsetup.inf < prev    next >
INI File  |  2003-01-15  |  179KB  |  3,910 lines

  1. ;
  2. ;  Purpose:   Netcard setup information file for Windows NT 3.51 / NT 4.0
  3. ;
  4. ;  Author:    Tevin Chen
  5. ;
  6. ;  Date:      Jan, 2003
  7. ;
  8.  
  9. [Identification]
  10.     OptionType = NetAdapter
  11. [PlatformsSupported]
  12.     PCI
  13. [Options]
  14.     FET
  15.  
  16. ;============================================================================
  17. [FileConstants]
  18. UtilityInf      = "UTILITY.INF"
  19. subroutineinf   = "SUBROUTN.INF"
  20. SoftwareType    = "driver"
  21. Exit_Code       = 0
  22. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  23. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  24. Manufacturer    = "VIA Technologies, Inc."
  25.  
  26. ; Driver Version info
  27. ; VERSION.... 3.15
  28. ProductMajorVersion = "3"
  29. ProductMinorVersion = "15"
  30. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  31.  
  32. ; DEVICE_ID....
  33. ; (0x1106 == 4358)
  34. VendorID = 4358
  35.  
  36. ProductSoftwareName     = "FETNDIS"
  37. ProductSoftwareTitle    = "VIA Rhine Family Fast Ethernet Adapter Driver"
  38. NT4Driver = "fetnd4.sys"
  39. NT351Driver = "fetnd3.sys"
  40. ProductSoftwareImagePathNT4 = "\SystemRoot\System32\drivers\"$(NT4Driver)
  41. ProductSoftwareImagePathNT351 = "\SystemRoot\System32\drivers\"$(NT351Driver)
  42. NetRuleSoftwareType     = "FETSys ndisDriver FETDriver"
  43. NetRuleSoftwareUse      = $(SoftwareType)
  44. NetRuleSoftwareBindForm = """FETSys"" yes no container"
  45. NetRuleSoftwareClass    = {"FETDriver basic"}
  46. NetRuleSoftwareSWBindable = {"FETDriver FETAdapter non exclusive 100"}
  47.  
  48. HelpFileName = "fetndh.hlp"
  49. ProductHardwareName = "FETNDIS"
  50.  
  51. ProductHardwareFETVT3106STitle = "VIA VT6105M Rhine III Management Adapter"
  52. ProductHardwareFETVT3106JTitle = "VIA VT6105 Rhine III Fast Ethernet Adapter"
  53. ProductHardwareFETVT3065Title = "VIA Rhine II Fast Ethernet Adapter"
  54. ProductHardwareFETVT3043Title = "VIA VT86C100A Rhine Fast Ethernet Adapter"
  55. ProductHardwareFETDescription = "VIA Rhine Family Fast Ethernet Adapter"
  56.  
  57. NetRuleHardwareFETType  = "FET FETAdapter"
  58. NetRuleHardwareFETClass = {"FETAdapter basic"}
  59. AdapterFETType = 5  ;; PCI board
  60. HelpFETId = 30
  61. ; DEVICE_ID....
  62. ; VT3043 (0x30431106 == 809701638)
  63. VT3043CFID = 809701638
  64.  
  65. ; VT3065 (0x30651106 == 811929862)
  66. VT3065CFID = 811929862
  67.  
  68. ; VT3106S (0x30531106 == 810750214)
  69. VT3106SCFID = 810750214
  70.  
  71. ; VT3106J (0x31061106 == 822481158)
  72. VT3106JCFID = 822481158
  73.  
  74. ; SubID....
  75. ; VT3106S (0x01061106 == 17174790 )
  76. ;VT3106SSubID = 17174790
  77.  
  78. ; VT3106J (0x01051106 == 17109254 )
  79. ;VT3106JSubID = 17109254
  80.  
  81. ; VT3065 (0x01021106 == 16912646)
  82. ;VT3065SubID = 16912646
  83.  
  84. ; VT3043 (0x01001106 == 16781574)
  85. ;VT3043SubID = 16781574
  86.  
  87. NetRuleHardwareBindForm = " yes yes container"
  88. ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  89. ;ParamKeyName   = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  90.  
  91. VT3106SDefaultParamList = { {ReceiveBuffers,$(NoTitle),$(!REG_VT_DWORD),64},+
  92.                             {TransmitBuffers,$(NoTitle),$(!REG_VT_DWORD),64},+
  93.                             {ReceiveBurstIndicate,$(NoTitle),$(!REG_VT_DWORD),64},+
  94.                             {ReceiveThreshold,$(NoTitle),$(!REG_VT_DWORD),0},+
  95.                             {TransmitThreshold,$(NoTitle),$(!REG_VT_DWORD),0},+
  96.                             {BurstLength,$(NoTitle),$(!REG_VT_DWORD),1},+
  97.                             {MapRegisters,$(NoTitle),$(!REG_VT_DWORD),32},+
  98.                             {EarlyReceive,$(NoTitle),$(!REG_VT_DWORD),0},+
  99.                             {EarlyTransmit,$(NoTitle),$(!REG_VT_DWORD),0},+
  100.                             {ValidatePacketLen,$(NoTitle),$(!REG_VT_DWORD),0},+
  101.                             {NetworkAddress,$(NoTitle),$(!REG_VT_SZ),"000000000000"},+
  102.                             {ConnectionType,$(NoTitle),$(!REG_VT_DWORD),0},+
  103.                             {NwayForce,$(NoTitle),$(!REG_VT_DWORD),1},+
  104.                             {FlowCtrl,&(NoTitle),$(!REG_VT_DWORD),0},+
  105.                             {AdaptiveInt,&(NoTitle),$(!REG_VT_DWORD),1},+
  106.                             {8021pqtag,$(NoTitle),$(!REG_VT_DWORD),0},+
  107.                             {VLANID,$(NoTitle),$(!REG_VT_DWORD),0} }
  108.  
  109. VT3106JDefaultParamList = { {ReceiveBuffers,$(NoTitle),$(!REG_VT_DWORD),64},+
  110.                             {TransmitBuffers,$(NoTitle),$(!REG_VT_DWORD),64},+
  111.                             {ReceiveBurstIndicate,$(NoTitle),$(!REG_VT_DWORD),64},+
  112.                             {ReceiveThreshold,$(NoTitle),$(!REG_VT_DWORD),0},+
  113.                             {TransmitThreshold,$(NoTitle),$(!REG_VT_DWORD),0},+
  114.                             {BurstLength,$(NoTitle),$(!REG_VT_DWORD),1},+
  115.                             {MapRegisters,$(NoTitle),$(!REG_VT_DWORD),32},+
  116.                             {EarlyReceive,$(NoTitle),$(!REG_VT_DWORD),0},+
  117.                             {EarlyTransmit,$(NoTitle),$(!REG_VT_DWORD),0},+
  118.                             {ValidatePacketLen,$(NoTitle),$(!REG_VT_DWORD),0},+
  119.                             {NetworkAddress,$(NoTitle),$(!REG_VT_SZ),"000000000000"},+
  120.                             {ConnectionType,$(NoTitle),$(!REG_VT_DWORD),0},+
  121.                             {NwayForce,$(NoTitle),$(!REG_VT_DWORD),1},+
  122.                             {FlowCtrl,&(NoTitle),$(!REG_VT_DWORD),0}, +
  123.                             {AdaptiveInt,&(NoTitle),$(!REG_VT_DWORD),1} }
  124.  
  125. VT3065DefaultParamList = { {ReceiveBuffers,$(NoTitle),$(!REG_VT_DWORD),64},+
  126.                            {TransmitBuffers,$(NoTitle),$(!REG_VT_DWORD),64},+
  127.                            {ReceiveBurstIndicate,$(NoTitle),$(!REG_VT_DWORD),64},+
  128.                            {ReceiveThreshold,$(NoTitle),$(!REG_VT_DWORD),0},+
  129.                            {TransmitThreshold,$(NoTitle),$(!REG_VT_DWORD),0},+
  130.                            {BurstLength,$(NoTitle),$(!REG_VT_DWORD),1},+
  131.                            {MapRegisters,$(NoTitle),$(!REG_VT_DWORD),32},+
  132.                            {EarlyReceive,$(NoTitle),$(!REG_VT_DWORD),0},+
  133.                            {EarlyTransmit,$(NoTitle),$(!REG_VT_DWORD),0},+
  134.                            {ValidatePacketLen,$(NoTitle),$(!REG_VT_DWORD),0},+
  135.                            {NetworkAddress,$(NoTitle),$(!REG_VT_SZ),"000000000000"},+
  136.                            {ConnectionType,$(NoTitle),$(!REG_VT_DWORD),0},+
  137.                            {NwayForce,$(NoTitle),$(!REG_VT_DWORD),1},+
  138.                            {HWPhyReset,$(NoTitle),$(!REG_VT_DWORD),0},+
  139.                            {FlowCtrl,&(NoTitle),$(!REG_VT_DWORD),0}, +
  140.                            {AdaptiveInt,&(NoTitle),$(!REG_VT_DWORD),1} }
  141.  
  142. VT3043DefaultParamList = { {ReceiveBuffers,$(NoTitle),$(!REG_VT_DWORD),64},+
  143.                            {TransmitBuffers,$(NoTitle),$(!REG_VT_DWORD),8},+
  144.                            {ReceiveBurstIndicate,$(NoTitle),$(!REG_VT_DWORD),64},+
  145.                            {ReceiveThreshold,$(NoTitle),$(!REG_VT_DWORD),0},+
  146.                            {TransmitThreshold,$(NoTitle),$(!REG_VT_DWORD),0},+
  147.                            {BurstLength,$(NoTitle),$(!REG_VT_DWORD),1},+
  148.                            {MapRegisters,$(NoTitle),$(!REG_VT_DWORD),8},+
  149.                            {EarlyReceive,$(NoTitle),$(!REG_VT_DWORD),0},+
  150.                            {EarlyTransmit,$(NoTitle),$(!REG_VT_DWORD),0},+
  151.                            {ValidatePacketLen,$(NoTitle),$(!REG_VT_DWORD),0},+
  152.                            {NetworkAddress,$(NoTitle),$(!REG_VT_SZ),"000000000000"},+
  153.                            {ConnectionType, $(NoTitle),$(!REG_VT_DWORD),0} }
  154.  
  155. ConnectionTypeParamList = { {Type,$(NoTitle),$(!REG_VT_SZ),"enum"},+
  156.                             {ParamDesc,$(NoTitle),$(!REG_VT_SZ),"Connection Type"} }
  157. ConnectionTypeEnumList = { {0,$(NoTitle),$(!REG_VT_SZ),"Auto-Negotiation"},+
  158.                            {1,$(NoTitle),$(!REG_VT_SZ),"100BaseTx Half Duplex"},+
  159.                            {2,$(NoTitle),$(!REG_VT_SZ),"100BaseTx Full Duplex"},+
  160.                            {3,$(NoTitle),$(!REG_VT_SZ),"10BaseT   Half Duplex"},+
  161.                            {4,$(NoTitle),$(!REG_VT_SZ),"10BaseT   Full Duplex"} }
  162.  
  163. NetworkAddressParamList = { {Type,$(NoTitle),$(!REG_VT_SZ),"edit"},+
  164.                             {ParamDesc,$(NoTitle),$(!REG_VT_SZ),"Network Address"},+
  165.                             {LimitText,$(NoTitle),$(!REG_VT_DWORD),12},+
  166.                             {Optional,$(NoTitle),$(!REG_VT_DWORD),0} }
  167.  
  168. TransmitBuffersParamList = { {Type,$(NoTitle),$(!REG_VT_SZ),"int"},+
  169.                              {ParamDesc,$(NoTitle),$(!REG_VT_SZ),"Transmit Buffers"},+
  170.                              {Max,$(NoTitle),$(!REG_VT_DWORD),128},+
  171.                              {Min,$(NoTitle),$(!REG_VT_DWORD),48} }
  172.  
  173. VT3043TransmitBuffersParamList = { {Type,$(NoTitle),$(!REG_VT_SZ),"int"},+
  174.                                    {ParamDesc,$(NoTitle),$(!REG_VT_SZ),"Transmit Buffers"},+
  175.                                    {Max,$(NoTitle),$(!REG_VT_DWORD),64},+
  176.                                    {Min,$(NoTitle),$(!REG_VT_DWORD),4} }
  177.  
  178. ReceiveBuffersParamList = { {Type,$(NoTitle),$(!REG_VT_SZ),"int"},+
  179.                             {ParamDesc,$(NoTitle),$(!REG_VT_SZ),"Receive Buffers"},+
  180.                             {Max,$(NoTitle),$(!REG_VT_DWORD),128},+
  181.                             {Min,$(NoTitle),$(!REG_VT_DWORD),64} }
  182.  
  183. FlowCtrlParamList = { {Type,$(NoTitle),$(!REG_VT_SZ),"enum"},+
  184.                       {ParamDesc,$(NoTitle),$(!REG_VT_SZ),"Flow Control"} }
  185. FlowCtrlEnumList = { {0,$(NoTitle),$(!REG_VT_SZ),"Hardware Default"},+
  186.                      {1,$(NoTitle),$(!REG_VT_SZ),"Disabled"},+
  187.                      {2,$(NoTitle),$(!REG_VT_SZ),"Enabled"} }
  188.  
  189. AdaptiveIntParamList = { {Type,$(NoTitle),$(!REG_VT_SZ),"enum"},+
  190.                          {ParamDesc,$(NoTitle),$(!REG_VT_SZ),"Adaptive Interrupt"} }
  191.  
  192. 8021pqtagParamList = { {Type,$(NoTitle),$(!REG_VT_SZ),"enum"},+
  193.                        {ParamDesc,$(NoTitle),$(!REG_VT_SZ),"802.1p/Q Tagging"} }
  194.  
  195. DisableEnableEnumList = { {0,$(NoTitle),$(!REG_VT_SZ),"Disabled"},+
  196.                           {1,$(NoTitle),$(!REG_VT_SZ),"Enabled"} }
  197.  
  198. VLANIDParamList = { {Type,$(NoTitle),$(!REG_VT_SZ),"int"},+
  199.                     {ParamDesc,$(NoTitle),$(!REG_VT_SZ),"VLAN ID"},+
  200.                     {Max,$(NoTitle),$(!REG_VT_DWORD),4094},+
  201.                     {Min,$(NoTitle),$(!REG_VT_DWORD),0} }
  202.  
  203. ;============================================================================
  204. [GeneralConstants]
  205. Sub  = ""
  206. from = ""
  207. to   = ""
  208. ExitCodeOk     = 0
  209. ExitCodeCancel = 1
  210. ExitCodeFatal  = 2
  211. KeyNull         = ""
  212. MAXIMUM_ALLOWED = 33554432
  213. RegistryErrorIndex = NO_ERROR
  214. KeyProduct      = ""
  215. KeyParameters   = ""
  216. TRUE            = 1
  217. FALSE           = 0
  218. NoTitle         = 0
  219. ExitState       = "Active"
  220. OldVersionExisted = $(FALSE)
  221. DriverPath      = $(!STF_NTPATH)\drivers
  222.  
  223. NT351Version = "3.51"
  224. NT40Version = "4.0"
  225.  
  226. ;============================================================================
  227. [date]
  228.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  229.  
  230. ;============================================================================
  231. [Identify]
  232.     read-syms Identification
  233.     set Status = STATUS_SUCCESSFUL
  234.     set Identifier = $(OptionType)
  235.     set Media = #("Source Media Descriptions", 1, 1)
  236.     Return $(Status) $(Identifier) $(Media)
  237.  
  238. ;============================================================================
  239. [ReturnOptions]
  240.     set Status = STATUS_FAILED
  241.     set OptionList = {}
  242.     set OptionTextList = {}
  243.  
  244.     set LanguageList = ^(LanguagesSupported, 1)
  245.     Ifcontains(i) $($0) in $(LanguageList)
  246.         ifstr(i) $($1) == ""
  247.             goto returnoptions
  248.         endif
  249.  
  250.         set PlatformList = ^(PlatformsSupported, 1)
  251.         Ifcontains(i) $($1) in $(PlatformList)
  252.             goto returnoptions
  253.         else
  254.             set Status = STATUS_NOTSUPPORTED
  255.             goto finish_ReturnOptions
  256.         endif
  257.     else
  258.         set Status = STATUS_NOLANGUAGE
  259.         goto finish_ReturnOptions
  260.     endif
  261.  
  262. ;----------------------------------------------------------------------------
  263. returnoptions = +
  264.     set OptionList = ^(Options, 1)
  265.     set OptionTextList = ^(OptionsText$($0), 1)
  266.     set Status = STATUS_SUCCESSFUL
  267.  
  268. ;----------------------------------------------------------------------------
  269. finish_ReturnOptions = +
  270.     Return $(Status) $(OptionList) $(OptionTextList)
  271.  
  272. ;============================================================================
  273. [InstallOption]
  274.     set Option   = $($1)
  275.     set SrcDir   = $($2)
  276.     set AddCopy  = $($3)
  277.     set DoCopy   = $($4)
  278.     set DoConfig = $($5)
  279.  
  280.     set LanguageList = ^(LanguagesSupported, 1)
  281.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  282.         Return STATUS_NOLANGUAGE
  283.     endif
  284.  
  285.     set-subst LF = "\n"
  286.     read-syms GeneralConstants
  287.     read-syms FileConstants
  288.     set NetRuleSoftwareBindable = $($R1)
  289.     read-syms DialogConstants$(!STF_LANGUAGE)
  290.  
  291.     ifstr(i) $(!NTN_Origination) == "NCPA"
  292.         set Continue = "OK"
  293.     endif
  294.  
  295.     read-syms FileConstants$(!STF_LANGUAGE)
  296.     detect date
  297.     set-title  $(Function$(Option)Title)
  298.     set to   = Begin
  299.     set from = Begin
  300.     set CommonStatus = STATUS_SUCCESSFUL
  301.     EndWait
  302.  
  303. ;----------------------------------------------------------------------------
  304. Begin = +
  305.  
  306.     ; Get the version of NT from registry (for NT3.51/NT4.0)
  307.     set CurrentVersionValue = ""
  308.     OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows NT\CurrentVersion" $(!REG_KEY_READ) KeyNt
  309.     ifstr(i) $(KeyNt) != ""
  310.         GetRegValue $(KeyNt) "CurrentVersion" CurrentVersionValue
  311.         CloseRegKey $(KeyNt)
  312.     endif
  313.  
  314.     set TargetVersion = *($(CurrentVersionValue),4)
  315.     set TargetOS = ""
  316.     ifstr $(TargetVersion) == $(NT351Version)
  317.         set TargetOS = "NT351"
  318.     else-ifstr $(TargetVersion) == $(NT40Version)
  319.         set TargetOS = "NT4"
  320.     else
  321.         set Error = "This driver does not support Windows NT version "*($(CurrentVersionValue),4)" !"
  322.         goto fatal
  323.     endif
  324.  
  325.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  326.         set StartLabel = removeadapter
  327.     Else-Ifstr(i) $(!NTN_InstallMode) == Update
  328.         set StartLabel = UpgradeSoftware
  329.     Else-Ifstr(i) $(!NTN_InstallMode) == bind
  330.         set StartLabel = bindingadapter
  331.     Else-Ifstr(i) $(!NTN_InstallMode) == configure
  332.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  333.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  334.             Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  335.                 goto ShellCodeError
  336.             Endif
  337.  
  338.             set Error = $($R0)
  339.             set from = end
  340.             set to = end
  341.             goto nonfatalinfo
  342.         Else
  343.             set StartLabel = configureadapter
  344.         Endif
  345.     Else
  346.         set StartLabel = installadapter
  347.         set OEM_ABANDON_OPTIONS = {}
  348.         set OEM_ABANDON_SOFTWARE = FALSE
  349.         set OEM_ABANDON_ON = TRUE
  350.     Endif
  351.  
  352.     set from = $(fatal)
  353.     set to = $(fatal)
  354.     goto $(StartLabel)
  355. ;----------------------------------------------------------------------------
  356. installadapter = +
  357.  
  358.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  359.     Ifstr $(KeyProduct) != $(KeyNull)
  360.         CloseRegKey $(KeyProduct)
  361.         Ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  362.             Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle), $(ProductVersion)
  363.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  364.                 goto ShellCodeError
  365.             endif
  366.             goto end
  367.         Else
  368.             Shell $(UtilityInf), CardExistedDlg
  369.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  370.                 goto ShellCodeError
  371.             endif
  372.  
  373.             ifstr(i) $($R1) != "OK"
  374.                 set CommonStatus = STATUS_USERCANCEL
  375.                 goto end
  376.             endif
  377.             set OldVersionExisted = $(TRUE)
  378.         Endif
  379.     Endif
  380.  
  381.     ifstr(i) $(DoCopy) == "YES"
  382.         Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  383.         Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  384.             Goto ShellCodeError
  385.         Else-Ifstr(i) $($R0) == STATUS_FAILED
  386.             Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  387.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  388.                 goto ShellCodeError
  389.             endif
  390.  
  391.             set Error = $($R0)
  392.             Goto fatal
  393.         Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  394.             Goto successful
  395.         Endif
  396.         
  397.         Set SrcDir = $($R1)
  398.     endif
  399.  
  400.     Goto installproduct
  401. ;----------------------------------------------------------------------------
  402. configureadapter = +
  403.  
  404.     Ifstr(i) $(KeyProduct) == $(KeyNull)
  405.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  406.         Ifstr $(KeyProduct) == $(KeyNull)
  407.             Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  408.             Goto fatalregistry
  409.         Endif
  410.     Endif
  411.  
  412.     Shell $(UtilityInf) FindService, $(KeyProduct)
  413.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  414.         Goto ShellCodeError
  415.     Endif
  416.  
  417.     Ifstr(i) $($R0) != NO_ERROR
  418.         Goto fatalregistry
  419.     endif
  420.  
  421.     set KeyParameters = $($R2)
  422.     CloseRegKey $($R1)
  423.  
  424.     Ifstr $(KeyParameters) == $(KeyNull)
  425.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  426.         goto fatalregistry
  427.     endif
  428.  
  429.     set OldVersionExisted = $(TRUE)
  430.     set ValueName = ""
  431.     set ValueData = ""
  432.     set ValueList = {}
  433.  
  434.     set PropKeyNameList = {}
  435.     set PropKeyDescList = {}
  436.     set KeyEnumValueList = {}
  437.     set KeyEnumDescList = {}
  438.     set DispTypeList = {}
  439.  
  440.     OpenRegKey $(KeyParameters) "" "UI" $(MAXIMUM_ALLOWED) H_UI
  441.     ifstr $(H_UI) == $(KeyNull)
  442.         set RegistryErrorIndex = UNABLE_ACCESS_CONFIGURE_SERVICE
  443.         CloseRegKey $(KeyParameters)
  444.         goto fatalregistry
  445.     endif
  446.  
  447.     set UIKeyList = {}
  448.     EnumRegKey $(H_UI) UIKeyList
  449.  
  450.     ForListDo $(UIKeyList)
  451.         set UIKeyName = *($($), 1)
  452.         set PropKeyNameList = >( $(PropKeyNameList), $(UIKeyName) )
  453.  
  454.         OpenRegKey $(H_UI) "" $(UIKeyName) $(MAXIMUM_ALLOWED) H_UIKey
  455.         ifstr $(H_UIKey) == $(KeyNull)
  456.             set RegistryErrorIndex = UNABLE_ACCESS_CONFIGURE_SERVICE
  457.             CloseRegKey $(H_UI)
  458.             goto fatalregistry
  459.         endif
  460.  
  461.         EnumRegValue $(H_UIKey) ValueList
  462.  
  463.         ForListDo $(ValueList)
  464.             set ValueName = *($($), 1)
  465.             set ValueData = *($($), 4)
  466.  
  467.             ifstr(i) $(ValueName) == "Type"
  468.                 set DisplayType = $(ValueData)
  469.                 set DispTypeList = >( $(DispTypeList), $(DisplayType) )
  470.             endif
  471.  
  472.             ifstr(i) $(ValueName) == "ParamDesc"
  473.                 set DisplayDesc = $(ValueData)
  474.                 set PropKeyDescList = >( $(PropKeyDescList), $(DisplayDesc) )
  475.             endif
  476.  
  477.             ifstr(i) $(ValueName) == "Max"
  478.                 set MaxLimit = $(ValueData)
  479.             endif
  480.  
  481.             ifstr(i) $(ValueName) == "Min"
  482.                 set MinLimit = $(ValueData)
  483.             endif
  484.         EndForListDo
  485.  
  486.         ifstr(i) $(DisplayType) == "int"
  487.             set EnumValueStr = $(MinLimit)","$(MaxLimit)
  488.             set KeyEnumValueList = >( $(KeyEnumValueList), $(EnumValueStr) )
  489.             set KeyEnumDescList = >( $(KeyEnumDescList), "" )
  490.         else-ifstr(i) $(DisplayType) == "edit"
  491.             set KeyEnumValueList = >( $(KeyEnumValueList), "" )
  492.             set KeyEnumDescList = >( $(KeyEnumDescList), "" )
  493.         else-ifstr(i) $(DisplayType) == "enum"
  494.             OpenRegKey $(H_UIKey) "" "enum" $(!REG_KEY_READ) H_Enum
  495.             ifstr $(H_Enum) == $(KeyNull)
  496.                 set RegistryErrorIndex = UNABLE_ACCESS_CONFIGURE_SERVICE
  497.                 CloseRegKey $(H_UIKey)
  498.                 goto fatalregistry
  499.             endif
  500.  
  501.             EnumRegValue $(H_Enum) EnumList
  502.  
  503.             set EnumValueStr = ""
  504.             set EnumDescStr = ""
  505.             set flag = $(FALSE)
  506.             ForListDo $(EnumList)
  507.                 set EnumValue = *($($), 1)
  508.                 set EnumDesc = *($($), 4)
  509.  
  510.                 ifint $(flag) == $(TRUE)
  511.                     set EnumValueStr = $(EnumValueStr)","$(EnumValue)
  512.                     set EnumDescStr = $(EnumDescStr)","$(EnumDesc)
  513.                 else
  514.                     set EnumValueStr = $(EnumValue)
  515.                     set EnumDescStr = $(EnumDesc)
  516.                     set flag = $(TRUE)
  517.                 endif
  518.             EndForListDo
  519.  
  520.             set KeyEnumValueList = >( $(KeyEnumValueList), $(EnumValueStr) )
  521.             set KeyEnumDescList = >( $(KeyEnumDescList), $(EnumDescStr) )
  522.         else
  523.             ; Add Error Handling Code Here
  524.         endif
  525.     EndForListDo
  526.  
  527.     EnumRegValue $(KeyParameters) ValueList
  528.  
  529.     set CurrKeyValueList = {}
  530.  
  531.     ForListDo $(PropKeyNameList)
  532.         set KeyName = $($)
  533.  
  534.         ForListDo $(ValueList)
  535.             set ValueName = *($($), 1)
  536.             set ValueData = *($($), 4)
  537.             ifstr $(ValueName) == $(KeyName)
  538.                 set CurrKeyValueList = >($(CurrKeyValueList), $(ValueData))
  539.             endif
  540.         EndForListDo
  541.     EndForListDo
  542.     ;shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) STATUS $(CurrKeyValueList)
  543.  
  544.     LoadLibrary "" $(!STF_WINDOWSSYSPATH)"\ntutil.dll" PropHandle
  545.     LibraryProcedure SetResult, $(PropHandle), ShowProp, $(PropKeyDescList), +
  546.                                                          $(CurrKeyValueList), +
  547.                                                          $(KeyEnumValueList), +
  548.                                                          $(KeyEnumDescList), +
  549.                                                          $(DispTypeList), +
  550.                                                          $(HelpFileName)
  551.     FreeLibrary $(PropHandle)
  552.  
  553.     ifstr $(SetResult) == "PROPERTY_UI_USER_CANCEL"
  554.         set CommonStatus = STATUS_USERCANCEL
  555.         goto end
  556.     endif
  557.  
  558.     ifstr $(SetResult) == $(CurrKeyValueList)
  559.         set CommonStatus = STATUS_USERCANCEL
  560.         goto end
  561.     endif
  562.  
  563.     ifstr(i) $(!NTN_InstallMode) == configure
  564.         goto updateparameters
  565.     endif
  566.  
  567. ;----------------------------------------------------------------------------
  568. installproduct =+
  569.  
  570.     StartWait
  571.     ; DEVICE_ID....
  572.     ; 65535
  573.  
  574.     ; search device ID for 3043/3065/3106J/3106S
  575.     set AdapterList65 = {}
  576.     set AdapterList43 = {}
  577.     set AdapterList106J = {}
  578.     set AdapterList106S = {}
  579.     set NoAdapter = $(TRUE)
  580.  
  581.     ; find 3043 adapters
  582.     set-div DeviceID = $(VT3043CFID) 65535
  583.     Shell $(UtilityInf), GetPCIInformation, $(VendorID) $(DeviceID)
  584.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  585.          goto ShellCodeError
  586.     endif
  587.  
  588.     ifstr(i) $($R0) != {}
  589.         set AdapterList43 = $($R0)
  590.         set NoAdapter = $(FALSE)
  591.     endif
  592.  
  593.     ; find 3065 adapters
  594.     set-div DeviceID = $(VT3065CFID) 65535
  595.     Shell $(UtilityInf), GetPCIInformation, $(VendorID) $(DeviceID)
  596.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  597.         goto ShellCodeError
  598.     endif
  599.  
  600.     ifstr(i) $($R0) != {}
  601.         set AdapterList65 = $($R0)
  602.         set NoAdapter = $(FALSE)
  603.     endif
  604.  
  605.     ; find 3106J adapters
  606.     set-div DeviceID = $(VT3106JCFID) 65535
  607.     Shell $(UtilityInf), GetPCIInformation, $(VendorID) $(DeviceID)
  608.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  609.         goto ShellCodeError
  610.     endif
  611.  
  612.     ifstr(i) $($R0) != {}
  613.         set AdapterList106J = $($R0)
  614.         set NoAdapter = $(FALSE)
  615.     endif
  616.     
  617.     ; find 3106S adapters
  618.     set-div DeviceID = $(VT3106SCFID) 65535
  619.     Shell $(UtilityInf), GetPCIInformation, $(VendorID) $(DeviceID)
  620.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  621.         goto ShellCodeError
  622.     endif
  623.  
  624.     ifstr(i) $($R0) != {}
  625.         set AdapterList106S = $($R0)
  626.         set NoAdapter = $(FALSE)
  627.     endif
  628.    
  629.     ; no adapters was found
  630.     ifint $(NoAdapter) == $(TRUE)
  631.         set Error = $(CANNOT_FIND_ANY_CARD)
  632.         set CommonStatus = USER_CANCEL
  633.         set from = end
  634.         goto nonfatal
  635.     endif
  636.     
  637.     Ifstr(i) $(DoCopy) == "YES"
  638.         Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  639.         Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  640.             Goto ShellCodeError
  641.         Else-Ifstr(i) $($R0) == STATUS_FAILED
  642.             Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  643.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  644.                 goto ShellCodeError
  645.             endif
  646.  
  647.             set Error = $($R0)
  648.             Goto fatal
  649.         Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  650.             Goto successful
  651.         Endif
  652.         Set SrcDir = $($R1)
  653.     Endif
  654.  
  655.     install "Install-Option"
  656.  
  657.     ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  658.         Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  659.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  660.             goto ShellCodeError
  661.         endif
  662.  
  663.         set Error = $($R0)
  664.         goto fatal
  665.     endif
  666.  
  667.     ; Chinghua - setting default values if user re-install the driver
  668.  
  669.     ifint $(OldVersionExisted) == $(TRUE)
  670.         ; Update InfName and InfOption
  671.         ;OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Ncpa" $(MAXIMUM_ALLOWED) H_Ncpa
  672.         ;ifstr $(H_Ncpa) == $(KeyNull)
  673.         ;    Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  674.         ;    Goto fatalregistry
  675.         ;endif
  676.  
  677.         ;GetRegValue $(H_Ncpa),"InfReturn", InfReturnList
  678.         ;set InfReturnValue = *( $(InfReturnList), 4 )
  679.  
  680.         ;Split-String $(InfReturnValue) "," DestinationList
  681.         ;set InfFileName = *( $(DestinationList), 1 )
  682.  
  683.         ;CloseRegKey $(H_Ncpa)
  684.  
  685.         Shell $(UtilityInf), ReduceInfPath, $(STF_CONTEXTINFNAME)
  686.         set InfFileName = $($R0)
  687.  
  688.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName)"\NetRules" $(MAXIMUM_ALLOWED) H_NetRules
  689.         ifstr $(H_NetRules) == $(KeyNull)
  690.             Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  691.             Goto fatalregistry
  692.         endif
  693.  
  694.         SetRegValue $(H_NetRules) {InfName,$(NoTitle),$(!REG_VT_SZ),$(InfFileName)}
  695.         SetRegValue $(H_NetRules) {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}
  696.         CloseRegKey $(H_NetRules)
  697.  
  698.         ; setting default value for 3106S ****************************
  699.         ForListDo $(AdapterList106S)
  700.             set BusNum = *( $($), 1 )
  701.             set DeviceNum = *( $($), 2 )
  702.             set Sub = "VT3106S"
  703.             set Description = $(ProductHardware$(Option)Description)
  704.             set Product = $(ProductHardwareName)
  705.  
  706.             OpenRegKey $(!REG_H_LOCAL) +
  707.                        "" +
  708.                        "SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards" +
  709.                        $(!REG_KEY_READ) +
  710.                        IE_KeyNetcards
  711.  
  712.             EnumRegKey $(IE_KeyNetcards) IE_KeyNameList
  713.  
  714.             ForListDo $(IE_KeyNameList)
  715.                 set IE_KeyName = *( $($), 1 )
  716.  
  717.                 OpenRegKey $(IE_KeyNetcards) "" $(IE_KeyName) $(!REG_KEY_READ) IE_Card
  718.                 ifstr $(IE_Card) == $(KeyNull)
  719.                     Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  720.                     Goto fatalregistry
  721.                 endif
  722.  
  723.                 GetRegValue $(IE_Card),"ProductName", ProductNameInfo
  724.                 set CardProductName = *( $(ProductNameInfo), 4 )
  725.  
  726.                 ifstr(i) $(CardProductName) == $(Product)
  727.                     GetRegValue $(IE_Card), "ServiceName", ServiceNameInfo
  728.                     set ServiceName = *( $(ServiceNameInfo), 4 )
  729.  
  730.                     OpenRegKey $(!REG_H_LOCAL) +
  731.                                "" +
  732.                                $(!NTN_ServiceBase)"\"$(ServiceName)"\Parameters" +
  733.                                $(!REG_KEY_READWRITE) +
  734.                                IE_KeyService
  735.                     ifstr $(IE_KeyService) == $(KeyNull)
  736.                         Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  737.                         Goto fatalregistry
  738.                     endif
  739.  
  740.                     GetRegValue $(IE_KeyService), "BusNumber", BusInfo
  741.                     GetRegValue $(IE_KeyService), "SlotNumber", SlotInfo
  742.                     set CardBusNum = *( $(BusInfo), 4 )
  743.                     set CardSlotNum = *( $(SlotInfo), 4 )
  744.  
  745.                     ifint $(CardBusNum) == $(BusNum)
  746.                         ifint $(CardSlotNum) == $(DeviceNum)
  747.                             ; Update InfName and InfOption
  748.                             OpenRegKey $(IE_Card) "" "NetRules" $(MAXIMUM_ALLOWED) H_NetRules
  749.                             ifstr $(H_NetRules) == $(KeyNull)
  750.                                 Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  751.                                 Goto fatalregistry
  752.                             endif
  753.  
  754.                             SetRegValue $(H_NetRules) {InfName,$(NoTitle),$(!REG_VT_SZ),$(InfFileName)}
  755.                             SetRegValue $(H_NetRules) {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}
  756.                             CloseRegKey $(H_NetRules)
  757.  
  758.                             ; Set default value
  759.                             set NewValueList = $($(Sub)DefaultParamList)
  760.                             set ParamPath = $(!NTN_ServiceBase)"\"$(ServiceName)"\Parameters"
  761.                             OpenRegKey $(!REG_H_LOCAL) "" $(ParamPath) $(!REG_KEY_WRITE) KeyParam
  762.                             Shell $(UtilityInf), AddValueList, $(KeyParam), $(NewValueList)
  763.  
  764.                             ; for 3106S UI registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>
  765.                             CreateRegKey $(KeyParam) {"UI",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_UI
  766.                             ifstr $(H_UI) == $(KeyNull)
  767.                                 OpenRegKey $(KeyParam) "" "UI" $(MAXIMUM_ALLOWED) H_UI
  768.                                 ifstr $(H_UI) == $(KeyNull)
  769.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  770.                                     CloseRegKey $(KeyParam)
  771.                                     goto fatalregistry
  772.                                 endif
  773.                             endif
  774.  
  775.                             ; for 3106S ConnectionType registry >>>>>>>>>>>>>>>>
  776.                             CreateRegKey $(H_UI) {"ConnectionType",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_ConnectionType
  777.                             ifstr $(H_ConnectionType) == $(KeyNull)
  778.                                 OpenRegKey $(H_UI) "" "ConnectionType" $(MAXIMUM_ALLOWED) H_ConnectionType
  779.                                 ifstr $(H_ConnectionType) == $(KeyNull)
  780.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  781.                                     CloseRegKey $(H_UI)
  782.                                     goto fatalregistry
  783.                                 endif
  784.                             endif
  785.  
  786.                             set NewValueList = $(ConnectionTypeParamList)
  787.                             Shell $(UtilityInf), AddValueList, $(H_ConnectionType), $(NewValueList)
  788.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  789.                                 goto ShellCodeError
  790.                             endif
  791.  
  792.                             ; for 3106S ConnectionType Enum registry
  793.                             CreateRegKey $(H_ConnectionType) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_Enum
  794.                             ifstr $(H_Enum) == $(KeyNull)
  795.                                 OpenRegKey $(H_ConnectionType) "" "enum" $(MAXIMUM_ALLOWED) H_Enum
  796.                                 ifstr $(H_Enum) == $(KeyNull)
  797.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  798.                                     CloseRegKey $(H_ConnectionType)
  799.                                     goto fatalregistry
  800.                                 endif
  801.                             endif
  802.  
  803.                             set NewValueList = $(ConnectionTypeEnumList)
  804.                             Shell $(UtilityInf), AddValueList, $(H_Enum), $(NewValueList)
  805.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  806.                                 goto ShellCodeError
  807.                             endif
  808.  
  809.                             CloseRegKey $(H_Enum)
  810.                             CloseRegKey $(H_ConnectionType)
  811.  
  812.                             ; for 3106S NetworkAddress registry >>>>>>>>>>>>>>>>
  813.                             CreateRegKey $(H_UI) {"NetworkAddress",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_NetworkAddress
  814.                             ifstr $(H_NetworkAddress) == $(KeyNull)
  815.                                 OpenRegKey $(H_UI) "" "NetworkAddress" $(MAXIMUM_ALLOWED) H_NetworkAddress
  816.                                 ifstr $(H_NetworkAddress) == $(KeyNull)
  817.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  818.                                     CloseRegKey $(H_UI)
  819.                                     goto fatalregistry
  820.                                 endif
  821.                             endif
  822.  
  823.                             set NewValueList = $(NetworkAddressParamList)
  824.                             Shell $(UtilityInf), AddValueList, $(H_NetworkAddress), $(NewValueList)
  825.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  826.                                 goto ShellCodeError
  827.                             endif
  828.  
  829.                             CloseRegKey $(H_NetworkAddress)
  830.  
  831.                             ; for 3106S TransmitBuffers registry >>>>>>>>>>>>>>>
  832.                             CreateRegKey $(H_UI) {"TransmitBuffers",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_TransmitBuffers
  833.                             ifstr $(H_TransmitBuffers) == $(KeyNull)
  834.                                 OpenRegKey $(H_UI) "" "TransmitBuffers" $(MAXIMUM_ALLOWED) H_TransmitBuffers
  835.                                 ifstr $(H_TransmitBuffers) == $(KeyNull)
  836.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  837.                                     CloseRegKey $(H_UI)
  838.                                     goto fatalregistry
  839.                                 endif
  840.                             endif
  841.  
  842.                             set NewValueList = $(TransmitBuffersParamList)
  843.                             Shell $(UtilityInf), AddValueList, $(H_TransmitBuffers), $(NewValueList)
  844.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  845.                                 goto ShellCodeError
  846.                             endif
  847.  
  848.                             CloseRegKey $(H_TransmitBuffers)
  849.  
  850.                             ; for 3106S ReceiveBuffers registry >>>>>>>>>>>>>>>>
  851.                             CreateRegKey $(H_UI) {"ReceiveBuffers",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_ReceiveBuffers
  852.                             ifstr $(H_ReceiveBuffers) == $(KeyNull)
  853.                                 OpenRegKey $(H_UI) "" "ReceiveBuffers" $(MAXIMUM_ALLOWED) H_ReceiveBuffers
  854.                                 ifstr $(H_ReceiveBuffers) == $(KeyNull)
  855.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  856.                                     CloseRegKey $(H_UI)
  857.                                     goto fatalregistry
  858.                                 endif
  859.                             endif
  860.  
  861.                             set NewValueList = $(ReceiveBuffersParamList)
  862.                             Shell $(UtilityInf), AddValueList, $(H_ReceiveBuffers), $(NewValueList)
  863.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  864.                                 goto ShellCodeError
  865.                             endif
  866.  
  867.                             CloseRegKey $(H_ReceiveBuffers)
  868.  
  869.                             ; for 3106S FlowCtrl registry >>>>>>>>>>>>>>>>>>>>>>
  870.                             CreateRegKey $(H_UI) {"FlowCtrl",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_FlowCtrl
  871.                             ifstr $(H_FlowCtrl) == $(KeyNull)
  872.                                 OpenRegKey $(H_UI) "" "FlowCtrl" $(MAXIMUM_ALLOWED) H_FlowCtrl
  873.                                 ifstr $(H_FlowCtrl) == $(KeyNull)
  874.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  875.                                     CloseRegKey $(H_UI)
  876.                                     goto fatalregistry
  877.                                 endif
  878.                             endif
  879.  
  880.                             set NewValueList = $(FlowCtrlParamList)
  881.                             Shell $(UtilityInf), AddValueList, $(H_FlowCtrl), $(NewValueList)
  882.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  883.                                 goto ShellCodeError
  884.                             endif
  885.  
  886.                             ; for 3106S FlowCtrl Enum registry
  887.                             CreateRegKey $(H_FlowCtrl) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_Enum
  888.                             ifstr $(H_Enum) == $(KeyNull)
  889.                                 OpenRegKey $(H_FlowCtrl) "" "enum" $(MAXIMUM_ALLOWED) H_Enum
  890.                                 ifstr $(H_Enum) == $(KeyNull)
  891.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  892.                                     CloseRegKey $(H_FlowCtrl)
  893.                                     goto fatalregistry
  894.                                 endif
  895.                             endif
  896.  
  897.                             set NewValueList = $(FlowCtrlEnumList)
  898.                             Shell $(UtilityInf), AddValueList, $(H_Enum), $(NewValueList)
  899.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  900.                                 goto ShellCodeError
  901.                             endif
  902.  
  903.                             CloseRegKey $(H_Enum)
  904.                             CloseRegKey $(H_FlowCtrl)
  905.  
  906.                             ; for 3106S AdaptiveInt registry >>>>>>>>>>>>>>>>>>>>>>
  907.                             CreateRegKey $(H_UI) {"AdaptiveInt",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_AdaptiveInt
  908.                             ifstr $(H_AdaptiveInt) == $(KeyNull)
  909.                                 OpenRegKey $(H_UI) "" "AdaptiveInt" $(MAXIMUM_ALLOWED) H_AdaptiveInt
  910.                                 ifstr $(H_AdaptiveInt) == $(KeyNull)
  911.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  912.                                     CloseRegKey $(H_UI)
  913.                                     goto fatalregistry
  914.                                 endif
  915.                             endif
  916.  
  917.                             set NewValueList = $(AdaptiveIntParamList)
  918.                             Shell $(UtilityInf), AddValueList, $(H_AdaptiveInt), $(NewValueList)
  919.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  920.                                 goto ShellCodeError
  921.                             endif
  922.  
  923.                             ; for 3106S AdaptiveInt Enum registry
  924.                             CreateRegKey $(H_AdaptiveInt) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_Enum
  925.                             ifstr $(H_Enum) == $(KeyNull)
  926.                                 OpenRegKey $(H_AdaptiveInt) "" "enum" $(MAXIMUM_ALLOWED) H_Enum
  927.                                 ifstr $(H_Enum) == $(KeyNull)
  928.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  929.                                     CloseRegKey $(H_AdaptiveInt)
  930.                                     goto fatalregistry
  931.                                 endif
  932.                             endif
  933.  
  934.                             set NewValueList = $(DisableEnableEnumList)
  935.                             Shell $(UtilityInf), AddValueList, $(H_Enum), $(NewValueList)
  936.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  937.                                 goto ShellCodeError
  938.                             endif
  939.  
  940.                             CloseRegKey $(H_Enum)
  941.                             CloseRegKey $(H_AdaptiveInt)
  942.  
  943.                             ; for 3106S 8021pqtag registry >>>>>>>>>>>>>>>>>>>>>
  944.                             CreateRegKey $(H_UI) {"8021pqtag",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_8021pqtag
  945.                             ifstr $(H_8021pqtag) == $(KeyNull)
  946.                                 OpenRegKey $(H_UI) "" "8021pqtag" $(MAXIMUM_ALLOWED) H_8021pqtag
  947.                                 ifstr $(H_8021pqtag) == $(KeyNull)
  948.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  949.                                     CloseRegKey $(H_UI)
  950.                                     goto fatalregistry
  951.                                 endif
  952.                             endif
  953.  
  954.                             set NewValueList = $(8021pqtagParamList)
  955.                             Shell $(UtilityInf), AddValueList, $(H_8021pqtag), $(NewValueList)
  956.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  957.                                 goto ShellCodeError
  958.                             endif
  959.  
  960.                             ; for 3106S 8021pqtag Enum registry
  961.                             CreateRegKey $(H_8021pqtag) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_Enum
  962.                             ifstr $(H_Enum) == $(KeyNull)
  963.                                 OpenRegKey $(H_8021pqtag) "" "enum" $(MAXIMUM_ALLOWED) H_Enum
  964.                                 ifstr $(H_Enum) == $(KeyNull)
  965.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  966.                                     CloseRegKey $(H_8021pqtag)
  967.                                     goto fatalregistry
  968.                                 endif
  969.                             endif
  970.  
  971.                             set NewValueList = $(DisableEnableEnumList)
  972.                             Shell $(UtilityInf), AddValueList, $(H_Enum), $(NewValueList)
  973.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  974.                                 goto ShellCodeError
  975.                             endif
  976.  
  977.                             CloseRegKey $(H_Enum)
  978.                             CloseRegKey $(H_8021pqtag)
  979.  
  980.                             ; for 3106S VLANID registry >>>>>>>>>>>>>>>>>>>>>>>>
  981.                             CreateRegKey $(H_UI) {"VLANID",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_VLANID
  982.                             ifstr $(H_VLANID) == $(KeyNull)
  983.                                 OpenRegKey $(H_UI) "" "VLANID" $(MAXIMUM_ALLOWED) H_VLANID
  984.                                 ifstr $(H_VLANID) == $(KeyNull)
  985.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  986.                                     CloseRegKey $(H_UI)
  987.                                     goto fatalregistry
  988.                                 endif
  989.                             endif
  990.  
  991.                             set NewValueList = $(VLANIDParamList)
  992.                             Shell $(UtilityInf), AddValueList, $(H_VLANID), $(NewValueList)
  993.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  994.                                 goto ShellCodeError
  995.                             endif
  996.  
  997.                             CloseRegKey $(H_VLANID)
  998.                             CloseRegKey $(H_UI)
  999.  
  1000.                             CloseRegKey $(KeyParam)
  1001.  
  1002.                             ; Update Software Title
  1003.                             set ParamPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$(IE_KeyName)
  1004.                             OpenRegKey $(!REG_H_LOCAL) "" $(ParamPath) $(!REG_KEY_WRITE) KeyParam
  1005.                             SetRegValue $(KeyParam) {Title,$(NoTitle),$(!REG_VT_SZ),"["$(IE_KeyName)"] "$(ProductHardware$(Option)$(Sub)Title)}
  1006.                             CloseRegKey $(KeyParam)
  1007.  
  1008.                             ; Update Version Number
  1009.                             set ParamPath = "SOFTWARE\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  1010.                             OpenRegKey $(!REG_H_LOCAL) "" $(ParamPath) $(!REG_KEY_WRITE) KeyParam
  1011.                             SetRegValue $(KeyParam) {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)}
  1012.                             SetRegValue $(KeyParam) {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)}
  1013.                             CloseRegKey $(KeyParam)
  1014.                         endif
  1015.                     endif
  1016.                     CloseRegKey $(IE_KeyService)
  1017.  
  1018.                 endif
  1019.                 CloseRegKey $(IE_Card)
  1020.  
  1021.             EndForListDo
  1022.             CloseRegKey $(IE_KeyNetcards)
  1023.  
  1024.         EndForListDo
  1025.  
  1026.         
  1027.         ; setting default value for 3106J ****************************
  1028.         ForListDo $(AdapterList106J)
  1029.             set BusNum = *( $($), 1 )
  1030.             set DeviceNum = *( $($), 2 )
  1031.             set Sub = "VT3106J"
  1032.             set Description = $(ProductHardware$(Option)Description)
  1033.             set Product = $(ProductHardwareName)
  1034.  
  1035.             OpenRegKey $(!REG_H_LOCAL) +
  1036.                        "" +
  1037.                        "SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards" +
  1038.                        $(!REG_KEY_READ) +
  1039.                        IE_KeyNetcards
  1040.  
  1041.             EnumRegKey $(IE_KeyNetcards) IE_KeyNameList
  1042.  
  1043.             ForListDo $(IE_KeyNameList)
  1044.                 set IE_KeyName = *( $($), 1 )
  1045.  
  1046.                 OpenRegKey $(IE_KeyNetcards) "" $(IE_KeyName) $(!REG_KEY_READ) IE_Card
  1047.                 ifstr $(IE_Card) == $(KeyNull)
  1048.                     Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  1049.                     Goto fatalregistry
  1050.                 endif
  1051.  
  1052.                 GetRegValue $(IE_Card),"ProductName", ProductNameInfo
  1053.                 set CardProductName = *($(ProductNameInfo), 4)
  1054.  
  1055.                 ifstr(i) $(CardProductName) == $(Product)
  1056.                     GetRegValue $(IE_Card), "ServiceName", ServiceNameInfo
  1057.                     set ServiceName = *($(ServiceNameInfo), 4)
  1058.                     OpenRegKey $(!REG_H_LOCAL) +
  1059.                                "" +
  1060.                                $(!NTN_ServiceBase)"\"$(ServiceName)"\Parameters" +
  1061.                                $(!REG_KEY_READWRITE) +
  1062.                                IE_KeyService
  1063.                     ifstr $(IE_KeyService) == $(KeyNull)
  1064.                         Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  1065.                         Goto fatalregistry
  1066.                     endif
  1067.  
  1068.                     GetRegValue $(IE_KeyService), "BusNumber", BusInfo
  1069.                     GetRegValue $(IE_KeyService), "SlotNumber", SlotInfo
  1070.                     set CardBusNum = *( $(BusInfo), 4 )
  1071.                     set CardSlotNum = *( $(SlotInfo), 4 )
  1072.  
  1073.                     ifint $(CardBusNum) == $(BusNum)
  1074.                         ifint $(CardSlotNum) == $(DeviceNum)
  1075.                             ; Update InfName and InfOption
  1076.                             OpenRegKey $(IE_Card) "" "NetRules" $(MAXIMUM_ALLOWED) H_NetRules
  1077.                             ifstr $(H_NetRules) == $(KeyNull)
  1078.                                 Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  1079.                                 Goto fatalregistry
  1080.                             endif
  1081.  
  1082.                             SetRegValue $(H_NetRules) {InfName,$(NoTitle),$(!REG_VT_SZ),$(InfFileName)}
  1083.                             SetRegValue $(H_NetRules) {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}
  1084.                             CloseRegKey $(H_NetRules)
  1085.  
  1086.                             ; Set default value
  1087.                             set NewValueList = $($(Sub)DefaultParamList)
  1088.                             set ParamPath = $(!NTN_ServiceBase)"\"$(ServiceName)"\Parameters"
  1089.                             OpenRegKey $(!REG_H_LOCAL) "" $(ParamPath) $(!REG_KEY_WRITE) KeyParam
  1090.                             Shell  $(UtilityInf), AddValueList, $(KeyParam), $(NewValueList)
  1091.  
  1092.                             ; for 3106J UI registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>
  1093.                             CreateRegKey $(KeyParam) {"UI",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_UI
  1094.                             ifstr $(H_UI) == $(KeyNull)
  1095.                                 OpenRegKey $(KeyParam) "" "UI" $(MAXIMUM_ALLOWED) H_UI
  1096.                                 ifstr $(H_UI) == $(KeyNull)
  1097.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1098.                                     CloseRegKey $(KeyParam)
  1099.                                     goto fatalregistry
  1100.                                 endif
  1101.                             endif
  1102.  
  1103.                             ; for 3106J ConnectionType registry >>>>>>>>>>>>>>>>
  1104.                             CreateRegKey $(H_UI) {"ConnectionType",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_ConnectionType
  1105.                             ifstr $(H_ConnectionType) == $(KeyNull)
  1106.                                 OpenRegKey $(H_UI) "" "ConnectionType" $(MAXIMUM_ALLOWED) H_ConnectionType
  1107.                                 ifstr $(H_ConnectionType) == $(KeyNull)
  1108.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1109.                                     CloseRegKey $(H_UI)
  1110.                                     goto fatalregistry
  1111.                                 endif
  1112.                             endif
  1113.  
  1114.                             set NewValueList = $(ConnectionTypeParamList)
  1115.                             Shell $(UtilityInf), AddValueList, $(H_ConnectionType), $(NewValueList)
  1116.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1117.                                 goto ShellCodeError
  1118.                             endif
  1119.  
  1120.                             ; for 3106J ConnectionType Enum registry
  1121.                             CreateRegKey $(H_ConnectionType) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_Enum
  1122.                             ifstr $(H_Enum) == $(KeyNull)
  1123.                                 OpenRegKey $(H_ConnectionType) "" "enum" $(MAXIMUM_ALLOWED) H_Enum
  1124.                                 ifstr $(H_Enum) == $(KeyNull)
  1125.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1126.                                     CloseRegKey $(H_ConnectionType)
  1127.                                     goto fatalregistry
  1128.                                 endif
  1129.                             endif
  1130.  
  1131.                             set NewValueList = $(ConnectionTypeEnumList)
  1132.                             Shell $(UtilityInf), AddValueList, $(H_Enum), $(NewValueList)
  1133.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1134.                                 goto ShellCodeError
  1135.                             endif
  1136.  
  1137.                             CloseRegKey $(H_Enum)
  1138.                             CloseRegKey $(H_ConnectionType)
  1139.  
  1140.                             ; for 3106J NetworkAddress registry >>>>>>>>>>>>>>>>
  1141.                             CreateRegKey $(H_UI) {"NetworkAddress",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_NetworkAddress
  1142.                             ifstr $(H_NetworkAddress) == $(KeyNull)
  1143.                                 OpenRegKey $(H_UI) "" "NetworkAddress" $(MAXIMUM_ALLOWED) H_NetworkAddress
  1144.                                 ifstr $(H_NetworkAddress) == $(KeyNull)
  1145.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1146.                                     CloseRegKey $(H_UI)
  1147.                                     goto fatalregistry
  1148.                                 endif
  1149.                             endif
  1150.  
  1151.                             set NewValueList = $(NetworkAddressParamList)
  1152.                             Shell $(UtilityInf), AddValueList, $(H_NetworkAddress), $(NewValueList)
  1153.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1154.                                 goto ShellCodeError
  1155.                             endif
  1156.  
  1157.                             CloseRegKey $(H_NetworkAddress)
  1158.  
  1159.                             ; for 3106J TransmitBuffers registry >>>>>>>>>>>>>>>
  1160.                             CreateRegKey $(H_UI) {"TransmitBuffers",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_TransmitBuffers
  1161.                             ifstr $(H_TransmitBuffers) == $(KeyNull)
  1162.                                 OpenRegKey $(H_UI) "" "TransmitBuffers" $(MAXIMUM_ALLOWED) H_TransmitBuffers
  1163.                                 ifstr $(H_TransmitBuffers) == $(KeyNull)
  1164.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1165.                                     CloseRegKey $(H_UI)
  1166.                                     goto fatalregistry
  1167.                                 endif
  1168.                             endif
  1169.  
  1170.                             set NewValueList = $(TransmitBuffersParamList)
  1171.                             Shell $(UtilityInf), AddValueList, $(H_TransmitBuffers), $(NewValueList)
  1172.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1173.                                 goto ShellCodeError
  1174.                             endif
  1175.  
  1176.                             CloseRegKey $(H_TransmitBuffers)
  1177.  
  1178.                             ; for 3106J ReceiveBuffers registry >>>>>>>>>>>>>>>>
  1179.                             CreateRegKey $(H_UI) {"ReceiveBuffers",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_ReceiveBuffers
  1180.                             ifstr $(H_ReceiveBuffers) == $(KeyNull)
  1181.                                 OpenRegKey $(H_UI) "" "ReceiveBuffers" $(MAXIMUM_ALLOWED) H_ReceiveBuffers
  1182.                                 ifstr $(H_ReceiveBuffers) == $(KeyNull)
  1183.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1184.                                     CloseRegKey $(H_UI)
  1185.                                     goto fatalregistry
  1186.                                 endif
  1187.                             endif
  1188.  
  1189.                             set NewValueList = $(ReceiveBuffersParamList)
  1190.                             Shell $(UtilityInf), AddValueList, $(H_ReceiveBuffers), $(NewValueList)
  1191.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1192.                                 goto ShellCodeError
  1193.                             endif
  1194.  
  1195.                             CloseRegKey $(H_ReceiveBuffers)
  1196.  
  1197.                             ; for 3106J FlowCtrl registry >>>>>>>>>>>>>>>>>>>>>>
  1198.                             CreateRegKey $(H_UI) {"FlowCtrl",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_FlowCtrl
  1199.                             ifstr $(H_FlowCtrl) == $(KeyNull)
  1200.                                 OpenRegKey $(H_UI) "" "FlowCtrl" $(MAXIMUM_ALLOWED) H_FlowCtrl
  1201.                                 ifstr $(H_FlowCtrl) == $(KeyNull)
  1202.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1203.                                     CloseRegKey $(H_UI)
  1204.                                     goto fatalregistry
  1205.                                 endif
  1206.                             endif
  1207.  
  1208.                             set NewValueList = $(FlowCtrlParamList)
  1209.                             Shell $(UtilityInf), AddValueList, $(H_FlowCtrl), $(NewValueList)
  1210.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1211.                                 goto ShellCodeError
  1212.                             endif
  1213.  
  1214.                             ; for 3106J FlowCtrl Enum registry
  1215.                             CreateRegKey $(H_FlowCtrl) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_Enum
  1216.                             ifstr $(H_Enum) == $(KeyNull)
  1217.                                 OpenRegKey $(H_FlowCtrl) "" "enum" $(MAXIMUM_ALLOWED) H_Enum
  1218.                                 ifstr $(H_Enum) == $(KeyNull)
  1219.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1220.                                     CloseRegKey $(H_FlowCtrl)
  1221.                                     goto fatalregistry
  1222.                                 endif
  1223.                             endif
  1224.  
  1225.                             set NewValueList = $(FlowCtrlEnumList)
  1226.                             Shell $(UtilityInf), AddValueList, $(H_Enum), $(NewValueList)
  1227.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1228.                                 goto ShellCodeError
  1229.                             endif
  1230.  
  1231.                             CloseRegKey $(H_Enum)
  1232.                             CloseRegKey $(H_FlowCtrl)
  1233.  
  1234.                             ; for 3106J AdaptiveInt registry >>>>>>>>>>>>>>>>>>>>>>
  1235.                             CreateRegKey $(H_UI) {"AdaptiveInt",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_AdaptiveInt
  1236.                             ifstr $(H_AdaptiveInt) == $(KeyNull)
  1237.                                 OpenRegKey $(H_UI) "" "AdaptiveInt" $(MAXIMUM_ALLOWED) H_AdaptiveInt
  1238.                                 ifstr $(H_AdaptiveInt) == $(KeyNull)
  1239.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1240.                                     CloseRegKey $(H_UI)
  1241.                                     goto fatalregistry
  1242.                                 endif
  1243.                             endif
  1244.  
  1245.                             set NewValueList = $(AdaptiveIntParamList)
  1246.                             Shell $(UtilityInf), AddValueList, $(H_AdaptiveInt), $(NewValueList)
  1247.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1248.                                 goto ShellCodeError
  1249.                             endif
  1250.  
  1251.                             ; for 3106J AdaptiveInt Enum registry
  1252.                             CreateRegKey $(H_AdaptiveInt) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_Enum
  1253.                             ifstr $(H_Enum) == $(KeyNull)
  1254.                                 OpenRegKey $(H_AdaptiveInt) "" "enum" $(MAXIMUM_ALLOWED) H_Enum
  1255.                                 ifstr $(H_Enum) == $(KeyNull)
  1256.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1257.                                     CloseRegKey $(H_AdaptiveInt)
  1258.                                     goto fatalregistry
  1259.                                 endif
  1260.                             endif
  1261.  
  1262.                             set NewValueList = $(DisableEnableEnumList)
  1263.                             Shell $(UtilityInf), AddValueList, $(H_Enum), $(NewValueList)
  1264.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1265.                                 goto ShellCodeError
  1266.                             endif
  1267.  
  1268.                             CloseRegKey $(H_Enum)
  1269.                             CloseRegKey $(H_AdaptiveInt)
  1270.  
  1271.                             CloseRegKey $(KeyParam)
  1272.  
  1273.                             ; Update Software Title
  1274.                             set ParamPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$(IE_KeyName)
  1275.                             OpenRegKey $(!REG_H_LOCAL) "" $(ParamPath) $(!REG_KEY_WRITE) KeyParam
  1276.                             SetRegValue $(KeyParam) {Title,$(NoTitle),$(!REG_VT_SZ),"["$(IE_KeyName)"] "$(ProductHardware$(Option)$(Sub)Title)}
  1277.                             CloseRegKey $(KeyParam)
  1278.  
  1279.                             ; Update Version Number
  1280.                             set ParamPath = "SOFTWARE\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  1281.                             OpenRegKey $(!REG_H_LOCAL) "" $(ParamPath) $(!REG_KEY_WRITE) KeyParam
  1282.                             SetRegValue $(KeyParam) {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)}
  1283.                             SetRegValue $(KeyParam) {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)}
  1284.                             CloseRegKey $(KeyParam)
  1285.                         endif
  1286.                     endif
  1287.                     CloseRegKey $(IE_KeyService)
  1288.  
  1289.                 endif
  1290.                 CloseRegKey $(IE_Card)
  1291.  
  1292.             EndForListDo
  1293.             CloseRegKey $(IE_KeyNetcards)
  1294.  
  1295.         EndForListDo
  1296.  
  1297.  
  1298.         ; setting default value for 3065 *****************************
  1299.         ForListDo $(AdapterList65)
  1300.             set BusNum = *( $($), 1 )
  1301.             set DeviceNum = *( $($), 2 )
  1302.             set Sub = "VT3065"
  1303.             set Description = $(ProductHardware$(Option)Description)
  1304.             set Product = $(ProductHardwareName)
  1305.  
  1306.             OpenRegKey $(!REG_H_LOCAL) +
  1307.                        "" +
  1308.                        "SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards" +
  1309.                        $(!REG_KEY_READ) +
  1310.                        IE_KeyNetcards
  1311.  
  1312.             EnumRegKey $(IE_KeyNetcards) IE_KeyNameList
  1313.             ForListDo $(IE_KeyNameList)
  1314.                 set IE_KeyName = *( $($), 1 )
  1315.  
  1316.                 OpenRegKey $(IE_KeyNetcards) "" $(IE_KeyName) $(MAXIMUM_ALLOWED) IE_Card
  1317.                 ifstr $(IE_Card) == $(KeyNull)
  1318.                     Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  1319.                     Goto fatalregistry
  1320.                 endif
  1321.  
  1322.                 GetRegValue $(IE_Card), "ProductName", ProductNameInfo
  1323.                 set CardProductName = *( $(ProductNameInfo), 4 )
  1324.  
  1325.                 ifstr(i) $(CardProductName) == $(Product)
  1326.                     GetRegValue $(IE_Card), "ServiceName", ServiceNameInfo
  1327.                     set ServiceName = *( $(ServiceNameInfo), 4 )
  1328.  
  1329.                     OpenRegKey $(!REG_H_LOCAL) +
  1330.                                "" +
  1331.                                $(!NTN_ServiceBase)"\"$(ServiceName)"\Parameters" +
  1332.                                $(!REG_KEY_READWRITE) +
  1333.                                IE_KeyService
  1334.                     ifstr $(IE_KeyService) == $(KeyNull)
  1335.                         Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  1336.                         Goto fatalregistry
  1337.                     endif
  1338.  
  1339.                     GetRegValue $(IE_KeyService), "BusNumber", BusInfo
  1340.                     GetRegValue $(IE_KeyService), "SlotNumber", SlotInfo
  1341.                     set CardBusNum = *( $(BusInfo), 4 )
  1342.                     set CardSlotNum = *( $(SlotInfo), 4 )
  1343.  
  1344.                     ifint $(CardBusNum) == $(BusNum)
  1345.                         ifint $(CardSlotNum) == $(DeviceNum)
  1346.                             ; Update InfName and InfOption
  1347.                             OpenRegKey $(IE_Card) "" "NetRules" $(MAXIMUM_ALLOWED) H_NetRules
  1348.                             ifstr $(H_NetRules) == $(KeyNull)
  1349.                                 Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  1350.                                 Goto fatalregistry
  1351.                             endif
  1352.  
  1353.                             SetRegValue $(H_NetRules) {InfName,$(NoTitle),$(!REG_VT_SZ),$(InfFileName)}
  1354.                             SetRegValue $(H_NetRules) {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}
  1355.                             CloseRegKey $(H_NetRules)
  1356.  
  1357.                             ; Set default value
  1358.                             set NewValueList = $($(Sub)DefaultParamList)
  1359.                             set ParamPath = $(!NTN_ServiceBase)"\"$(ServiceName)"\Parameters"
  1360.                             OpenRegKey $(!REG_H_LOCAL) "" $(ParamPath) $(!REG_KEY_WRITE) KeyParam
  1361.                             Shell $(UtilityInf), AddValueList, $(KeyParam), $(NewValueList)
  1362.  
  1363.                             ; for 3065 UI registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  1364.                             CreateRegKey $(KeyParam) {"UI",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_UI
  1365.                             ifstr $(H_UI) == $(KeyNull)
  1366.                                 OpenRegKey $(KeyParam) "" "UI" $(MAXIMUM_ALLOWED) H_UI
  1367.                                 ifstr $(H_UI) == $(KeyNull)
  1368.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1369.                                     CloseRegKey $(KeyParam)
  1370.                                     goto fatalregistry
  1371.                                 endif
  1372.                             endif
  1373.  
  1374.                             ; for 3065 ConnectionType registry >>>>>>>>>>>>>>>>>
  1375.                             CreateRegKey $(H_UI) {"ConnectionType",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_ConnectionType
  1376.                             ifstr $(H_ConnectionType) == $(KeyNull)
  1377.                                 OpenRegKey $(H_UI) "" "ConnectionType" $(MAXIMUM_ALLOWED) H_ConnectionType
  1378.                                 ifstr $(H_ConnectionType) == $(KeyNull)
  1379.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1380.                                     CloseRegKey $(H_UI)
  1381.                                     goto fatalregistry
  1382.                                 endif
  1383.                             endif
  1384.  
  1385.                             set NewValueList = $(ConnectionTypeParamList)
  1386.                             Shell $(UtilityInf), AddValueList, $(H_ConnectionType), $(NewValueList)
  1387.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1388.                                 goto ShellCodeError
  1389.                             endif
  1390.  
  1391.                             ; for 3065 ConnectionType Enum registry
  1392.                             CreateRegKey $(H_ConnectionType) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_Enum
  1393.                             ifstr $(H_Enum) == $(KeyNull)
  1394.                                 OpenRegKey $(H_ConnectionType) "" "enum" $(MAXIMUM_ALLOWED) H_Enum
  1395.                                 ifstr $(H_Enum) == $(KeyNull)
  1396.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1397.                                     CloseRegKey $(H_ConnectionType)
  1398.                                     goto fatalregistry
  1399.                                 endif
  1400.                             endif
  1401.  
  1402.                             set NewValueList = $(ConnectionTypeEnumList)
  1403.                             Shell $(UtilityInf), AddValueList, $(H_Enum), $(NewValueList)
  1404.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1405.                                 goto ShellCodeError
  1406.                             endif
  1407.  
  1408.                             CloseRegKey $(H_Enum)
  1409.                             CloseRegKey $(H_ConnectionType)
  1410.  
  1411.                             ; for 3065 NetworkAddress registry >>>>>>>>>>>>>>>>>
  1412.                             CreateRegKey $(H_UI) {"NetworkAddress",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_NetworkAddress
  1413.                             ifstr $(H_NetworkAddress) == $(KeyNull)
  1414.                                 OpenRegKey $(H_UI) "" "NetworkAddress" $(MAXIMUM_ALLOWED) H_NetworkAddress
  1415.                                 ifstr $(H_NetworkAddress) == $(KeyNull)
  1416.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1417.                                     CloseRegKey $(H_UI)
  1418.                                     goto fatalregistry
  1419.                                 endif
  1420.                             endif
  1421.  
  1422.                             set NewValueList = $(NetworkAddressParamList)
  1423.                             Shell $(UtilityInf), AddValueList, $(H_NetworkAddress), $(NewValueList)
  1424.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1425.                                 goto ShellCodeError
  1426.                             endif
  1427.  
  1428.                             CloseRegKey $(H_NetworkAddress)
  1429.  
  1430.                             ; for 3065 TransmitBuffers registry >>>>>>>>>>>>>>>>
  1431.                             CreateRegKey $(H_UI) {"TransmitBuffers",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_TransmitBuffers
  1432.                             ifstr $(H_TransmitBuffers) == $(KeyNull)
  1433.                                 OpenRegKey $(H_UI) "" "TransmitBuffers" $(MAXIMUM_ALLOWED) H_TransmitBuffers
  1434.                                 ifstr $(H_TransmitBuffers) == $(KeyNull)
  1435.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1436.                                     CloseRegKey $(H_UI)
  1437.                                     goto fatalregistry
  1438.                                 endif
  1439.                             endif
  1440.  
  1441.                             set NewValueList = $(TransmitBuffersParamList)
  1442.                             Shell $(UtilityInf), AddValueList, $(H_TransmitBuffers), $(NewValueList)
  1443.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1444.                                 goto ShellCodeError
  1445.                             endif
  1446.  
  1447.                             CloseRegKey $(H_TransmitBuffers)
  1448.  
  1449.                             ; for 3065 ReceiveBuffers registry >>>>>>>>>>>>>>>>>
  1450.                             CreateRegKey $(H_UI) {"ReceiveBuffers",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_ReceiveBuffers
  1451.                             ifstr $(H_ReceiveBuffers) == $(KeyNull)
  1452.                                 OpenRegKey $(H_UI) "" "ReceiveBuffers" $(MAXIMUM_ALLOWED) H_ReceiveBuffers
  1453.                                 ifstr $(H_ReceiveBuffers) == $(KeyNull)
  1454.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1455.                                     CloseRegKey $(H_UI)
  1456.                                     goto fatalregistry
  1457.                                 endif
  1458.                             endif
  1459.  
  1460.                             set NewValueList = $(ReceiveBuffersParamList)
  1461.                             Shell $(UtilityInf), AddValueList, $(H_ReceiveBuffers), $(NewValueList)
  1462.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1463.                                 goto ShellCodeError
  1464.                             endif
  1465.  
  1466.                             CloseRegKey $(H_ReceiveBuffers)
  1467.  
  1468.                             ; for 3065 FlowCtrl registry >>>>>>>>>>>>>>>>>>>>>>>
  1469.                             CreateRegKey $(H_UI) {"FlowCtrl",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_FlowCtrl
  1470.                             ifstr $(H_FlowCtrl) == $(KeyNull)
  1471.                                 OpenRegKey $(H_UI) "" "FlowCtrl" $(MAXIMUM_ALLOWED) H_FlowCtrl
  1472.                                 ifstr $(H_FlowCtrl) == $(KeyNull)
  1473.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1474.                                     CloseRegKey $(H_UI)
  1475.                                     goto fatalregistry
  1476.                                 endif
  1477.                             endif
  1478.  
  1479.                             set NewValueList = $(FlowCtrlParamList)
  1480.                             Shell $(UtilityInf), AddValueList, $(H_FlowCtrl), $(NewValueList)
  1481.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1482.                                 goto ShellCodeError
  1483.                             endif
  1484.  
  1485.                             ; for 3065 FlowCtrl Enum registry
  1486.                             CreateRegKey $(H_FlowCtrl) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_Enum
  1487.                             ifstr $(H_Enum) == $(KeyNull)
  1488.                                 OpenRegKey $(H_FlowCtrl) "" "enum" $(MAXIMUM_ALLOWED) H_Enum
  1489.                                 ifstr $(H_Enum) == $(KeyNull)
  1490.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1491.                                     CloseRegKey $(H_FlowCtrl)
  1492.                                     goto fatalregistry
  1493.                                 endif
  1494.                             endif
  1495.  
  1496.                             set NewValueList = $(FlowCtrlEnumList)
  1497.                             Shell $(UtilityInf), AddValueList, $(H_Enum), $(NewValueList)
  1498.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1499.                                 goto ShellCodeError
  1500.                             endif
  1501.  
  1502.                             CloseRegKey $(H_Enum)
  1503.                             CloseRegKey $(H_FlowCtrl)
  1504.  
  1505.                             ; for 3065 AdaptiveInt registry >>>>>>>>>>>>>>>>>>>>>>>
  1506.                             CreateRegKey $(H_UI) {"AdaptiveInt",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_AdaptiveInt
  1507.                             ifstr $(H_AdaptiveInt) == $(KeyNull)
  1508.                                 OpenRegKey $(H_UI) "" "AdaptiveInt" $(MAXIMUM_ALLOWED) H_AdaptiveInt
  1509.                                 ifstr $(H_AdaptiveInt) == $(KeyNull)
  1510.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1511.                                     CloseRegKey $(H_UI)
  1512.                                     goto fatalregistry
  1513.                                 endif
  1514.                             endif
  1515.  
  1516.                             set NewValueList = $(AdaptiveIntParamList)
  1517.                             Shell $(UtilityInf), AddValueList, $(H_AdaptiveInt), $(NewValueList)
  1518.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1519.                                 goto ShellCodeError
  1520.                             endif
  1521.  
  1522.                             ; for 3065 AdaptiveInt Enum registry
  1523.                             CreateRegKey $(H_AdaptiveInt) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_Enum
  1524.                             ifstr $(H_Enum) == $(KeyNull)
  1525.                                 OpenRegKey $(H_AdaptiveInt) "" "enum" $(MAXIMUM_ALLOWED) H_Enum
  1526.                                 ifstr $(H_Enum) == $(KeyNull)
  1527.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1528.                                     CloseRegKey $(H_AdaptiveInt)
  1529.                                     goto fatalregistry
  1530.                                 endif
  1531.                             endif
  1532.  
  1533.                             set NewValueList = $(DisableEnableEnumList)
  1534.                             Shell $(UtilityInf), AddValueList, $(H_Enum), $(NewValueList)
  1535.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1536.                                 goto ShellCodeError
  1537.                             endif
  1538.  
  1539.                             CloseRegKey $(H_Enum)
  1540.                             CloseRegKey $(H_AdaptiveInt)
  1541.  
  1542.                             CloseRegKey $(KeyParam)
  1543.  
  1544.                             ; Update Software Title
  1545.                             set ParamPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$(IE_KeyName)
  1546.                             OpenRegKey $(!REG_H_LOCAL) "" $(ParamPath) $(!REG_KEY_WRITE) KeyParam
  1547.                             SetRegValue $(KeyParam) {Title,$(NoTitle),$(!REG_VT_SZ),"["$(IE_KeyName)"] "$(ProductHardware$(Option)$(Sub)Title)}
  1548.                             CloseRegKey $(KeyParam)
  1549.  
  1550.                             ; Update Version Number
  1551.                             set ParamPath = "SOFTWARE\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  1552.                             OpenRegKey $(!REG_H_LOCAL) "" $(ParamPath) $(!REG_KEY_WRITE) KeyParam
  1553.                             SetRegValue $(KeyParam) {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)}
  1554.                             SetRegValue $(KeyParam) {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)}
  1555.                             CloseRegKey $(KeyParam)
  1556.                         endif
  1557.                     endif
  1558.                     CloseRegKey $(IE_KeyService)
  1559.  
  1560.                 endif
  1561.                 CloseRegKey $(IE_Card)
  1562.  
  1563.             EndForListDo
  1564.             CloseRegKey $(IE_KeyNetcards)
  1565.  
  1566.         EndForListDo
  1567.  
  1568.         ; setting default value for 3043 *****************************
  1569.         ForListDo $(AdapterList43)
  1570.             set BusNum = *( $($), 1 )
  1571.             set DeviceNum = *( $($), 2 )
  1572.             set Sub = "VT3043"
  1573.             set Description = $(ProductHardware$(Option)Description)
  1574.             set Product = $(ProductHardwareName)
  1575.  
  1576.             OpenRegKey $(!REG_H_LOCAL) +
  1577.                        "" +
  1578.                        "SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards" +
  1579.                        $(!REG_KEY_READ) +
  1580.                        IE_KeyNetcards
  1581.  
  1582.             EnumRegKey $(IE_KeyNetcards) IE_KeyNameList
  1583.             ForListDo $(IE_KeyNameList)
  1584.                 set IE_KeyName = *( $($), 1 )
  1585.                 OpenRegKey $(IE_KeyNetcards) "" $(IE_KeyName) $(!REG_KEY_READ) IE_Card
  1586.                 ifstr $(IE_Card) == $(KeyNull)
  1587.                     Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  1588.                     Goto fatalregistry
  1589.                 endif
  1590.  
  1591.                 GetRegValue $(IE_Card),"ProductName", ProductNameInfo
  1592.                 set CardProductName = *( $(ProductNameInfo), 4 )
  1593.  
  1594.                 ifstr(i) $(CardProductName) == $(Product)
  1595.                     GetRegValue $(IE_Card), "ServiceName", ServiceNameInfo
  1596.                     set ServiceName = *( $(ServiceNameInfo), 4 )
  1597.  
  1598.                     OpenRegKey $(!REG_H_LOCAL) +
  1599.                                "" +
  1600.                                $(!NTN_ServiceBase)"\"$(ServiceName)"\Parameters" +
  1601.                                $(!REG_KEY_READWRITE) +
  1602.                                IE_KeyService
  1603.                     ifstr $(IE_KeyService) == $(KeyNull)
  1604.                         Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  1605.                         Goto fatalregistry
  1606.                     endif
  1607.  
  1608.                     GetRegValue $(IE_KeyService), "BusNumber", BusInfo
  1609.                     GetRegValue $(IE_KeyService), "SlotNumber", SlotInfo
  1610.                     set CardBusNum = *( $(BusInfo), 4 )
  1611.                     set CardSlotNum = *( $(SlotInfo), 4 )
  1612.  
  1613.                     ifint $(CardBusNum) == $(BusNum)
  1614.                         ifint $(CardSlotNum) == $(DeviceNum)
  1615.                             ; Update InfName and InfOption
  1616.                             OpenRegKey $(IE_Card) "" "NetRules" $(MAXIMUM_ALLOWED) H_NetRules
  1617.                             ifstr $(H_NetRules) == $(KeyNull)
  1618.                                 Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  1619.                                 Goto fatalregistry
  1620.                             endif
  1621.  
  1622.                             SetRegValue $(H_NetRules) {InfName,$(NoTitle),$(!REG_VT_SZ),$(InfFileName)}
  1623.                             SetRegValue $(H_NetRules) {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}
  1624.                             CloseRegKey $(H_NetRules)
  1625.  
  1626.                             ; Set default value
  1627.                             set NewValueList = $($(Sub)DefaultParamList)
  1628.                             set ParamPath = $(!NTN_ServiceBase)"\"$(ServiceName)"\Parameters"
  1629.                             OpenRegKey $(!REG_H_LOCAL) "" $(ParamPath) $(!REG_KEY_WRITE) KeyParam
  1630.                             Shell  $(UtilityInf), AddValueList, $(KeyParam), $(NewValueList)
  1631.  
  1632.                             ; for 3043 UI registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  1633.                             CreateRegKey $(KeyParam) {"UI",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_UI
  1634.                             ifstr $(H_UI) == $(KeyNull)
  1635.                                 OpenRegKey $(KeyParam) "" "UI" $(MAXIMUM_ALLOWED) H_UI
  1636.                                 ifstr $(H_UI) == $(KeyNull)
  1637.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1638.                                     CloseRegKey $(KeyParam)
  1639.                                     goto fatalregistry
  1640.                                 endif
  1641.                             endif
  1642.  
  1643.                             ; for 3043 ConnectionType registry >>>>>>>>>>>>>>>>>
  1644.                             CreateRegKey $(H_UI) {"ConnectionType",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_ConnectionType
  1645.                             ifstr $(H_ConnectionType) == $(KeyNull)
  1646.                                 OpenRegKey $(H_UI) "" "ConnectionType" $(MAXIMUM_ALLOWED) H_ConnectionType
  1647.                                 ifstr $(H_ConnectionType) == $(KeyNull)
  1648.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1649.                                     CloseRegKey $(H_UI)
  1650.                                     goto fatalregistry
  1651.                                 endif
  1652.                             endif
  1653.  
  1654.                             set NewValueList = $(ConnectionTypeParamList)
  1655.                             Shell $(UtilityInf), AddValueList, $(H_ConnectionType), $(NewValueList)
  1656.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1657.                                 goto ShellCodeError
  1658.                             endif
  1659.  
  1660.                             ; for 3043 ConnectionType Enum registry
  1661.                             CreateRegKey $(H_ConnectionType) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_Enum
  1662.                             ifstr $(H_Enum) == $(KeyNull)
  1663.                                 OpenRegKey $(H_ConnectionType) "" "enum" $(MAXIMUM_ALLOWED) H_Enum
  1664.                                 ifstr $(H_Enum) == $(KeyNull)
  1665.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1666.                                     CloseRegKey $(H_ConnectionType)
  1667.                                     goto fatalregistry
  1668.                                 endif
  1669.                             endif
  1670.  
  1671.                             set NewValueList = $(ConnectionTypeEnumList)
  1672.                             Shell $(UtilityInf), AddValueList, $(H_Enum), $(NewValueList)
  1673.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1674.                                 goto ShellCodeError
  1675.                             endif
  1676.  
  1677.                             CloseRegKey $(H_Enum)
  1678.                             CloseRegKey $(H_ConnectionType)
  1679.  
  1680.                             ; for 3043 NetworkAddress registry >>>>>>>>>>>>>>>>>
  1681.                             CreateRegKey $(H_UI) {"NetworkAddress",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_NetworkAddress
  1682.                             ifstr $(H_NetworkAddress) == $(KeyNull)
  1683.                                 OpenRegKey $(H_UI) "" "NetworkAddress" $(MAXIMUM_ALLOWED) H_NetworkAddress
  1684.                                 ifstr $(H_NetworkAddress) == $(KeyNull)
  1685.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1686.                                     CloseRegKey $(H_UI)
  1687.                                     goto fatalregistry
  1688.                                 endif
  1689.                             endif
  1690.  
  1691.                             set NewValueList = $(NetworkAddressParamList)
  1692.                             Shell $(UtilityInf), AddValueList, $(H_NetworkAddress), $(NewValueList)
  1693.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1694.                                 goto ShellCodeError
  1695.                             endif
  1696.  
  1697.                             CloseRegKey $(H_NetworkAddress)
  1698.  
  1699.                             ; for 3043 TransmitBuffers registry >>>>>>>>>>>>>>>>
  1700.                             CreateRegKey $(H_UI) {"TransmitBuffers",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_TransmitBuffers
  1701.                             ifstr $(H_TransmitBuffers) == $(KeyNull)
  1702.                                 OpenRegKey $(H_UI) "" "TransmitBuffers" $(MAXIMUM_ALLOWED) H_TransmitBuffers
  1703.                                 ifstr $(H_TransmitBuffers) == $(KeyNull)
  1704.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1705.                                     CloseRegKey $(H_UI)
  1706.                                     goto fatalregistry
  1707.                                 endif
  1708.                             endif
  1709.  
  1710.                             set NewValueList = $($(Sub)TransmitBuffersParamList)
  1711.                             Shell $(UtilityInf), AddValueList, $(H_TransmitBuffers), $(NewValueList)
  1712.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1713.                                 goto ShellCodeError
  1714.                             endif
  1715.  
  1716.                             CloseRegKey $(H_TransmitBuffers)
  1717.  
  1718.                             ; for 3043 ReceiveBuffers registry >>>>>>>>>>>>>>>>>
  1719.                             CreateRegKey $(H_UI) {"ReceiveBuffers",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_ReceiveBuffers
  1720.                             ifstr $(H_ReceiveBuffers) == $(KeyNull)
  1721.                                 OpenRegKey $(H_UI) "" "ReceiveBuffers" $(MAXIMUM_ALLOWED) H_ReceiveBuffers
  1722.                                 ifstr $(H_ReceiveBuffers) == $(KeyNull)
  1723.                                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1724.                                     CloseRegKey $(H_UI)
  1725.                                     goto fatalregistry
  1726.                                 endif
  1727.                             endif
  1728.  
  1729.                             set NewValueList = $(ReceiveBuffersParamList)
  1730.                             Shell $(UtilityInf), AddValueList, $(H_ReceiveBuffers), $(NewValueList)
  1731.                             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1732.                                 goto ShellCodeError
  1733.                             endif
  1734.  
  1735.                             CloseRegKey $(H_ReceiveBuffers)
  1736.  
  1737.                             CloseRegKey $(KeyParam)
  1738.  
  1739.                             ; Update Software Title
  1740.                             set ParamPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$(IE_KeyName)
  1741.                             OpenRegKey $(!REG_H_LOCAL) "" $(ParamPath) $(!REG_KEY_WRITE) KeyParam
  1742.                             SetRegValue $(KeyParam) {Title,$(NoTitle),$(!REG_VT_SZ),"["$(IE_KeyName)"] "$(ProductHardware$(Option)$(Sub)Title)}
  1743.                             CloseRegKey $(KeyParam)
  1744.  
  1745.                             ; Update Version Number
  1746.                             set ParamPath = "SOFTWARE\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  1747.                             OpenRegKey $(!REG_H_LOCAL) "" $(ParamPath) $(!REG_KEY_WRITE) KeyParam
  1748.                             SetRegValue $(KeyParam) {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)}
  1749.                             SetRegValue $(KeyParam) {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)}
  1750.                             CloseRegKey $(KeyParam)
  1751.                         endif
  1752.                     endif
  1753.                     CloseRegKey $(IE_KeyService)
  1754.  
  1755.                 endif
  1756.                 CloseRegKey $(IE_Card)
  1757.  
  1758.             EndForListDo
  1759.             CloseRegKey $(IE_KeyNetcards)
  1760.  
  1761.         EndForListDo
  1762.  
  1763.     endif
  1764.     ; end of setting default values
  1765.  
  1766.     ifint $(OldVersionExisted) == $(FALSE)
  1767.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  1768.                                                    $(ProductSoftwareName), +
  1769.                                                    $(ProductSoftwareName), +
  1770.                                                    $(ProductSoftwareTitle), +
  1771.                                                    $(STF_CONTEXTINFNAME), +
  1772.                                                    $(ProductSoftwareImagePath$(TargetOS)), +
  1773.                                                    "kernel", +
  1774.                                                    "NDIS", +
  1775.                                                    {}, +
  1776.                                                    "", +
  1777.                                                    $(NetEventDLL)
  1778.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1779.             goto ShellCodeError
  1780.         endif
  1781.  
  1782.         Set OEM_ABANDON_SOFTWARE = TRUE
  1783.         set RegistryErrorIndex = $($R0)
  1784.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1785.             EndWait
  1786.             CloseRegKey $($R1)
  1787.             CloseRegKey $($R2)
  1788.             CloseRegKey $($R3)
  1789.             CloseRegKey $($R4)
  1790.             CloseRegKey $($R5)
  1791.             goto fatalregistry
  1792.         endif
  1793.  
  1794.         Set SoftProductKey   = $($R1)
  1795.         Set SoftNetRuleKey   = $($R2)
  1796.         Set SoftServiceKey   = $($R3)
  1797.         Set SoftParameterKey = $($R4)
  1798.         Set SoftLinkageKey   = $($R5)
  1799.         set NewValueList = { {SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  1800.                              {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  1801.                              {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  1802.                              {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  1803.                              {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  1804.                              {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  1805.                              {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*( $(Now),1 )} }
  1806.         Shell $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  1807.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1808.             goto ShellCodeError
  1809.         endif
  1810.  
  1811.         set RegistryErrorIndex = $($R0)
  1812.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1813.             EndWait
  1814.             CloseRegKey $(SoftProductKey)
  1815.             CloseRegKey $(SoftNetRuleKey)
  1816.             CloseRegKey $(SoftServiceKey)
  1817.             CloseRegKey $(SoftParameterKey)
  1818.             CloseRegKey $(SoftLinkageKey)
  1819.             goto fatalregistry
  1820.         endif
  1821.  
  1822.         set NewValueList = { {type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  1823.                              {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  1824.                              {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  1825.                              {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  1826.                              {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareSWBindable)}, +
  1827.                              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)} }
  1828.         Shell $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  1829.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1830.             goto ShellCodeError
  1831.         endif
  1832.  
  1833.         set RegistryErrorIndex = $($R0)
  1834.         CloseRegKey $(SoftProductKey)
  1835.         CloseRegKey $(SoftNetRuleKey)
  1836.         CloseRegKey $(SoftServiceKey)
  1837.         CloseRegKey $(SoftParameterKey)
  1838.         CloseRegKey $(SoftLinkageKey)
  1839.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1840.             EndWait
  1841.             goto fatalregistry
  1842.         endif
  1843.  
  1844.     endif
  1845.  
  1846. ;----------------------------------------------------------------------------
  1847. InstallAdapter106S =+
  1848.  
  1849.     ifstr(i) $(AdapterList106S) == {}
  1850.         goto InstallAdapter106J
  1851.     endif
  1852.  
  1853.     ForListDo $(AdapterList106S)
  1854.         set BusNum = *($($),1)
  1855.         set DeviceNum = *($($),2)
  1856.         set FunctionNum = *($($),3)
  1857.  
  1858.         set Sub = "VT3106S"
  1859.  
  1860.         Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNum), +
  1861.                                                         $(DeviceNum), +
  1862.                                                         $(ProductHardware$(Option)$(Sub)Title), +
  1863.                                                         $(ProductHardwareName), +
  1864.                                                         "YES"
  1865.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1866.             goto ShellCodeError
  1867.         endif
  1868.  
  1869.         ifstr $($R0) != "NO_ERROR"
  1870.             set Error = $($R0)
  1871.             goto fatal
  1872.         endif
  1873.  
  1874.         ifstr(i) $($R1) != "YES"
  1875.             Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName), +
  1876.                                                        $(STF_CONTEXTINFNAME), +
  1877.                                                        $(ProductKeyName)
  1878.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1879.                 goto ShellCodeError
  1880.             endif
  1881.  
  1882.             ifint $($R4) != -1
  1883.                 Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  1884.             endif
  1885.  
  1886.             set RegistryErrorIndex = $($R0)
  1887.             Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1888.                 EndWait
  1889.                 CloseRegKey $($R1)
  1890.                 CloseRegKey $($R2)
  1891.                 CloseRegKey $($R3)
  1892.                 goto fatalregistry
  1893.             endif
  1894.  
  1895.             ; support unattended mode installation under windows NT 4.0 (AJ 03/22/1999)
  1896.             ifstr $(!STF_GUI_UNATTENDED) != "YES"
  1897.                 ui pop 1
  1898.             endif
  1899.  
  1900.             Set HardNetCardKey   = $($R1)
  1901.             Set HardNetRuleKey   = $($R2)
  1902.             Set HardParameterKey = $($R3)
  1903.             set AdapterNumber    = $($R4)
  1904.             set NewValueList = { {Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  1905.                                  {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)$(Sub)Title)},+
  1906.                                  {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  1907.                                  {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  1908.                                  {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  1909.                                  {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)} }
  1910.             Shell $(UtilityInf), AddValueList, $(HardNetCardKey), $(NewValueList)
  1911.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1912.                 goto ShellCodeError
  1913.             endif
  1914.  
  1915.             set BusTypeNum = 5
  1916.             set NewValueList = { {AdapterType,$(NoTitle),$(!REG_VT_DWORD),$(Adapter$(Option)Type)},+
  1917.                                  {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  1918.                                  {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  1919.                                  {AdapterCFID,$(NoTitle),$(!REG_VT_DWORD),$(VT3106SCFID)} }
  1920.             Shell $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  1921.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1922.                 goto ShellCodeError
  1923.             endif
  1924.  
  1925.             ; for 3106S registery
  1926.             set NewValueList = $(VT3106SDefaultParamList)
  1927.             Shell $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  1928.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1929.                 goto ShellCodeError
  1930.             endif
  1931.  
  1932.             ; for 3106S UI registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  1933.             CreateRegKey $(HardParameterKey) {"UI",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" UIHandle
  1934.             ifstr $(UIHandle) == $(KeyNull)
  1935.                 OpenRegKey $(HardParameterKey) "" "UI" $(MAXIMUM_ALLOWED) UIHandle
  1936.             endif
  1937.             ifstr $(UIHandle) == $(KeyNull)
  1938.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1939.                 CloseRegKey $(HardParameterKey)
  1940.                 goto fatalregistry
  1941.             endif
  1942.  
  1943.             ; for 3106S ConnectionType registry >>>>>>>>>>>>>>>>>>>>>>>
  1944.             CreateRegKey $(UIHandle) {"ConnectionType",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" ConnectionTypeHandle
  1945.             ifstr $(ConnectionTypeHandle) == $(KeyNull)
  1946.                 OpenRegKey $(UIHandle) "" "ConnectionType" $(MAXIMUM_ALLOWED) ConnectionTypeHandle
  1947.             endif
  1948.             ifstr $(ConnectionTypeHandle) == $(KeyNull)
  1949.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1950.                 CloseRegKey $(UIHandle)
  1951.                 goto fatalregistry
  1952.             endif
  1953.  
  1954.             set NewValueList = $(ConnectionTypeParamList)
  1955.             Shell $(UtilityInf), AddValueList, $(ConnectionTypeHandle), $(NewValueList)
  1956.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1957.                 goto ShellCodeError
  1958.             endif
  1959.  
  1960.             ; for 3106S ConnectionType Enum registry
  1961.             CreateRegKey $(ConnectionTypeHandle) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" EnumHandle
  1962.             ifstr $(EnumHandle) == $(KeyNull)
  1963.                 OpenRegKey $(ConnectionTypeHandle) "" "enum" $(MAXIMUM_ALLOWED) EnumHandle
  1964.             endif
  1965.             ifstr $(EnumHandle) == $(KeyNull)
  1966.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1967.                 CloseRegKey $(ConnectionTypeHandle)
  1968.                 goto fatalregistry
  1969.             endif
  1970.  
  1971.             set NewValueList = $(ConnectionTypeEnumList)
  1972.             Shell $(UtilityInf), AddValueList, $(EnumHandle), $(NewValueList)
  1973.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1974.                 goto ShellCodeError
  1975.             endif
  1976.  
  1977.             CloseRegKey $(EnumHandle)
  1978.             CloseRegKey $(ConnectionTypeHandle)
  1979.  
  1980.             ; for 3106S NetworkAddress registry >>>>>>>>>>>>>>>>>>>>>>>
  1981.             CreateRegKey $(UIHandle) {"NetworkAddress",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" NetworkAddressHandle
  1982.             ifstr $(NetworkAddressHandle) == $(KeyNull)
  1983.                 OpenRegKey $(UIHandle) "" "NetworkAddress" $(MAXIMUM_ALLOWED) NetworkAddressHandle
  1984.             endif
  1985.             ifstr $(NetworkAddressHandle) == $(KeyNull)
  1986.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  1987.                 CloseRegKey $(UIHandle)
  1988.                 goto fatalregistry
  1989.             endif
  1990.  
  1991.             set NewValueList = $(NetworkAddressParamList)
  1992.             Shell $(UtilityInf), AddValueList, $(NetworkAddressHandle), $(NewValueList)
  1993.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1994.                 goto ShellCodeError
  1995.             endif
  1996.  
  1997.             CloseRegKey $(NetworkAddressHandle)
  1998.  
  1999.             ; for 3106S TransmitBuffers registry >>>>>>>>>>>>>>>>>>>>>>
  2000.             CreateRegKey $(UIHandle) {"TransmitBuffers",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" TransmitBuffersHandle
  2001.             ifstr $(TransmitBuffersHandle) == $(KeyNull)
  2002.                 OpenRegKey $(UIHandle) "" "TransmitBuffers" $(MAXIMUM_ALLOWED) TransmitBuffersHandle
  2003.             endif
  2004.             ifstr $(TransmitBuffersHandle) == $(KeyNull)
  2005.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2006.                 CloseRegKey $(UIHandle)
  2007.                 goto fatalregistry
  2008.             endif
  2009.  
  2010.             set NewValueList = $(TransmitBuffersParamList)
  2011.             Shell $(UtilityInf), AddValueList, $(TransmitBuffersHandle), $(NewValueList)
  2012.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2013.                 goto ShellCodeError
  2014.             endif
  2015.  
  2016.             CloseRegKey $(TransmitBuffersHandle)
  2017.  
  2018.             ; for 3106S ReceiveBuffers registry >>>>>>>>>>>>>>>>>>>>>>>
  2019.             CreateRegKey $(UIHandle) {"ReceiveBuffers",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" ReceiveBuffersHandle
  2020.             ifstr $(ReceiveBuffersHandle) == $(KeyNull)
  2021.                 OpenRegKey $(UIHandle) "" "ReceiveBuffers" $(MAXIMUM_ALLOWED) ReceiveBuffersHandle
  2022.             endif
  2023.             ifstr $(ReceiveBuffersHandle) == $(KeyNull)
  2024.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2025.                 CloseRegKey $(UIHandle)
  2026.                 goto fatalregistry
  2027.             endif
  2028.  
  2029.             set NewValueList = $(ReceiveBuffersParamList)
  2030.             Shell $(UtilityInf), AddValueList, $(ReceiveBuffersHandle), $(NewValueList)
  2031.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2032.                 goto ShellCodeError
  2033.             endif
  2034.  
  2035.             CloseRegKey $(ReceiveBuffersHandle)
  2036.  
  2037.             ; for 3106S FlowCtrl registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  2038.             CreateRegKey $(UIHandle) {"FlowCtrl",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" FlowCtrlHandle
  2039.             ifstr $(FlowCtrlHandle) == $(KeyNull)
  2040.                 OpenRegKey $(UIHandle) "" "FlowCtrl" $(MAXIMUM_ALLOWED) FlowCtrlHandle
  2041.             endif
  2042.             ifstr $(FlowCtrlHandle) == $(KeyNull)
  2043.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2044.                 CloseRegKey $(UIHandle)
  2045.                 goto fatalregistry
  2046.             endif
  2047.  
  2048.             set NewValueList = $(FlowCtrlParamList)
  2049.             Shell $(UtilityInf), AddValueList, $(FlowCtrlHandle), $(NewValueList)
  2050.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2051.                 goto ShellCodeError
  2052.             endif
  2053.  
  2054.             ; for 3106S FlowCtrl Enum registry
  2055.             CreateRegKey $(FlowCtrlHandle) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" EnumHandle
  2056.             ifstr $(EnumHandle) == $(KeyNull)
  2057.                 OpenRegKey $(FlowCtrlHandle) "" "enum" $(MAXIMUM_ALLOWED) EnumHandle
  2058.             endif
  2059.             ifstr $(EnumHandle) == $(KeyNull)
  2060.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2061.                 CloseRegKey $(FlowCtrlHandle)
  2062.                 goto fatalregistry
  2063.             endif
  2064.  
  2065.             set NewValueList = $(FlowCtrlEnumList)
  2066.             Shell $(UtilityInf), AddValueList, $(EnumHandle), $(NewValueList)
  2067.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2068.                 goto ShellCodeError
  2069.             endif
  2070.  
  2071.             CloseRegKey $(EnumHandle)
  2072.             CloseRegKey $(FlowCtrlHandle)
  2073.  
  2074.             ; for 3106S AdaptiveInt registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  2075.             CreateRegKey $(UIHandle) {"AdaptiveInt",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" AdaptiveIntHandle
  2076.             ifstr $(AdaptiveIntHandle) == $(KeyNull)
  2077.                 OpenRegKey $(UIHandle) "" "AdaptiveInt" $(MAXIMUM_ALLOWED) AdaptiveIntHandle
  2078.             endif
  2079.             ifstr $(AdaptiveIntHandle) == $(KeyNull)
  2080.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2081.                 CloseRegKey $(UIHandle)
  2082.                 goto fatalregistry
  2083.             endif
  2084.  
  2085.             set NewValueList = $(AdaptiveIntParamList)
  2086.             Shell $(UtilityInf), AddValueList, $(AdaptiveIntHandle), $(NewValueList)
  2087.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2088.                 goto ShellCodeError
  2089.             endif
  2090.  
  2091.             ; for 3106S AdaptiveInt Enum registry
  2092.             CreateRegKey $(AdaptiveIntHandle) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" EnumHandle
  2093.             ifstr $(EnumHandle) == $(KeyNull)
  2094.                 OpenRegKey $(AdaptiveIntHandle) "" "enum" $(MAXIMUM_ALLOWED) EnumHandle
  2095.             endif
  2096.             ifstr $(EnumHandle) == $(KeyNull)
  2097.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2098.                 CloseRegKey $(AdaptiveIntHandle)
  2099.                 goto fatalregistry
  2100.             endif
  2101.  
  2102.             set NewValueList = $(DisableEnableEnumList)
  2103.             Shell $(UtilityInf), AddValueList, $(EnumHandle), $(NewValueList)
  2104.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2105.                 goto ShellCodeError
  2106.             endif
  2107.  
  2108.             CloseRegKey $(EnumHandle)
  2109.             CloseRegKey $(AdaptiveIntHandle)
  2110.  
  2111.             ; for 3106S 8021pqtag registry >>>>>>>>>>>>>>>>>>>>>>>>>>>
  2112.             CreateRegKey $(UIHandle) {"8021pqtag",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_8021pqtag
  2113.             ifstr $(H_8021pqtag) == $(KeyNull)
  2114.                 OpenRegKey $(UIHandle) "" "8021pqtag" $(MAXIMUM_ALLOWED) H_8021pqtag
  2115.             endif
  2116.             ifstr $(H_8021pqtag) == $(KeyNull)
  2117.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2118.                 CloseRegKey $(UIHandle)
  2119.                 goto fatalregistry
  2120.             endif
  2121.  
  2122.             set NewValueList = $(8021pqtagParamList)
  2123.             Shell $(UtilityInf), AddValueList, $(H_8021pqtag), $(NewValueList)
  2124.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2125.                 goto ShellCodeError
  2126.             endif
  2127.  
  2128.             ; for 3106S 8021pqtag Enum registry
  2129.             CreateRegKey $(H_8021pqtag) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" EnumHandle
  2130.             ifstr $(EnumHandle) == $(KeyNull)
  2131.                 OpenRegKey $(H_8021pqtag) "" "enum" $(MAXIMUM_ALLOWED) EnumHandle
  2132.             endif
  2133.             ifstr $(EnumHandle) == $(KeyNull)
  2134.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2135.                 CloseRegKey $(H_8021pqtag)
  2136.                 goto fatalregistry
  2137.             endif
  2138.  
  2139.             set NewValueList = $(DisableEnableEnumList)
  2140.             Shell $(UtilityInf), AddValueList, $(EnumHandle), $(NewValueList)
  2141.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2142.                 goto ShellCodeError
  2143.             endif
  2144.  
  2145.             CloseRegKey $(EnumHandle)
  2146.             CloseRegKey $(H_8021pqtag)
  2147.  
  2148.             ; for 3106S VLANID registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  2149.             CreateRegKey $(UIHandle) {"VLANID",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" VLANIDHandle
  2150.             ifstr $(VLANIDHandle) == $(KeyNull)
  2151.                 OpenRegKey $(UIHandle) "" "VLANID" $(MAXIMUM_ALLOWED) VLANIDHandle
  2152.             endif
  2153.             ifstr $(VLANIDHandle) == $(KeyNull)
  2154.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2155.                 CloseRegKey $(UIHandle)
  2156.                 goto fatalregistry
  2157.             endif
  2158.  
  2159.             set NewValueList = $(VLANIDParamList)
  2160.             Shell $(UtilityInf), AddValueList, $(VLANIDHandle), $(NewValueList)
  2161.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2162.                 goto ShellCodeError
  2163.             endif
  2164.  
  2165.             CloseRegKey $(VLANIDHandle)
  2166.  
  2167.             CloseRegKey $(UIHandle)
  2168.         endif
  2169.  
  2170.         set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  2171.         set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  2172.         set NewValueList = { {type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardware$(Option)Type)},+
  2173.                              {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  2174.                              {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardware$(Option)Class)}, +
  2175.                              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)} }
  2176.         Shell $(UtilityInf), AddValueList, $(HardNetRuleKey), $(NewValueList)
  2177.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2178.             goto ShellCodeError
  2179.         endif
  2180.  
  2181.         CloseRegKey $(HardNetCardKey)
  2182.         CloseRegKey $(HardNetRuleKey)
  2183.  
  2184.         set NewValueList = { {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  2185.                              {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(DeviceNum)},+
  2186.                              {FunctionNumber,$(NoTitle),$(!REG_VT_DWORD),$(FunctionNum)} }
  2187.         Shell $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  2188.  
  2189.         CloseRegKey $(HardParameterKey)
  2190.  
  2191.     EndForListDo
  2192.  
  2193. ;----------------------------------------------------------------------------
  2194. InstallAdapter106J =+
  2195.  
  2196.     ifstr(i) $(AdapterList106J) == {}
  2197.         goto InstallAdapter65
  2198.     endif
  2199.  
  2200.     ForListDo $(AdapterList106J)
  2201.         set BusNum = *($($),1)
  2202.         set DeviceNum = *($($),2)
  2203.         set FunctionNum = *($($),3)
  2204.  
  2205.         set Sub = "VT3106J"
  2206.  
  2207.         Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNum), +
  2208.                                                         $(DeviceNum), +
  2209.                                                         $(ProductHardware$(Option)$(Sub)Title), +
  2210.                                                         $(ProductHardwareName), +
  2211.                                                         "YES"
  2212.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2213.             goto ShellCodeError
  2214.         endif
  2215.  
  2216.         ifstr $($R0) != "NO_ERROR"
  2217.             set Error = $($R0)
  2218.             goto fatal
  2219.         endif
  2220.  
  2221.         ifstr(i) $($R1) != "YES"
  2222.             Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName), +
  2223.                                                        $(STF_CONTEXTINFNAME), +
  2224.                                                        $(ProductKeyName)
  2225.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2226.                 goto ShellCodeError
  2227.             endif
  2228.  
  2229.             ifint $($R4) != -1
  2230.                 Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  2231.             endif
  2232.  
  2233.             set RegistryErrorIndex = $($R0)
  2234.             Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  2235.                 EndWait
  2236.                 CloseRegKey $($R1)
  2237.                 CloseRegKey $($R2)
  2238.                 CloseRegKey $($R3)
  2239.                 goto fatalregistry
  2240.             endif
  2241.  
  2242.             ; support unattended mode installation under windows NT 4.0 (AJ 03/22/1999)
  2243.             ifstr $(!STF_GUI_UNATTENDED) != "YES"
  2244.                 ui pop 1
  2245.             endif
  2246.  
  2247.             Set HardNetCardKey   = $($R1)
  2248.             Set HardNetRuleKey   = $($R2)
  2249.             Set HardParameterKey = $($R3)
  2250.             set AdapterNumber    = $($R4)
  2251.             set NewValueList = { {Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  2252.                                  {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)$(Sub)Title)},+
  2253.                                  {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  2254.                                  {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  2255.                                  {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  2256.                                  {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)} }
  2257.             Shell $(UtilityInf), AddValueList, $(HardNetCardKey), $(NewValueList)
  2258.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2259.                 goto ShellCodeError
  2260.             endif
  2261.  
  2262.             set BusTypeNum = 5
  2263.             set NewValueList = { {AdapterType,$(NoTitle),$(!REG_VT_DWORD),$(Adapter$(Option)Type)},+
  2264.                                  {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  2265.                                  {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  2266.                                  {AdapterCFID,$(NoTitle),$(!REG_VT_DWORD),$(VT3106JCFID)} }
  2267.             Shell $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  2268.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2269.                 goto ShellCodeError
  2270.             endif
  2271.  
  2272.             ; for 3106J registery
  2273.             set NewValueList = $(VT3106JDefaultParamList)
  2274.             Shell $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  2275.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2276.                 goto ShellCodeError
  2277.             endif
  2278.  
  2279.             ; for 3106J UI registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  2280.             CreateRegKey $(HardParameterKey) {"UI",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" UIHandle
  2281.             ifstr $(UIHandle) == $(KeyNull)
  2282.                 OpenRegKey $(HardParameterKey) "" "UI" $(MAXIMUM_ALLOWED) UIHandle
  2283.             endif
  2284.             ifstr $(UIHandle) == $(KeyNull)
  2285.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2286.                 CloseRegKey $(HardParameterKey)
  2287.                 goto fatalregistry
  2288.             endif
  2289.  
  2290.             ; for 3106J ConnectionType registry >>>>>>>>>>>>>>>>>>>>>>>
  2291.             CreateRegKey $(UIHandle) {"ConnectionType",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" ConnectionTypeHandle
  2292.             ifstr $(ConnectionTypeHandle) == $(KeyNull)
  2293.                 OpenRegKey $(UIHandle) "" "ConnectionType" $(MAXIMUM_ALLOWED) ConnectionTypeHandle
  2294.             endif
  2295.             ifstr $(ConnectionTypeHandle) == $(KeyNull)
  2296.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2297.                 CloseRegKey $(UIHandle)
  2298.                 goto fatalregistry
  2299.             endif
  2300.  
  2301.             set NewValueList = $(ConnectionTypeParamList)
  2302.             Shell $(UtilityInf), AddValueList, $(ConnectionTypeHandle), $(NewValueList)
  2303.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2304.                 goto ShellCodeError
  2305.             endif
  2306.  
  2307.             ; for 3106J ConnectionType Enum registry
  2308.             CreateRegKey $(ConnectionTypeHandle) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" EnumHandle
  2309.             ifstr $(EnumHandle) == $(KeyNull)
  2310.                 OpenRegKey $(ConnectionTypeHandle) "" "enum" $(MAXIMUM_ALLOWED) EnumHandle
  2311.             endif
  2312.             ifstr $(EnumHandle) == $(KeyNull)
  2313.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2314.                 CloseRegKey $(ConnectionTypeHandle)
  2315.                 goto fatalregistry
  2316.             endif
  2317.  
  2318.             set NewValueList = $(ConnectionTypeEnumList)
  2319.             Shell $(UtilityInf), AddValueList, $(EnumHandle), $(NewValueList)
  2320.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2321.                 goto ShellCodeError
  2322.             endif
  2323.  
  2324.             CloseRegKey $(EnumHandle)
  2325.             CloseRegKey $(ConnectionTypeHandle)
  2326.  
  2327.             ; for 3106J NetworkAddress registry >>>>>>>>>>>>>>>>>>>>>>>
  2328.             CreateRegKey $(UIHandle) {"NetworkAddress",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" NetworkAddressHandle
  2329.             ifstr $(NetworkAddressHandle) == $(KeyNull)
  2330.                 OpenRegKey $(UIHandle) "" "NetworkAddress" $(MAXIMUM_ALLOWED) NetworkAddressHandle
  2331.             endif
  2332.             ifstr $(NetworkAddressHandle) == $(KeyNull)
  2333.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2334.                 CloseRegKey $(UIHandle)
  2335.                 goto fatalregistry
  2336.             endif
  2337.  
  2338.             set NewValueList = $(NetworkAddressParamList)
  2339.             Shell $(UtilityInf), AddValueList, $(NetworkAddressHandle), $(NewValueList)
  2340.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2341.                 goto ShellCodeError
  2342.             endif
  2343.  
  2344.             CloseRegKey $(NetworkAddressHandle)
  2345.  
  2346.             ; for 3106J TransmitBuffers registry >>>>>>>>>>>>>>>>>>>>>>
  2347.             CreateRegKey $(UIHandle) {"TransmitBuffers",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" TransmitBuffersHandle
  2348.             ifstr $(TransmitBuffersHandle) == $(KeyNull)
  2349.                 OpenRegKey $(UIHandle) "" "TransmitBuffers" $(MAXIMUM_ALLOWED) TransmitBuffersHandle
  2350.             endif
  2351.             ifstr $(TransmitBuffersHandle) == $(KeyNull)
  2352.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2353.                 CloseRegKey $(UIHandle)
  2354.                 goto fatalregistry
  2355.             endif
  2356.  
  2357.             set NewValueList = $(TransmitBuffersParamList)
  2358.             Shell $(UtilityInf), AddValueList, $(TransmitBuffersHandle), $(NewValueList)
  2359.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2360.                 goto ShellCodeError
  2361.             endif
  2362.  
  2363.             CloseRegKey $(TransmitBuffersHandle)
  2364.  
  2365.             ; for 3106J ReceiveBuffers registry >>>>>>>>>>>>>>>>>>>>>>>
  2366.             CreateRegKey $(UIHandle) {"ReceiveBuffers",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" ReceiveBuffersHandle
  2367.             ifstr $(ReceiveBuffersHandle) == $(KeyNull)
  2368.                 OpenRegKey $(UIHandle) "" "ReceiveBuffers" $(MAXIMUM_ALLOWED) ReceiveBuffersHandle
  2369.             endif
  2370.             ifstr $(ReceiveBuffersHandle) == $(KeyNull)
  2371.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2372.                 CloseRegKey $(UIHandle)
  2373.                 goto fatalregistry
  2374.             endif
  2375.  
  2376.             set NewValueList = $(ReceiveBuffersParamList)
  2377.             Shell $(UtilityInf), AddValueList, $(ReceiveBuffersHandle), $(NewValueList)
  2378.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2379.                 goto ShellCodeError
  2380.             endif
  2381.  
  2382.             CloseRegKey $(ReceiveBuffersHandle)
  2383.  
  2384.             ; for 3106J FlowCtrl registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  2385.             CreateRegKey $(UIHandle) {"FlowCtrl",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" FlowCtrlHandle
  2386.             ifstr $(FlowCtrlHandle) == $(KeyNull)
  2387.                 OpenRegKey $(UIHandle) "" "FlowCtrl" $(MAXIMUM_ALLOWED) FlowCtrlHandle
  2388.             endif
  2389.             ifstr $(FlowCtrlHandle) == $(KeyNull)
  2390.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2391.                 CloseRegKey $(UIHandle)
  2392.                 goto fatalregistry
  2393.             endif
  2394.  
  2395.             set NewValueList = $(FlowCtrlParamList)
  2396.             Shell $(UtilityInf), AddValueList, $(FlowCtrlHandle), $(NewValueList)
  2397.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2398.                 goto ShellCodeError
  2399.             endif
  2400.  
  2401.             ; for 3106J FlowCtrl Enum registry
  2402.             CreateRegKey $(FlowCtrlHandle) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" EnumHandle
  2403.             ifstr $(EnumHandle) == $(KeyNull)
  2404.                 OpenRegKey $(FlowCtrlHandle) "" "enum" $(MAXIMUM_ALLOWED) EnumHandle
  2405.             endif
  2406.             ifstr $(EnumHandle) == $(KeyNull)
  2407.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2408.                 CloseRegKey $(FlowCtrlHandle)
  2409.                 goto fatalregistry
  2410.             endif
  2411.  
  2412.             set NewValueList = $(FlowCtrlEnumList)
  2413.             Shell $(UtilityInf), AddValueList, $(EnumHandle), $(NewValueList)
  2414.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2415.                 goto ShellCodeError
  2416.             endif
  2417.  
  2418.             CloseRegKey $(EnumHandle)
  2419.             CloseRegKey $(FlowCtrlHandle)
  2420.  
  2421.             ; for 3106J AdaptiveInt registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  2422.             CreateRegKey $(UIHandle) {"AdaptiveInt",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" AdaptiveIntHandle
  2423.             ifstr $(AdaptiveIntHandle) == $(KeyNull)
  2424.                 OpenRegKey $(UIHandle) "" "AdaptiveInt" $(MAXIMUM_ALLOWED) AdaptiveIntHandle
  2425.             endif
  2426.             ifstr $(AdaptiveIntHandle) == $(KeyNull)
  2427.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2428.                 CloseRegKey $(UIHandle)
  2429.                 goto fatalregistry
  2430.             endif
  2431.  
  2432.             set NewValueList = $(AdaptiveIntParamList)
  2433.             Shell $(UtilityInf), AddValueList, $(AdaptiveIntHandle), $(NewValueList)
  2434.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2435.                 goto ShellCodeError
  2436.             endif
  2437.  
  2438.             ; for 3106J AdaptiveInt Enum registry
  2439.             CreateRegKey $(AdaptiveIntHandle) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" EnumHandle
  2440.             ifstr $(EnumHandle) == $(KeyNull)
  2441.                 OpenRegKey $(AdaptiveIntHandle) "" "enum" $(MAXIMUM_ALLOWED) EnumHandle
  2442.             endif
  2443.             ifstr $(EnumHandle) == $(KeyNull)
  2444.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2445.                 CloseRegKey $(AdaptiveIntHandle)
  2446.                 goto fatalregistry
  2447.             endif
  2448.  
  2449.             set NewValueList = $(DisableEnableEnumList)
  2450.             Shell $(UtilityInf), AddValueList, $(EnumHandle), $(NewValueList)
  2451.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2452.                 goto ShellCodeError
  2453.             endif
  2454.  
  2455.             CloseRegKey $(EnumHandle)
  2456.             CloseRegKey $(AdaptiveIntHandle)
  2457.  
  2458.             CloseRegKey $(UIHandle)
  2459.         endif
  2460.  
  2461.         set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  2462.         set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  2463.         set NewValueList = { {type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardware$(Option)Type)},+
  2464.                              {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  2465.                              {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardware$(Option)Class)}, +
  2466.                              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)} }
  2467.         Shell $(UtilityInf), AddValueList, $(HardNetRuleKey), $(NewValueList)
  2468.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2469.             goto ShellCodeError
  2470.         endif
  2471.  
  2472.         CloseRegKey $(HardNetCardKey)
  2473.         CloseRegKey $(HardNetRuleKey)
  2474.  
  2475.         set NewValueList = { {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  2476.                              {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(DeviceNum)},+
  2477.                              {FunctionNumber,$(NoTitle),$(!REG_VT_DWORD),$(FunctionNum)} }
  2478.         Shell $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  2479.  
  2480.         CloseRegKey $(HardParameterKey)
  2481.  
  2482.     EndForListDo
  2483.  
  2484. ;----------------------------------------------------------------------------
  2485. InstallAdapter65 =+
  2486.  
  2487.     ifstr(i) $(AdapterList65) == {}
  2488.         goto InstallAdapter43
  2489.     endif
  2490.  
  2491.     ForListDo $(AdapterList65)
  2492.         set BusNum = *($($),1)
  2493.         set DeviceNum = *($($),2)
  2494.         set FunctionNum = *($($),3)
  2495.  
  2496.         set Sub = "VT3065"
  2497.  
  2498.         Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNum), +
  2499.                                                         $(DeviceNum), +
  2500.                                                         $(ProductHardware$(Option)$(Sub)Title), +
  2501.                                                         $(ProductHardwareName), +
  2502.                                                         "YES"
  2503.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2504.             goto ShellCodeError
  2505.         endif
  2506.  
  2507.         ifstr $($R0) != "NO_ERROR"
  2508.             set Error = $($R0)
  2509.             goto fatal
  2510.         endif
  2511.  
  2512.         ifstr(i) $($R1) != "YES"
  2513.             Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName), +
  2514.                                                        $(STF_CONTEXTINFNAME), +
  2515.                                                        $(ProductKeyName)
  2516.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2517.                 goto ShellCodeError
  2518.             endif
  2519.  
  2520.             ifint $($R4) != -1
  2521.                 Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  2522.             endif
  2523.  
  2524.             set RegistryErrorIndex = $($R0)
  2525.             Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  2526.                 EndWait
  2527.                 CloseRegKey $($R1)
  2528.                 CloseRegKey $($R2)
  2529.                 CloseRegKey $($R3)
  2530.                 goto fatalregistry
  2531.             endif
  2532.  
  2533.             ; support unattended mode installation under windows NT 4.0 (AJ 03/22/1999)
  2534.             ifstr $(!STF_GUI_UNATTENDED) != "YES"
  2535.                 ui pop 1
  2536.             endif
  2537.  
  2538.             Set HardNetCardKey   = $($R1)
  2539.             Set HardNetRuleKey   = $($R2)
  2540.             Set HardParameterKey = $($R3)
  2541.             set AdapterNumber    = $($R4)
  2542.             set NewValueList = { {Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  2543.                                  {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)$(Sub)Title)},+
  2544.                                  {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  2545.                                  {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  2546.                                  {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  2547.                                  {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)} }
  2548.             Shell $(UtilityInf), AddValueList, $(HardNetCardKey), $(NewValueList)
  2549.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2550.                 goto ShellCodeError
  2551.             endif
  2552.  
  2553.             set BusTypeNum = 5
  2554.             set NewValueList = { {AdapterType,$(NoTitle),$(!REG_VT_DWORD),$(Adapter$(Option)Type)},+
  2555.                                  {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  2556.                                  {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  2557.                                  {AdapterCFID,$(NoTitle),$(!REG_VT_DWORD),$(VT3065CFID)} }
  2558.             Shell $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  2559.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2560.                 goto ShellCodeError
  2561.             endif
  2562.  
  2563.             ; for 3065 registry
  2564.             set NewValueList = $(VT3065DefaultParamList)
  2565.             Shell $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  2566.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2567.                 goto ShellCodeError
  2568.             endif
  2569.  
  2570.             ; for 3065 UI registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  2571.             CreateRegKey $(HardParameterKey) {"UI",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" UIHandle
  2572.             ifstr $(UIHandle) == $(KeyNull)
  2573.                 OpenRegKey $(HardParameterKey) "" "UI" $(MAXIMUM_ALLOWED) UIHandle
  2574.             endif
  2575.             ifstr $(UIHandle) == $(KeyNull)
  2576.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2577.                 CloseRegKey $(HardParameterKey)
  2578.                 goto fatalregistry
  2579.             endif
  2580.  
  2581.             ; for 3065 ConnectionType registry >>>>>>>>>>>>>>>>>>>>>>>
  2582.             CreateRegKey $(UIHandle) {"ConnectionType",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" ConnectionTypeHandle
  2583.             ifstr $(ConnectionTypeHandle) == $(KeyNull)
  2584.                 OpenRegKey $(UIHandle) "" "ConnectionType" $(MAXIMUM_ALLOWED) ConnectionTypeHandle
  2585.             endif
  2586.             ifstr $(ConnectionTypeHandle) == $(KeyNull)
  2587.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2588.                 CloseRegKey $(UIHandle)
  2589.                 goto fatalregistry
  2590.             endif
  2591.  
  2592.             set NewValueList = $(ConnectionTypeParamList)
  2593.             Shell $(UtilityInf), AddValueList, $(ConnectionTypeHandle), $(NewValueList)
  2594.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2595.                 goto ShellCodeError
  2596.             endif
  2597.  
  2598.             ; for 3065 ConnectionType Enum registry
  2599.             CreateRegKey $(ConnectionTypeHandle) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" EnumHandle
  2600.             ifstr $(EnumHandle) == $(KeyNull)
  2601.                 OpenRegKey $(ConnectionTypeHandle) "" "enum" $(MAXIMUM_ALLOWED) EnumHandle
  2602.             endif
  2603.             ifstr $(EnumHandle) == $(KeyNull)
  2604.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2605.                 CloseRegKey $(ConnectionTypeHandle)
  2606.                 goto fatalregistry
  2607.             endif
  2608.  
  2609.             set NewValueList = $(ConnectionTypeEnumList)
  2610.             Shell $(UtilityInf), AddValueList, $(EnumHandle), $(NewValueList)
  2611.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2612.                 goto ShellCodeError
  2613.             endif
  2614.  
  2615.             CloseRegKey $(EnumHandle)
  2616.             CloseRegKey $(ConnectionTypeHandle)
  2617.  
  2618.             ; for 3065 NetworkAddress registry >>>>>>>>>>>>>>>>>>>>>>>
  2619.             CreateRegKey $(UIHandle) {"NetworkAddress",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" NetworkAddressHandle
  2620.             ifstr $(NetworkAddressHandle) == $(KeyNull)
  2621.                 OpenRegKey $(UIHandle) "" "NetworkAddress" $(MAXIMUM_ALLOWED) NetworkAddressHandle
  2622.             endif
  2623.             ifstr $(NetworkAddressHandle) == $(KeyNull)
  2624.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2625.                 CloseRegKey $(UIHandle)
  2626.                 goto fatalregistry
  2627.             endif
  2628.  
  2629.             set NewValueList = $(NetworkAddressParamList)
  2630.             Shell $(UtilityInf), AddValueList, $(NetworkAddressHandle), $(NewValueList)
  2631.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2632.                 goto ShellCodeError
  2633.             endif
  2634.  
  2635.             CloseRegKey $(NetworkAddressHandle)
  2636.  
  2637.             ; for 3065 TransmitBuffers registry >>>>>>>>>>>>>>>>>>>>>>
  2638.             CreateRegKey $(UIHandle) {"TransmitBuffers",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" TransmitBuffersHandle
  2639.             ifstr $(TransmitBuffersHandle) == $(KeyNull)
  2640.                 OpenRegKey $(UIHandle) "" "TransmitBuffers" $(MAXIMUM_ALLOWED) TransmitBuffersHandle
  2641.             endif
  2642.             ifstr $(TransmitBuffersHandle) == $(KeyNull)
  2643.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2644.                 CloseRegKey $(UIHandle)
  2645.                 goto fatalregistry
  2646.             endif
  2647.  
  2648.             set NewValueList = $(TransmitBuffersParamList)
  2649.             Shell $(UtilityInf), AddValueList, $(TransmitBuffersHandle), $(NewValueList)
  2650.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2651.                 goto ShellCodeError
  2652.             endif
  2653.  
  2654.             CloseRegKey $(TransmitBuffersHandle)
  2655.  
  2656.             ; for 3065 ReceiveBuffers registry >>>>>>>>>>>>>>>>>>>>>>>
  2657.             CreateRegKey $(UIHandle) {"ReceiveBuffers",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" ReceiveBuffersHandle
  2658.             ifstr $(ReceiveBuffersHandle) == $(KeyNull)
  2659.                 OpenRegKey $(UIHandle) "" "ReceiveBuffers" $(MAXIMUM_ALLOWED) ReceiveBuffersHandle
  2660.             endif
  2661.             ifstr $(ReceiveBuffersHandle) == $(KeyNull)
  2662.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2663.                 CloseRegKey $(UIHandle)
  2664.                 goto fatalregistry
  2665.             endif
  2666.  
  2667.             set NewValueList = $(ReceiveBuffersParamList)
  2668.             Shell $(UtilityInf), AddValueList, $(ReceiveBuffersHandle), $(NewValueList)
  2669.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2670.                 goto ShellCodeError
  2671.             endif
  2672.  
  2673.             CloseRegKey $(ReceiveBuffersHandle)
  2674.  
  2675.             ; for 3065 FlowCtrl registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  2676.             CreateRegKey $(UIHandle) {"FlowCtrl",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" FlowCtrlHandle
  2677.             ifstr $(FlowCtrlHandle) == $(KeyNull)
  2678.                 OpenRegKey $(UIHandle) "" "FlowCtrl" $(MAXIMUM_ALLOWED) FlowCtrlHandle
  2679.             endif
  2680.             ifstr $(FlowCtrlHandle) == $(KeyNull)
  2681.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2682.                 CloseRegKey $(UIHandle)
  2683.                 goto fatalregistry
  2684.             endif
  2685.  
  2686.             set NewValueList = $(FlowCtrlParamList)
  2687.             Shell $(UtilityInf), AddValueList, $(FlowCtrlHandle), $(NewValueList)
  2688.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2689.                 goto ShellCodeError
  2690.             endif
  2691.  
  2692.             ; for 3065 FlowCtrl Enum registry
  2693.             CreateRegKey $(FlowCtrlHandle) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" EnumHandle
  2694.             ifstr $(EnumHandle) == $(KeyNull)
  2695.                 OpenRegKey $(FlowCtrlHandle) "" "enum" $(MAXIMUM_ALLOWED) EnumHandle
  2696.             endif
  2697.             ifstr $(EnumHandle) == $(KeyNull)
  2698.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2699.                 CloseRegKey $(FlowCtrlHandle)
  2700.                 goto fatalregistry
  2701.             endif
  2702.  
  2703.             set NewValueList = $(FlowCtrlEnumList)
  2704.             Shell $(UtilityInf), AddValueList, $(EnumHandle), $(NewValueList)
  2705.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2706.                 goto ShellCodeError
  2707.             endif
  2708.  
  2709.             CloseRegKey $(EnumHandle)
  2710.             CloseRegKey $(FlowCtrlHandle)
  2711.  
  2712.             ; for 3065 AdaptiveInt registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  2713.             CreateRegKey $(UIHandle) {"AdaptiveInt",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" AdaptiveIntHandle
  2714.             ifstr $(AdaptiveIntHandle) == $(KeyNull)
  2715.                 OpenRegKey $(UIHandle) "" "AdaptiveInt" $(MAXIMUM_ALLOWED) AdaptiveIntHandle
  2716.             endif
  2717.             ifstr $(AdaptiveIntHandle) == $(KeyNull)
  2718.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2719.                 CloseRegKey $(UIHandle)
  2720.                 goto fatalregistry
  2721.             endif
  2722.  
  2723.             set NewValueList = $(AdaptiveIntParamList)
  2724.             Shell $(UtilityInf), AddValueList, $(AdaptiveIntHandle), $(NewValueList)
  2725.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2726.                 goto ShellCodeError
  2727.             endif
  2728.  
  2729.             ; for 3065 AdaptiveInt Enum registry
  2730.             CreateRegKey $(AdaptiveIntHandle) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" EnumHandle
  2731.             ifstr $(EnumHandle) == $(KeyNull)
  2732.                 OpenRegKey $(AdaptiveIntHandle) "" "enum" $(MAXIMUM_ALLOWED) EnumHandle
  2733.             endif
  2734.             ifstr $(EnumHandle) == $(KeyNull)
  2735.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2736.                 CloseRegKey $(AdaptiveIntHandle)
  2737.                 goto fatalregistry
  2738.             endif
  2739.  
  2740.             set NewValueList = $(DisableEnableEnumList)
  2741.             Shell $(UtilityInf), AddValueList, $(EnumHandle), $(NewValueList)
  2742.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2743.                 goto ShellCodeError
  2744.             endif
  2745.  
  2746.             CloseRegKey $(EnumHandle)
  2747.             CloseRegKey $(AdaptiveIntHandle)
  2748.  
  2749.             CloseRegKey $(UIHandle)
  2750.         endif
  2751.  
  2752.         set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  2753.         set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  2754.         set NewValueList = { {type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardware$(Option)Type)},+
  2755.                              {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  2756.                              {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardware$(Option)Class)}, +
  2757.                              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)} }
  2758.         Shell $(UtilityInf), AddValueList, $(HardNetRuleKey), $(NewValueList)
  2759.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2760.             goto ShellCodeError
  2761.         endif
  2762.  
  2763.         CloseRegKey $(HardNetCardKey)
  2764.         CloseRegKey $(HardNetRuleKey)
  2765.  
  2766.         set NewValueList = { {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  2767.                              {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(DeviceNum)},+
  2768.                              {FunctionNumber,$(NoTitle),$(!REG_VT_DWORD),$(FunctionNum)} }
  2769.         Shell $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  2770.  
  2771.         CloseRegKey $(HardParameterKey)
  2772.  
  2773.     EndForListDo
  2774.  
  2775. ;----------------------------------------------------------------------------
  2776. InstallAdapter43 =+
  2777.  
  2778.     ForListDo $(AdapterList43)
  2779.         set BusNum = *($($),1)
  2780.         set DeviceNum = *($($),2)
  2781.         set FunctionNum = *($($),3)
  2782.  
  2783.         set Sub = "VT3043"
  2784.  
  2785.         Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNum), +
  2786.                                                         $(DeviceNum), +
  2787.                                                         $(ProductHardware$(Option)$(Sub)Title), +
  2788.                                                         $(ProductHardwareName), +
  2789.                                                         "YES"
  2790.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2791.             goto ShellCodeError
  2792.         endif
  2793.  
  2794.         ifstr $($R0) != "NO_ERROR"
  2795.             set Error = $($R0)
  2796.             goto fatal
  2797.         endif
  2798.  
  2799.         ifstr(i) $($R1) != "YES"
  2800.             Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  2801.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2802.                 goto ShellCodeError
  2803.             endif
  2804.  
  2805.             ifint $($R4) != -1
  2806.                 Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  2807.             endif
  2808.  
  2809.             set RegistryErrorIndex = $($R0)
  2810.             Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  2811.                 EndWait
  2812.                 CloseRegKey $($R1)
  2813.                 CloseRegKey $($R2)
  2814.                 CloseRegKey $($R3)
  2815.                 goto fatalregistry
  2816.             endif
  2817.  
  2818.             ; support unattended mode installation under windows NT 4.0 (AJ 03/22/1999)
  2819.             ifstr $(!STF_GUI_UNATTENDED) != "YES"
  2820.                 ui pop 1
  2821.             endif
  2822.  
  2823.             Set HardNetCardKey   = $($R1)
  2824.             Set HardNetRuleKey   = $($R2)
  2825.             Set HardParameterKey = $($R3)
  2826.             set AdapterNumber    = $($R4)
  2827.             set NewValueList = { {Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  2828.                                  {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)$(Sub)Title)},+
  2829.                                  {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  2830.                                  {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  2831.                                  {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  2832.                                  {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)} }
  2833.             Shell $(UtilityInf), AddValueList, $(HardNetCardKey), $(NewValueList)
  2834.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2835.                 goto ShellCodeError
  2836.             endif
  2837.  
  2838.             set BusTypeNum = 5
  2839.             set NewValueList = { {AdapterType,$(NoTitle),$(!REG_VT_DWORD),$(Adapter$(Option)Type)},+
  2840.                                  {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  2841.                                  {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  2842.                                  {AdapterCFID,$(NoTitle),$(!REG_VT_DWORD),$(VT3043CFID)} }
  2843.             Shell $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  2844.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2845.                 goto ShellCodeError
  2846.             endif
  2847.  
  2848.             ; for 3043 registery
  2849.             set NewValueList = $(VT3043DefaultParamList)
  2850.             Shell $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  2851.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2852.                 goto ShellCodeError
  2853.             endif
  2854.  
  2855.             ; for 3043 UI registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  2856.             CreateRegKey $(HardParameterKey) {"UI",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" UIHandle
  2857.             ifstr $(UIHandle) == $(KeyNull)
  2858.                 OpenRegKey $(HardParameterKey) "" "UI" $(MAXIMUM_ALLOWED) UIHandle
  2859.             endif
  2860.             ifstr $(UIHandle) == $(KeyNull)
  2861.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2862.                 CloseRegKey $(HardParameterKey)
  2863.                 goto fatalregistry
  2864.             endif
  2865.  
  2866.             ; for 3043 ConnectionType registry >>>>>>>>>>>>>>>>>>>>>>>
  2867.             CreateRegKey $(UIHandle) {"ConnectionType",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" ConnectionTypeHandle
  2868.             ifstr $(ConnectionTypeHandle) == $(KeyNull)
  2869.                 OpenRegKey $(UIHandle) "" "ConnectionType" $(MAXIMUM_ALLOWED) ConnectionTypeHandle
  2870.             endif
  2871.             ifstr $(ConnectionTypeHandle) == $(KeyNull)
  2872.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2873.                 CloseRegKey $(UIHandle)
  2874.                 goto fatalregistry
  2875.             endif
  2876.  
  2877.             set NewValueList = $(ConnectionTypeParamList)
  2878.             Shell $(UtilityInf), AddValueList, $(ConnectionTypeHandle), $(NewValueList)
  2879.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2880.                 goto ShellCodeError
  2881.             endif
  2882.  
  2883.             ; for 3043 ConnectionType Enum registry
  2884.             CreateRegKey $(ConnectionTypeHandle) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" EnumHandle
  2885.             ifstr $(EnumHandle) == $(KeyNull)
  2886.                 OpenRegKey $(ConnectionTypeHandle) "" "enum" $(MAXIMUM_ALLOWED) EnumHandle
  2887.             endif
  2888.             ifstr $(EnumHandle) == $(KeyNull)
  2889.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2890.                 CloseRegKey $(ConnectionTypeHandle)
  2891.                 goto fatalregistry
  2892.             endif
  2893.  
  2894.             set NewValueList = $(ConnectionTypeEnumList)
  2895.             Shell $(UtilityInf), AddValueList, $(EnumHandle), $(NewValueList)
  2896.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2897.                 goto ShellCodeError
  2898.             endif
  2899.  
  2900.             CloseRegKey $(EnumHandle)
  2901.             CloseRegKey $(ConnectionTypeHandle)
  2902.  
  2903.             ; for 3043 NetworkAddress registry >>>>>>>>>>>>>>>>>>>>>>>
  2904.             CreateRegKey $(UIHandle) {"NetworkAddress",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" NetworkAddressHandle
  2905.             ifstr $(NetworkAddressHandle) == $(KeyNull)
  2906.                 OpenRegKey $(UIHandle) "" "NetworkAddress" $(MAXIMUM_ALLOWED) NetworkAddressHandle
  2907.             endif
  2908.             ifstr $(NetworkAddressHandle) == $(KeyNull)
  2909.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2910.                 CloseRegKey $(UIHandle)
  2911.                 goto fatalregistry
  2912.             endif
  2913.  
  2914.             set NewValueList = $(NetworkAddressParamList)
  2915.             Shell $(UtilityInf), AddValueList, $(NetworkAddressHandle), $(NewValueList)
  2916.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2917.                 goto ShellCodeError
  2918.             endif
  2919.  
  2920.             CloseRegKey $(NetworkAddressHandle)
  2921.  
  2922.             ; for 3043 TransmitBuffers registry >>>>>>>>>>>>>>>>>>>>>>
  2923.             CreateRegKey $(UIHandle) {"TransmitBuffers",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" TransmitBuffersHandle
  2924.             ifstr $(TransmitBuffersHandle) == $(KeyNull)
  2925.                 OpenRegKey $(UIHandle) "" "TransmitBuffers" $(MAXIMUM_ALLOWED) TransmitBuffersHandle
  2926.             endif
  2927.             ifstr $(TransmitBuffersHandle) == $(KeyNull)
  2928.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2929.                 CloseRegKey $(UIHandle)
  2930.                 goto fatalregistry
  2931.             endif
  2932.  
  2933.             set NewValueList = $(VT3043TransmitBuffersParamList)
  2934.             Shell $(UtilityInf), AddValueList, $(TransmitBuffersHandle), $(NewValueList)
  2935.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2936.                 goto ShellCodeError
  2937.             endif
  2938.  
  2939.             CloseRegKey $(TransmitBuffersHandle)
  2940.  
  2941.             ; for 3043 ReceiveBuffers registry >>>>>>>>>>>>>>>>>>>>>>>
  2942.             CreateRegKey $(UIHandle) {"ReceiveBuffers",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" ReceiveBuffersHandle
  2943.             ifstr $(ReceiveBuffersHandle) == $(KeyNull)
  2944.                 OpenRegKey $(UIHandle) "" "ReceiveBuffers" $(MAXIMUM_ALLOWED) ReceiveBuffersHandle
  2945.             endif
  2946.             ifstr $(ReceiveBuffersHandle) == $(KeyNull)
  2947.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  2948.                 CloseRegKey $(UIHandle)
  2949.                 goto fatalregistry
  2950.             endif
  2951.  
  2952.             set NewValueList = $(ReceiveBuffersParamList)
  2953.             Shell $(UtilityInf), AddValueList, $(ReceiveBuffersHandle), $(NewValueList)
  2954.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2955.                 goto ShellCodeError
  2956.             endif
  2957.  
  2958.             CloseRegKey $(ReceiveBuffersHandle)
  2959.  
  2960.             CloseRegKey $(UIHandle)
  2961.         endif
  2962.  
  2963.         set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  2964.         set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  2965.         set NewValueList = { {type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardware$(Option)Type)},+
  2966.                              {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  2967.                              {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardware$(Option)Class)}, +
  2968.                              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)} }
  2969.         Shell $(UtilityInf), AddValueList, $(HardNetRuleKey), $(NewValueList)
  2970.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2971.             goto ShellCodeError
  2972.         endif
  2973.  
  2974.         CloseRegKey $(HardNetCardKey)
  2975.         CloseRegKey $(HardNetRuleKey)
  2976.  
  2977.         set NewValueList = { {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  2978.                              {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(DeviceNum)},+
  2979.                              {FunctionNumber,$(NoTitle),$(!REG_VT_DWORD),$(FunctionNum)} }
  2980.         Shell $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  2981.  
  2982.         CloseRegKey $(HardParameterKey)
  2983.  
  2984.     EndForListDo
  2985.  
  2986. ;----------------------------------------------------------------------------
  2987. InstallAdapterOK =+
  2988.     EndWait
  2989.     goto successful
  2990.  
  2991. ;----------------------------------------------------------------------------
  2992. updateparameters =+
  2993.  
  2994.     ForListDo $(PropKeyNameList)
  2995.         set KeyName = $($)
  2996.         set PropIndex = ~($(PropKeyNameList), $(KeyName))
  2997.  
  2998.         ifstr *($(SetResult), $(PropIndex)) != *($(CurrKeyValueList), $(PropIndex))
  2999.             set NewRegValue = *($(SetResult), $(PropIndex))
  3000.             set DispType = *($(DispTypeList), $(PropIndex))
  3001.             
  3002.             ifstr(i) $(DispType) == "edit"
  3003.                 set NewValueList = {{$(KeyName),$(NoTitle),$(!REG_VT_SZ),$(NewRegValue)}}
  3004.             Else
  3005.                 set NewValueList = {{$(KeyName),$(NoTitle),$(!REG_VT_DWORD),$(NewRegValue)}}
  3006.             Endif
  3007.  
  3008.             shell $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  3009.             Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3010.                 goto ShellCodeError
  3011.             Endif
  3012.         endif
  3013.     EndForListDo
  3014.  
  3015.     goto successful
  3016.  
  3017. ;----------------------------------------------------------------------------
  3018. bindingadapter =+
  3019.     set Error = "Binding: Sorry, not yet implemented."
  3020.     goto fatal
  3021.  
  3022. ;----------------------------------------------------------------------------
  3023. removeadapter = +
  3024.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  3025.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  3026.                                                       $(ProductSoftwareName)
  3027.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3028.             goto ShellCodeError
  3029.         endif
  3030.  
  3031.         set RegistryErrorIndex = $($R0)
  3032.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  3033.             goto fatalregistry
  3034.         endif
  3035.     Else
  3036.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  3037.                                                       $(ProductSoftwareName), +
  3038.                                                       $(!NTN_RegBase)
  3039.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3040.             goto ShellCodeError
  3041.         endif
  3042.  
  3043.         set RegistryErrorIndex = $($R0)
  3044.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  3045.             goto fatalregistry
  3046.         endif
  3047.     Endif
  3048.  
  3049.     goto end
  3050.  
  3051. ;----------------------------------------------------------------------------
  3052. UpgradeSoftware = +
  3053.  
  3054.     ; Upgrade each adapter
  3055.     set KeyNetcards = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards"
  3056.     OpenRegKey $(!REG_H_LOCAL) "" $(KeyNetcards) $(!REG_KEY_READ) H_Netcards
  3057.  
  3058.     EnumRegKey $(H_Netcards) AdapterNumList
  3059.  
  3060.     ForListDo $(AdapterNumList)
  3061.         set AdapterNum = *( $($), 1 )
  3062.         set H_Card = ""
  3063.  
  3064.         OpenRegKey $(H_Netcards) "" $(AdapterNum) $(MAXIMUM_ALLOWED) H_Card
  3065.         ifstr $(H_Card) == $(KeyNull)
  3066.             Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  3067.             Goto fatalregistry
  3068.         endif
  3069.  
  3070.         ; Get ServiceName to open the registry
  3071.         GetRegValue $(H_Card) "ServiceName" KeyServiceName
  3072.         set AdapterServiceName = *( $(KeyServiceName), 4 )
  3073.         set KeyCardService = $(!NTN_ServiceBase)"\"$(AdapterServiceName)"\parameters"
  3074.  
  3075.         OpenRegKey $(!REG_H_LOCAL) "" $(KeyCardService) $(MAXIMUM_ALLOWED) H_AdapterService
  3076.         ifstr $(H_AdapterService) == $(KeyNull)
  3077.             Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  3078.             Goto fatalregistry
  3079.         endif
  3080.  
  3081.         GetRegValue $(H_AdapterService) "AdapterCFID" ValueList
  3082.         set AdapterCFID = *( $(ValueList), 4 )
  3083.  
  3084.         ; for UI registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  3085.         CreateRegKey $(H_AdapterService) {"UI",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_UI
  3086.         ifstr $(H_UI) == $(KeyNull)
  3087.             OpenRegKey $(H_AdapterService) "" "UI" $(MAXIMUM_ALLOWED) H_UI
  3088.             ifstr $(H_UI) == $(KeyNull)
  3089.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  3090.                 CloseRegKey $(H_AdapterService)
  3091.                 goto fatalregistry
  3092.             endif
  3093.         endif
  3094.  
  3095.         ; for ConnectionType registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  3096.         CreateRegKey $(H_UI) {"ConnectionType",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_ConnectionType
  3097.         ifstr $(H_ConnectionType) == $(KeyNull)
  3098.             OpenRegKey $(H_UI) "" "ConnectionType" $(MAXIMUM_ALLOWED) H_ConnectionType
  3099.             ifstr $(H_ConnectionType) == $(KeyNull)
  3100.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  3101.                 CloseRegKey $(H_UI)
  3102.                 goto fatalregistry
  3103.             endif
  3104.         endif
  3105.  
  3106.         set NewValueList = $(ConnectionTypeParamList)
  3107.         Shell $(UtilityInf), AddValueList, $(H_ConnectionType), $(NewValueList)
  3108.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3109.             goto ShellCodeError
  3110.         endif
  3111.  
  3112.         ; for ConnectionType Enum registry
  3113.         CreateRegKey $(H_ConnectionType) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_Enum
  3114.         ifstr $(H_Enum) == $(KeyNull)
  3115.             OpenRegKey $(H_ConnectionType) "" "enum" $(MAXIMUM_ALLOWED) H_Enum
  3116.             ifstr $(H_Enum) == $(KeyNull)
  3117.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  3118.                 CloseRegKey $(H_ConnectionType)
  3119.                 goto fatalregistry
  3120.             endif
  3121.         endif
  3122.  
  3123.         set NewValueList = $(ConnectionTypeEnumList)
  3124.         Shell $(UtilityInf), AddValueList, $(H_Enum), $(NewValueList)
  3125.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3126.             goto ShellCodeError
  3127.         endif
  3128.  
  3129.         CloseRegKey $(H_Enum)
  3130.         CloseRegKey $(H_ConnectionType)
  3131.  
  3132.         ; for NetworkAddress registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  3133.         CreateRegKey $(H_UI) {"NetworkAddress",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_NetworkAddress
  3134.         ifstr $(H_NetworkAddress) == $(KeyNull)
  3135.             OpenRegKey $(H_UI) "" "NetworkAddress" $(MAXIMUM_ALLOWED) H_NetworkAddress
  3136.             ifstr $(H_NetworkAddress) == $(KeyNull)
  3137.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  3138.                 CloseRegKey $(H_UI)
  3139.                 goto fatalregistry
  3140.             endif
  3141.         endif
  3142.  
  3143.         set NewValueList = $(NetworkAddressParamList)
  3144.         Shell $(UtilityInf), AddValueList, $(H_NetworkAddress), $(NewValueList)
  3145.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3146.             goto ShellCodeError
  3147.         endif
  3148.  
  3149.         CloseRegKey $(H_NetworkAddress)
  3150.  
  3151.         ; for TransmitBuffers registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  3152.         CreateRegKey $(H_UI) {"TransmitBuffers",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_TransmitBuffers
  3153.         ifstr $(H_TransmitBuffers) == $(KeyNull)
  3154.             OpenRegKey $(H_UI) "" "TransmitBuffers" $(MAXIMUM_ALLOWED) H_TransmitBuffers
  3155.             ifstr $(H_TransmitBuffers) == $(KeyNull)
  3156.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  3157.                 CloseRegKey $(H_UI)
  3158.                 goto fatalregistry
  3159.             endif
  3160.         endif
  3161.  
  3162.         ; for ReceiveBuffers registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  3163.         CreateRegKey $(H_UI) {"ReceiveBuffers",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_ReceiveBuffers
  3164.         ifstr $(H_ReceiveBuffers) == $(KeyNull)
  3165.             OpenRegKey $(H_UI) "" "ReceiveBuffers" $(MAXIMUM_ALLOWED) H_ReceiveBuffers
  3166.             ifstr $(H_ReceiveBuffers) == $(KeyNull)
  3167.                 set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  3168.                 CloseRegKey $(H_UI)
  3169.                 goto fatalregistry
  3170.             endif
  3171.         endif
  3172.  
  3173.  
  3174.         Ifint $(AdapterCFID) == $(VT3106SCFID)
  3175.             ; Set 3106S TransmitBuffers value
  3176.             set NewValueList = $(TransmitBuffersParamList)
  3177.             Shell $(UtilityInf), AddValueList, $(H_TransmitBuffers), $(NewValueList)
  3178.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3179.                 goto ShellCodeError
  3180.             endif
  3181.  
  3182.             CloseRegKey $(H_TransmitBuffers)
  3183.  
  3184.             ; Set 3106S ReceiveBuffers value
  3185.             set NewValueList = $(ReceiveBuffersParamList)
  3186.             Shell $(UtilityInf), AddValueList, $(H_ReceiveBuffers), $(NewValueList)
  3187.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3188.                 goto ShellCodeError
  3189.             endif
  3190.  
  3191.             CloseRegKey $(H_ReceiveBuffers)
  3192.  
  3193.             ; for 3106S FlowCtrl registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  3194.             CreateRegKey $(H_UI) {"FlowCtrl",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_FlowCtrl
  3195.             ifstr $(H_FlowCtrl) == $(KeyNull)
  3196.                 OpenRegKey $(H_UI) "" "FlowCtrl" $(MAXIMUM_ALLOWED) H_FlowCtrl
  3197.                 ifstr $(H_FlowCtrl) == $(KeyNull)
  3198.                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  3199.                     CloseRegKey $(H_UI)
  3200.                     goto fatalregistry
  3201.                 endif
  3202.             endif
  3203.  
  3204.             set NewValueList = $(FlowCtrlParamList)
  3205.             Shell $(UtilityInf), AddValueList, $(H_FlowCtrl), $(NewValueList)
  3206.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3207.                 goto ShellCodeError
  3208.             endif
  3209.  
  3210.             ; for 3106S FlowCtrl Enum registry
  3211.             CreateRegKey $(H_FlowCtrl) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_Enum
  3212.             ifstr $(H_Enum) == $(KeyNull)
  3213.                 OpenRegKey $(H_FlowCtrl) "" "enum" $(MAXIMUM_ALLOWED) H_Enum
  3214.                 ifstr $(H_Enum) == $(KeyNull)
  3215.                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  3216.                     CloseRegKey $(H_FlowCtrl)
  3217.                     goto fatalregistry
  3218.                 endif
  3219.             endif
  3220.  
  3221.             set NewValueList = $(FlowCtrlEnumList)
  3222.             Shell $(UtilityInf), AddValueList, $(H_Enum), $(NewValueList)
  3223.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3224.                 goto ShellCodeError
  3225.             endif
  3226.  
  3227.             CloseRegKey $(H_Enum)
  3228.             CloseRegKey $(H_FlowCtrl)
  3229.  
  3230.             ; for 3106S AdaptiveInt registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  3231.             CreateRegKey $(H_UI) {"AdaptiveInt",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_AdaptiveInt
  3232.             ifstr $(H_AdaptiveInt) == $(KeyNull)
  3233.                 OpenRegKey $(H_UI) "" "AdaptiveInt" $(MAXIMUM_ALLOWED) H_AdaptiveInt
  3234.                 ifstr $(H_AdaptiveInt) == $(KeyNull)
  3235.                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  3236.                     CloseRegKey $(H_UI)
  3237.                     goto fatalregistry
  3238.                 endif
  3239.             endif
  3240.  
  3241.             set NewValueList = $(AdaptiveIntParamList)
  3242.             Shell $(UtilityInf), AddValueList, $(H_AdaptiveInt), $(NewValueList)
  3243.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3244.                 goto ShellCodeError
  3245.             endif
  3246.  
  3247.             ; for 3106S AdaptiveInt Enum registry
  3248.             CreateRegKey $(H_AdaptiveInt) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_Enum
  3249.             ifstr $(H_Enum) == $(KeyNull)
  3250.                 OpenRegKey $(H_AdaptiveInt) "" "enum" $(MAXIMUM_ALLOWED) H_Enum
  3251.                 ifstr $(H_Enum) == $(KeyNull)
  3252.                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  3253.                     CloseRegKey $(H_AdaptiveInt)
  3254.                     goto fatalregistry
  3255.                 endif
  3256.             endif
  3257.  
  3258.             set NewValueList = $(DisableEnableEnumList)
  3259.             Shell $(UtilityInf), AddValueList, $(H_Enum), $(NewValueList)
  3260.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3261.                 goto ShellCodeError
  3262.             endif
  3263.  
  3264.             CloseRegKey $(H_Enum)
  3265.             CloseRegKey $(H_AdaptiveInt)
  3266.  
  3267.             ; for 3106S 8021pqtag registry >>>>>>>>>>>>>>>>>>>>>>>>>>>
  3268.             CreateRegKey $(H_UI) {"8021pqtag",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_8021pqtag
  3269.             ifstr $(H_8021pqtag) == $(KeyNull)
  3270.                 OpenRegKey $(H_UI) "" "8021pqtag" $(MAXIMUM_ALLOWED) H_8021pqtag
  3271.                 ifstr $(H_8021pqtag) == $(KeyNull)
  3272.                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  3273.                     CloseRegKey $(H_UI)
  3274.                     goto fatalregistry
  3275.                 endif
  3276.             endif
  3277.  
  3278.             set NewValueList = $(8021pqtagParamList)
  3279.             Shell $(UtilityInf), AddValueList, $(H_8021pqtag), $(NewValueList)
  3280.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3281.                 goto ShellCodeError
  3282.             endif
  3283.  
  3284.             ; for 3106S 8021pqtag Enum registry
  3285.             CreateRegKey $(H_8021pqtag) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_Enum
  3286.             ifstr $(H_Enum) == $(KeyNull)
  3287.                 OpenRegKey $(H_8021pqtag) "" "enum" $(MAXIMUM_ALLOWED) H_Enum
  3288.                 ifstr $(H_Enum) == $(KeyNull)
  3289.                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  3290.                     CloseRegKey $(H_8021pqtag)
  3291.                     goto fatalregistry
  3292.                 endif
  3293.             endif
  3294.  
  3295.             set NewValueList = $(DisableEnableEnumList)
  3296.             Shell $(UtilityInf), AddValueList, $(H_Enum), $(NewValueList)
  3297.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3298.                 goto ShellCodeError
  3299.             endif
  3300.  
  3301.             CloseRegKey $(H_Enum)
  3302.             CloseRegKey $(H_8021pqtag)
  3303.  
  3304.             ; for 3106S VLANID registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  3305.             CreateRegKey $(H_UI) {"VLANID",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_VLANID
  3306.             ifstr $(H_VLANID) == $(KeyNull)
  3307.                 OpenRegKey $(H_UI) "" "VLANID" $(MAXIMUM_ALLOWED) H_VLANID
  3308.                 ifstr $(H_VLANID) == $(KeyNull)
  3309.                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  3310.                     CloseRegKey $(H_UI)
  3311.                     goto fatalregistry
  3312.                 endif
  3313.             endif
  3314.  
  3315.             set NewValueList = $(VLANIDParamList)
  3316.             Shell $(UtilityInf), AddValueList, $(H_VLANID), $(NewValueList)
  3317.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3318.                 goto ShellCodeError
  3319.             endif
  3320.  
  3321.             CloseRegKey $(H_VLANID)
  3322.             CloseRegKey $(H_UI)
  3323.  
  3324.             set NewValueList = $(VT3106SDefaultParamList)
  3325.             set Sub = "VT3106S"
  3326.  
  3327.         Else-Ifint $(AdapterCFID) == $(VT3106JCFID)
  3328.             ; Set 3106J TransmitBuffers value
  3329.             set NewValueList = $(TransmitBuffersParamList)
  3330.             Shell $(UtilityInf), AddValueList, $(H_TransmitBuffers), $(NewValueList)
  3331.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3332.                 goto ShellCodeError
  3333.             endif
  3334.  
  3335.             CloseRegKey $(H_TransmitBuffers)
  3336.  
  3337.             ; Set 3106J ReceiveBuffers value
  3338.             set NewValueList = $(ReceiveBuffersParamList)
  3339.             Shell $(UtilityInf), AddValueList, $(H_ReceiveBuffers), $(NewValueList)
  3340.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3341.                 goto ShellCodeError
  3342.             endif
  3343.  
  3344.             CloseRegKey $(H_ReceiveBuffers)
  3345.  
  3346.             ; for 3106J FlowCtrl registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  3347.             CreateRegKey $(H_UI) {"FlowCtrl",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_FlowCtrl
  3348.             ifstr $(H_FlowCtrl) == $(KeyNull)
  3349.                 OpenRegKey $(H_UI) "" "FlowCtrl" $(MAXIMUM_ALLOWED) H_FlowCtrl
  3350.                 ifstr $(H_FlowCtrl) == $(KeyNull)
  3351.                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  3352.                     CloseRegKey $(H_UI)
  3353.                     goto fatalregistry
  3354.                 endif
  3355.             endif
  3356.  
  3357.             set NewValueList = $(FlowCtrlParamList)
  3358.             Shell $(UtilityInf), AddValueList, $(H_FlowCtrl), $(NewValueList)
  3359.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3360.                 goto ShellCodeError
  3361.             endif
  3362.  
  3363.             ; for 3106J FlowCtrl Enum registry
  3364.             CreateRegKey $(H_FlowCtrl) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_Enum
  3365.             ifstr $(H_Enum) == $(KeyNull)
  3366.                 OpenRegKey $(H_FlowCtrl) "" "enum" $(MAXIMUM_ALLOWED) H_Enum
  3367.                 ifstr $(H_Enum) == $(KeyNull)
  3368.                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  3369.                     CloseRegKey $(H_FlowCtrl)
  3370.                     goto fatalregistry
  3371.                 endif
  3372.             endif
  3373.  
  3374.             set NewValueList = $(FlowCtrlEnumList)
  3375.             Shell $(UtilityInf), AddValueList, $(H_Enum), $(NewValueList)
  3376.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3377.                 goto ShellCodeError
  3378.             endif
  3379.  
  3380.             CloseRegKey $(H_Enum)
  3381.             CloseRegKey $(H_FlowCtrl)
  3382.  
  3383.             ; for 3106J AdaptiveInt registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  3384.             CreateRegKey $(H_UI) {"AdaptiveInt",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_AdaptiveInt
  3385.             ifstr $(H_AdaptiveInt) == $(KeyNull)
  3386.                 OpenRegKey $(H_UI) "" "AdaptiveInt" $(MAXIMUM_ALLOWED) H_AdaptiveInt
  3387.                 ifstr $(H_AdaptiveInt) == $(KeyNull)
  3388.                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  3389.                     CloseRegKey $(H_UI)
  3390.                     goto fatalregistry
  3391.                 endif
  3392.             endif
  3393.  
  3394.             set NewValueList = $(AdaptiveIntParamList)
  3395.             Shell $(UtilityInf), AddValueList, $(H_AdaptiveInt), $(NewValueList)
  3396.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3397.                 goto ShellCodeError
  3398.             endif
  3399.  
  3400.             ; for 3106J AdaptiveInt Enum registry
  3401.             CreateRegKey $(H_AdaptiveInt) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_Enum
  3402.             ifstr $(H_Enum) == $(KeyNull)
  3403.                 OpenRegKey $(H_AdaptiveInt) "" "enum" $(MAXIMUM_ALLOWED) H_Enum
  3404.                 ifstr $(H_Enum) == $(KeyNull)
  3405.                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  3406.                     CloseRegKey $(H_AdaptiveInt)
  3407.                     goto fatalregistry
  3408.                 endif
  3409.             endif
  3410.  
  3411.             set NewValueList = $(DisableEnableEnumList)
  3412.             Shell $(UtilityInf), AddValueList, $(H_Enum), $(NewValueList)
  3413.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3414.                 goto ShellCodeError
  3415.             endif
  3416.  
  3417.             CloseRegKey $(H_Enum)
  3418.             CloseRegKey $(H_AdaptiveInt)
  3419.  
  3420.             CloseRegKey $(H_UI)
  3421.  
  3422.             set NewValueList = $(VT3106JDefaultParamList)
  3423.             set Sub = "VT3106J"
  3424.  
  3425.         Else-Ifint $(AdapterCFID) == $(VT3065CFID)
  3426.             ; Set 3065 TransmitBuffers value
  3427.             set NewValueList = $(TransmitBuffersParamList)
  3428.             Shell $(UtilityInf), AddValueList, $(H_TransmitBuffers), $(NewValueList)
  3429.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3430.                 goto ShellCodeError
  3431.             endif
  3432.  
  3433.             CloseRegKey $(H_TransmitBuffers)
  3434.  
  3435.             ; Set 3065 ReceiveBuffers value
  3436.             set NewValueList = $(ReceiveBuffersParamList)
  3437.             Shell $(UtilityInf), AddValueList, $(H_ReceiveBuffers), $(NewValueList)
  3438.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3439.                 goto ShellCodeError
  3440.             endif
  3441.  
  3442.             CloseRegKey $(H_ReceiveBuffers)
  3443.  
  3444.             ; for 3065 FlowCtrl registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  3445.             CreateRegKey $(H_UI) {"FlowCtrl",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_FlowCtrl
  3446.             ifstr $(H_FlowCtrl) == $(KeyNull)
  3447.                 OpenRegKey $(H_UI) "" "FlowCtrl" $(MAXIMUM_ALLOWED) H_FlowCtrl
  3448.                 ifstr $(H_FlowCtrl) == $(KeyNull)
  3449.                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  3450.                     CloseRegKey $(H_UI)
  3451.                     goto fatalregistry
  3452.                 endif
  3453.             endif
  3454.  
  3455.             set NewValueList = $(FlowCtrlParamList)
  3456.             Shell $(UtilityInf), AddValueList, $(H_FlowCtrl), $(NewValueList)
  3457.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3458.                 goto ShellCodeError
  3459.             endif
  3460.  
  3461.             ; for 3065 FlowCtrl Enum registry
  3462.             CreateRegKey $(H_FlowCtrl) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_Enum
  3463.             ifstr $(H_Enum) == $(KeyNull)
  3464.                 OpenRegKey $(H_FlowCtrl) "" "enum" $(MAXIMUM_ALLOWED) H_Enum
  3465.                 ifstr $(H_Enum) == $(KeyNull)
  3466.                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  3467.                     CloseRegKey $(H_FlowCtrl)
  3468.                     goto fatalregistry
  3469.                 endif
  3470.             endif
  3471.  
  3472.             set NewValueList = $(FlowCtrlEnumList)
  3473.             Shell $(UtilityInf), AddValueList, $(H_Enum), $(NewValueList)
  3474.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3475.                 goto ShellCodeError
  3476.             endif
  3477.  
  3478.             CloseRegKey $(H_Enum)
  3479.             CloseRegKey $(H_FlowCtrl)
  3480.  
  3481.             ; for 3065 AdaptiveInt registry >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  3482.             CreateRegKey $(H_UI) {"AdaptiveInt",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_AdaptiveInt
  3483.             ifstr $(H_AdaptiveInt) == $(KeyNull)
  3484.                 OpenRegKey $(H_UI) "" "AdaptiveInt" $(MAXIMUM_ALLOWED) H_AdaptiveInt
  3485.                 ifstr $(H_AdaptiveInt) == $(KeyNull)
  3486.                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  3487.                     CloseRegKey $(H_UI)
  3488.                     goto fatalregistry
  3489.                 endif
  3490.             endif
  3491.  
  3492.             set NewValueList = $(AdaptiveIntParamList)
  3493.             Shell $(UtilityInf), AddValueList, $(H_AdaptiveInt), $(NewValueList)
  3494.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3495.                 goto ShellCodeError
  3496.             endif
  3497.  
  3498.             ; for 3065 AdaptiveInt Enum registry
  3499.             CreateRegKey $(H_AdaptiveInt) {"enum",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" H_Enum
  3500.             ifstr $(H_Enum) == $(KeyNull)
  3501.                 OpenRegKey $(H_AdaptiveInt) "" "enum" $(MAXIMUM_ALLOWED) H_Enum
  3502.                 ifstr $(H_Enum) == $(KeyNull)
  3503.                     set RegistryErrorIndex = UNABLE_CREATE_SERVICE_SUBKEY
  3504.                     CloseRegKey $(H_AdaptiveInt)
  3505.                     goto fatalregistry
  3506.                 endif
  3507.             endif
  3508.  
  3509.             set NewValueList = $(DisableEnableEnumList)
  3510.             Shell $(UtilityInf), AddValueList, $(H_Enum), $(NewValueList)
  3511.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3512.                 goto ShellCodeError
  3513.             endif
  3514.  
  3515.             CloseRegKey $(H_Enum)
  3516.             CloseRegKey $(H_AdaptiveInt)
  3517.  
  3518.             CloseRegKey $(H_UI)
  3519.  
  3520.             set NewValueList = $(VT3065DefaultParamList)
  3521.             set Sub = "VT3065"
  3522.  
  3523.         Else
  3524.             ; Set 3043 TransmitBuffers value
  3525.             set NewValueList = $(VT3043TransmitBuffersParamList)
  3526.             Shell $(UtilityInf), AddValueList, $(H_TransmitBuffers), $(NewValueList)
  3527.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3528.                 goto ShellCodeError
  3529.             endif
  3530.  
  3531.             CloseRegKey $(H_TransmitBuffers)
  3532.  
  3533.             ; Set 3043 ReceiveBuffers value
  3534.             set NewValueList = $(ReceiveBuffersParamList)
  3535.             Shell $(UtilityInf), AddValueList, $(H_ReceiveBuffers), $(NewValueList)
  3536.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3537.                 goto ShellCodeError
  3538.             endif
  3539.  
  3540.             CloseRegKey $(H_ReceiveBuffers)
  3541.             CloseRegKey $(H_UI)
  3542.  
  3543.             set NewValueList = $(VT3043DefaultParamList)
  3544.             set Sub = "VT3043"
  3545.         Endif
  3546.  
  3547.         shell $(UtilityInf), AddValueList, $(H_AdapterService), $(NewValueList)
  3548.         Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3549.             goto ShellCodeError
  3550.         Endif
  3551.  
  3552.         ; Update Description, Title, Manufacturer
  3553.         SetRegValue $(H_Card) {Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)}
  3554.         SetRegValue $(H_Card) {Title,$(NoTitle),$(!REG_VT_SZ),"["$(AdapterNum)"] "$(ProductHardware$(Option)$(Sub)Title)}
  3555.         SetRegValue $(H_Card) {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)}
  3556.  
  3557.         CloseRegKey $(H_Card)
  3558.  
  3559.         CloseRegKey $(H_AdapterService)
  3560.  
  3561.     EndForListDo
  3562.  
  3563.     CloseRegKey $(H_Netcards)
  3564.  
  3565.  
  3566.  
  3567. ;    ; initialize driver parameter list
  3568. ;    Ifstr(i) $(KeyProduct) == $(KeyNull)
  3569. ;        OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  3570. ;        Ifstr $(KeyProduct) == $(KeyNull)
  3571. ;            Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  3572. ;            Goto fatalregistry
  3573. ;        Endif
  3574. ;    Endif
  3575.  
  3576. ;    ; Get service key handle
  3577. ;    Shell $(UtilityInf) FindService, $(KeyProduct)
  3578. ;    Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3579. ;        Goto ShellCodeError
  3580. ;    Endif
  3581.  
  3582. ;    Ifstr(i) $($R0) != NO_ERROR
  3583. ;        Goto fatalregistry
  3584. ;    endif
  3585.  
  3586. ;    set KeyParameters = $($R2)
  3587. ;    CloseRegKey $($R1)
  3588. ;    Ifstr $(KeyParameters) == $(KeyNull)
  3589. ;        set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  3590. ;        goto fatalregistry
  3591. ;    endif
  3592.  
  3593.  
  3594. ;    set OldVersionExisted = $(TRUE)
  3595. ;    set ValueName = ""
  3596. ;    set ValueData = ""
  3597. ;    set ValueList = {}
  3598.  
  3599. ;    EnumRegValue $(KeyParameters) ValueList
  3600. ;    ForListDo $(ValueList)
  3601. ;        set ValueItem = $($)
  3602. ;        set ValueName = *($(ValueItem),1)
  3603. ;        set ValueData = *($(ValueItem),4)
  3604.  
  3605. ;        ifstr(i) $(ValueName) == "AdapterCFID"
  3606. ;            set AdapterCFID = $(ValueData)
  3607. ;        endif
  3608. ;    EndForListDo
  3609.  
  3610. ;    Ifint $(AdapterCFID) == $(VT3106SCFID)
  3611. ;        set NewValueList = $(VT3106SDefaultParamList)
  3612. ;        set Sub = "VT3106S"
  3613. ;    Else-Ifint $(AdapterCFID) == $(VT3106JCFID)
  3614. ;        set NewValueList = $(VT3106JDefaultParamList)
  3615. ;        set Sub = "VT3106J"
  3616. ;    Else-Ifint $(AdapterCFID) == $(VT3065CFID)
  3617. ;        set NewValueList = $(VT3065DefaultParamList)
  3618. ;        set Sub = "VT3065"
  3619. ;    Else
  3620. ;        set NewValueList = $(VT3043DefaultParamList)
  3621. ;        set Sub = "VT3043"
  3622. ;    Endif
  3623.  
  3624. ;    shell $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  3625. ;    Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3626. ;        goto ShellCodeError
  3627. ;    Endif
  3628.  
  3629.  
  3630.  
  3631. ;    ; Update Description, Software Title, Manufacturer Name
  3632. ;    Split-String $(!NTN_RegBase) "\" DestinationList
  3633. ;    set AdapterNum = *($(DestinationList), 11)
  3634.  
  3635. ;    OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyNetworkCards
  3636. ;    Ifstr $(KeyNetworkCards) == $(KeyNull)
  3637. ;        Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  3638. ;        Goto fatalregistry
  3639. ;    Endif
  3640.  
  3641. ;    SetRegValue $(KeyNetworkCards) {Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)}
  3642. ;    SetRegValue $(KeyNetworkCards) {Title,$(NoTitle),$(!REG_VT_SZ),"["$(AdapterNum)"] "$(ProductHardware$(Option)$(Sub)Title)}
  3643. ;    SetRegValue $(KeyNetworkCards) {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)}
  3644. ;    CloseRegKey $(KeyNetworkCards)
  3645.  
  3646.  
  3647.  
  3648.     ; Copy new software
  3649.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  3650.     Ifstr $(KeyProduct) != $(KeyNull)
  3651.         Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  3652.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3653.             Debug-Output "ShellCode error"
  3654.             goto ShellCodeError
  3655.         endif
  3656.  
  3657.         set !UG_Filename = $($R0)
  3658.         install "Install-Update"
  3659.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  3660.             goto fatal
  3661.         endif
  3662.  
  3663.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)}
  3664.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)}
  3665.  
  3666.         CloseRegKey $(KeyProduct)
  3667.     Else
  3668.         goto fatalregistry
  3669.     Endif
  3670.  
  3671.     goto end
  3672.  
  3673. ;----------------------------------------------------------------------------
  3674. successful = +
  3675.     goto end
  3676.  
  3677. ;----------------------------------------------------------------------------
  3678. abandon = +
  3679.     ForListDo $(OEM_ABANDON_OPTIONS)
  3680.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  3681.                                                         $(ProductSoftwareName), $($)
  3682.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3683.             goto ShellCodeError
  3684.         endif
  3685.         set RegistryErrorIndex = $($R0)
  3686.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  3687.             goto fatalregistry
  3688.         endif
  3689.     EndForListDo
  3690.  
  3691.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  3692.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  3693.                                                         $(ProductSoftwareName), FALSE
  3694.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3695.             goto ShellCodeError
  3696.         endif
  3697.         set RegistryErrorIndex = $($R0)
  3698.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  3699.             goto fatalregistry
  3700.         endif
  3701.     endif
  3702.     goto end
  3703.  
  3704. ;----------------------------------------------------------------------------
  3705. warning = +
  3706.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  3707.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3708.     goto ShellCodeError
  3709.     endif
  3710.     ifstr(i) $($R1) == "OK"
  3711.     goto $(to)
  3712.     else-ifstr(i) $($R1) == "CANCEL"
  3713.     goto $(from)
  3714.     else
  3715.     goto "end"
  3716.     endif
  3717.  
  3718. ;----------------------------------------------------------------------------
  3719. nonfatalinfo = +
  3720.     Set CommonStatus = STATUS_USERCANCEL
  3721.     Set Severity = STATUS
  3722.     goto nonfatalmsg
  3723.  
  3724. ;----------------------------------------------------------------------------
  3725. nonfatal = +
  3726.     Set Severity = NONFATAL
  3727.     goto nonfatalmsg
  3728.  
  3729. ;----------------------------------------------------------------------------
  3730. nonfatalmsg = +
  3731.     ifstr(i) $(Error) == ""
  3732.         set Severity = NONFATAL
  3733.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  3734.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3735.             goto ShellCodeError
  3736.         endif
  3737.         set Error = $($R0)
  3738.     endif
  3739.  
  3740.     ; if in unattended mode, do not show error message
  3741.     ifstr $(!STF_GUI_UNATTENDED) != "YES"
  3742.         Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  3743.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3744.             goto ShellCodeError
  3745.         endif
  3746.         ifstr(i) $($R1) == "OK"
  3747.             goto $(from)
  3748.         else
  3749.             goto "end"
  3750.         endif
  3751.     else
  3752.         goto "end"
  3753.     endif
  3754.  
  3755. ;----------------------------------------------------------------------------
  3756. fatalregistry = +
  3757.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  3758.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3759.         goto ShellCodeError
  3760.     endif
  3761.     set Error = $($R0)
  3762.     goto fatal
  3763.  
  3764. ;----------------------------------------------------------------------------
  3765. fatal = +
  3766.     ifstr(i) $(Error) == ""
  3767.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  3768.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3769.         goto ShellCodeError
  3770.     endif
  3771.     set Error = $($R0)
  3772.     endif
  3773.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  3774.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3775.     goto ShellCodeError
  3776.     endif
  3777.     goto setfailed
  3778.  
  3779. ;----------------------------------------------------------------------------
  3780. ShellCodeError = +
  3781.     set DlgType      = "MessageBox"
  3782.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  3783.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  3784.     set STF_MB_TYPE  = 1
  3785.     set STF_MB_ICON  = 3
  3786.     set STF_MB_DEF   = 1
  3787.     ui start "Error Message"
  3788.     goto setfailed
  3789.  
  3790. ;----------------------------------------------------------------------------
  3791. setfailed = +
  3792.     set CommonStatus = STATUS_FAILED
  3793.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  3794.         set OEM_ABANDON_ON = FALSE
  3795.         goto abandon
  3796.     endif
  3797.     goto end
  3798.  
  3799. ;----------------------------------------------------------------------------
  3800. end = +
  3801.     Return $(CommonStatus)
  3802.  
  3803. ;----------------------------------------------------------------------------
  3804. [Install-Option]
  3805.     set STF_VITAL = ""
  3806.     ifstr(i) $(AddCopy) == "YES"
  3807.         AddSectionFilesToCopyList Files-PropUI $(SrcDir) $(!STF_WINDOWSSYSPATH)
  3808.         AddSectionFilesToCopyList Files-$(Option)-$(TargetOS) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  3809.         AddSectionFilesToCopyList Files-Help $(SrcDir) $(!STF_WINDOWSSYSPATH)
  3810.     endif
  3811.     ifstr(i) $(DoCopy) == "YES"
  3812.         set !STF_NCPA_FLUSH_COPYLIST = TRUE
  3813.         CopyFilesInCopyList
  3814.     endif
  3815.     Exit
  3816.  
  3817. ;----------------------------------------------------------------------------
  3818. [Install-Hlp]
  3819.     set STF_VITAL = ""
  3820.     ifstr(i) $(AddCopy) == "YES"
  3821.         AddSectionFilesToCopyList Files-Help $(SrcDir) $(!STF_WINDOWSSYSPATH)
  3822.     endif
  3823.     ifstr(i) $(DoCopy) == "YES"
  3824.         set !STF_NCPA_FLUSH_COPYLIST = TRUE
  3825.         CopyFilesInCopyList
  3826.     endif
  3827.     Exit
  3828.  
  3829. ;-------------------------------------------------------------------------------
  3830. [Install-Update]
  3831.     set STF_VITAL     = ""
  3832.     set STF_OVERWRITE = "VERIFYSOURCEOLDER"
  3833.  
  3834.     ; HELP....
  3835.     AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  3836.     AddSectionFilesToCopyList Files-$(Option)-$(TargetOS) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  3837.     AddSectionFilesToCopyList Files-PropUI $(SrcDir) $(!STF_WINDOWSSYSPATH)
  3838.     AddSectionFilesToCopyList Files-Help $(SrcDir) $(!STF_WINDOWSSYSPATH)
  3839.  
  3840.     set !STF_NCPA_FLUSH_COPYLIST = TRUE
  3841.     CopyFilesInCopyList
  3842.     exit
  3843.  
  3844. ;-------------------------------------------------------------------------------
  3845. [Install-UTIL]
  3846.     set STF_VITAL        = ""
  3847.     set STF_OVERWRITE    = "ALWAYS"
  3848.  
  3849.     AddSectionFilesToCopyList Files-PropUI $(SrcDir) $(!STF_WINDOWSSYSPATH)
  3850.     CopyFilesInCopyList
  3851.     ClearCopyList
  3852.     exit
  3853.  
  3854. ;-------------------------------------------------------------------------------
  3855. [Source Media Descriptions]
  3856.     1  = "VIA Rhine Family Fast Ethernet Adapter Driver"
  3857.  
  3858. ;-------------------------------------------------------------------------------
  3859. [ProductType]
  3860. STF_PRODUCT  = Winnt
  3861. STF_PLATFORM = I386
  3862. STF_PLATFORM = Alpha
  3863.  
  3864. ;============================================================================
  3865. [Files-Inf]
  3866. 1, oemsetup.inf, SIZE=1000, RENAME=$(!UG_Filename)
  3867.  
  3868. [Files-FET-NT4]
  3869. 1, fetnd4.sys  , SIZE=999
  3870.  
  3871. [Files-FET-NT351]
  3872. 1, fetnd3.sys  , SIZE=999
  3873.  
  3874. [Files-PropUI]
  3875. 1, ntutil.dll  , SIZE=999
  3876.  
  3877. [Files-Help]
  3878. 1, fetndh.hlp  , SIZE=999
  3879.  
  3880. ;============================================================================
  3881. [LanguagesSupported]
  3882.     ENG
  3883.  
  3884. [OptionsTextENG]
  3885.     FET  = "VIA Rhine Family Fast Ethernet Adapter Driver"
  3886.  
  3887. [FileConstantsENG]
  3888. ProCaption   = "Windows NT Setup"
  3889. ProCancel    = "Cancel"
  3890. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  3891.                "Are you sure you want to cancel copying files?"
  3892. ProCancelCap = "Network Setup Message"
  3893. ProText1     = "Copying:"
  3894. ProText2     = "To:"
  3895.  
  3896. ProductSoftwareDescription = "VIA Rhine Family Fast Ethernet Adapter Driver"
  3897. FunctionFETTitle = "VIA Rhine Family Fast Ethernet Adapter Setup"
  3898.  
  3899. ShellCodeErrorTitle     = "Error: "$(Function$(Option)Title)
  3900. ShellCodeErrorText      = "Shell Code Error."
  3901. CANNOT_FIND_ANY_CARD    = "Network card is not present in the system"
  3902.  
  3903. [DialogConstantsENG]
  3904. Help        = "&Help"
  3905. Exit        = "Cancel"
  3906. OK          = "OK"
  3907. HelpContext = ""
  3908. Continue    = "Continue"
  3909. Cancel      = "Cancel"
  3910.