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

  1. [Identification]
  2.     OptionType = NetAdapter
  3. [PlatformsSupported]
  4.     ISA
  5.     EISA
  6.     "Jazz-Internal Bus"
  7. [Options]
  8.     SMCISA
  9. [FileConstants]
  10. ParamInf        = "NCPARAM.INF"
  11. UtilityInf      = "UTILITY.INF"
  12. subroutineinf   = "SUBROUTN.INF"
  13. SoftwareType    = "driver"
  14. Exit_Code       = 0
  15. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  16. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  17. EthernetCards  = { SMCISA }
  18. TokenRingCards = { WD8115TR }
  19. Manufacturer    = "Microsoft"
  20. ProductMajorVersion     = "3"
  21. ProductMinorVersion     = "1"
  22. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  23. ProductSoftwareName     = "SMC8000N"
  24. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\smc8000n.sys"
  25. NetRuleSoftwareType     = "smc8000nSys ndisDriver smc8000nDriver"
  26. NetRuleSoftwareUse      = $(SoftwareType)
  27. NetRuleSoftwareBindForm = """Smc8000nDriver"" yes no container"
  28. NetRuleSoftwareClass    = {"smc8000nDriver basic"}
  29. ProductHardwareName     = $(Option)
  30. NetRuleHardwareType     = "smcisa smcisaAdapter"
  31. NetRuleHardwareBindForm = " yes yes container"
  32. NetRuleHardwareClass    = {"smcisaAdapter basic"}
  33. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  34. ParamKeyName    = $(!NTN_ServiceBase)$(ProductHardwareName)"\Parameters"
  35. [GeneralConstants]
  36. from      = ""
  37. to        = ""
  38. ExitCodeOk     = 0
  39. ExitCodeCancel = 1
  40. ExitCodeFatal  = 2
  41. KeyNull         = ""
  42. MAXIMUM_ALLOWED   = 33554432
  43. RegistryErrorIndex = NO_ERROR
  44. KeyProduct      = ""
  45. KeyParameters   = ""
  46. TRUE            = 1
  47. FALSE           = 0
  48. NoTitle            = 0
  49. ExitState   = "Active"
  50. OldVersionExisted = $(FALSE)
  51. DriverPath      = $(!STF_NTPATH)\drivers
  52. [date]
  53.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  54. [Identify]
  55.     read-syms Identification
  56.     set Status     = STATUS_SUCCESSFUL
  57.     set Identifier = $(OptionType)
  58.     set Media      = #("Source Media Descriptions", 1, 1)
  59.     Return $(Status) $(Identifier) $(Media)
  60. [ReturnOptions]
  61.     set Status        = STATUS_FAILED
  62.     set OptionList     = {}
  63.     set OptionTextList = {}
  64.     set LanguageList = ^(LanguagesSupported, 1)
  65.     Ifcontains(i) $($0) in $(LanguageList)
  66.         ifstr(i) $($1) == ""
  67.            goto returnoptions
  68.         endif
  69.         set PlatformList = ^(PlatformsSupported, 1)
  70.         Ifcontains(i) $($1) in $(PlatformList)
  71.            goto returnoptions
  72.         else
  73.            set Status = STATUS_NOTSUPPORTED
  74.            goto finish_ReturnOptions
  75.         endif
  76.     else
  77.         set Status = STATUS_NOLANGUAGE
  78.         goto finish_ReturnOptions
  79.     endif
  80. returnoptions = +
  81.     set OptionList     = ^(Options, 1)
  82.     set OptionTextList = ^(OptionsText$($0), 1)
  83.     set Status         = STATUS_SUCCESSFUL
  84. finish_ReturnOptions = +
  85.     Return $(Status) $(OptionList) $(OptionTextList)
  86. [InstallOption]
  87.     set Option   = $($1)
  88.     set SrcDir   = $($2)
  89.     set AddCopy  = $($3)
  90.     set DoCopy   = $($4)
  91.     set DoConfig = $($5)
  92.     set LanguageList = ^(LanguagesSupported, 1)
  93.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  94.         Return STATUS_NOLANGUAGE
  95.     endif
  96.     Debug-Output "OEMNADWD.INF: STF_CWDIR is: "$(!STF_CWDIR)
  97.     Debug-Output "OEMNADWD.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  98.     set-subst LF = "\n"
  99.     read-syms GeneralConstants
  100.     read-syms FileConstants
  101.     Shell $(UtilityInf), GetBindingInfo, "WD"
  102.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  103.         Debug-Output "ShellCode error: cannot get an error string."
  104.         goto ShellCodeError
  105.     endif
  106.     set NetRuleSoftwareBindable = $($R1)
  107.     read-syms DialogConstants$(!STF_LANGUAGE)
  108.     ifstr(i) $(!NTN_Origination) == "NCPA"
  109.         set Continue = $(OK)
  110.     endif
  111.     read-syms FileConstants$(!STF_LANGUAGE)
  112.     detect date
  113.     set-title  $(FunctionTitle)
  114.     set to   = Begin
  115.     set from = Begin
  116.     set CommonStatus = STATUS_SUCCESSFUL
  117.     EndWait
  118. Begin = +
  119.     set ActivateDetection = FALSE
  120.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  121.         set StartLabel = removeadapter
  122.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  123.         set StartLabel = UpgradeSoftware
  124.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  125.         set StartLabel = bindingadapter
  126.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  127.         set CommonStatus = STATUS_REBOOT
  128.         set ActivateDetection = TRUE
  129.         set StartLabel = configureadapter
  130.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  131.             Debug-Output "Cannot configure the DEC 100 driver software."
  132.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  133.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  134.                 Debug-Output "ShellCode error: cannot get an error string."
  135.                 goto ShellCodeError
  136.             endif
  137.             set Error = $($R0)
  138.             set from = end
  139.             set to = end
  140.             goto nonfatalinfo
  141.         endif
  142.     else
  143.         set StartLabel = installadapter
  144.         set OEM_ABANDON_OPTIONS = {}
  145.         set OEM_ABANDON_SOFTWARE = FALSE
  146.         set OEM_ABANDON_ON = TRUE
  147.         set ActivateDetection = TRUE
  148.     endif
  149.     Debug-Output "OEMNADWD.INF: =================================================="
  150.     Debug-Output "OEMNADWD.INF: STF_CWDIR is: "$(!STF_CWDIR)
  151.     Debug-Output "OEMNADWD.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  152.     Debug-Output "OEMNADWD.INF: Option is: "$(Option)
  153.     Debug-Output "OEMNADWD.INF: !STF_NCDETECT  is: "$(!STF_NCDETECT)
  154.     Debug-Output "OEMNADWD.INF: !STF_NCOPTION  is: "$(!STF_NCOPTION)
  155.     Debug-Output "OEMNADWD.INF: !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  156.     Debug-Output "OEMNADWD.INF: !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  157.     Debug-Output "OEMNADWD.INF: =================================================="
  158.     Set DetectedCard = FALSE
  159.     Ifstr(i) $(ActivateDetection) != TRUE
  160.         Goto skipdetection
  161.     Endif
  162.     Set TypeList = {{IRQ,IRQ_List,IRQLevel},+
  163.                     {IOADDR, IOBaseAddressDecList, IOBaseValue},+
  164.                     {MEMADDR, WinBaseAddressDecList, WinBaseValue}}
  165.     Debug-Output "OEMNADWD.INF: Calling Param_BuildTypeLists"
  166.     Shell $(ParamInf) Param_BuildTypeLists $(Option) $(TypeList)
  167.     Set Status = $($R0)
  168.     ifstr(i) $(Status) != STATUS_SUCCESSFUL
  169.         Goto fataldetect
  170.     Endif
  171.     Debug-Output "OEMNADWD.INF: Calling Param_SetDefaults"
  172.     Shell $(ParamInf) Param_SetDefaults {}
  173.     Shell $(ParamInf) HexListFromDecList $(IOBaseAddressDecList)
  174.     Set IOBaseAddressHexList = $($R0)
  175.     Shell $(ParamInf) HexListFromDecList $(WinBaseAddressDecList)
  176.     Set WinBaseAddressHexList = $($R0)
  177.     Ifstr(i) $(!STF_NCDETECT) == YES
  178.         Ifstr(i) $(!STF_NCOPTION) == $(Option)
  179.            Set DetectedCard = TRUE
  180.            Debug-Output "OEMNADWD.INF: Setting DetectedCard to TRUE"
  181.         Endif
  182.     Endif
  183. skipdetection =+
  184.     set from = $(fatal)
  185.     set to = $(fatal)
  186.     goto $(StartLabel)
  187. installadapter = +
  188.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  189.     Ifstr $(KeyProduct) != $(KeyNull)
  190.         CloseRegKey $(KeyProduct)
  191.         ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  192.            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  193.                $(ProductVersion)
  194.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  195.                Debug-Output "ShellCode error: cannot get an error string."
  196.                goto ShellCodeError
  197.            endif
  198.            goto end
  199.         else
  200.            Shell $(UtilityInf), CardExistedDlg
  201.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  202.                Debug-Output "ShellCode error: cannot get an error string."
  203.                goto ShellCodeError
  204.            endif
  205.            ifstr(i) $($R1) != "OK"
  206.                set CommonStatus = STATUS_USERCANCEL
  207.                goto end
  208.            endif
  209.            set OldVersionExisted = $(TRUE)
  210.         endif
  211.     endif
  212.     Ifstr(i) $(DetectedCard) != TRUE
  213.         Goto adaptersetup
  214.     Endif
  215.     StartWait
  216.     Shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
  217.     EndWait
  218.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  219.         Goto adaptersetup
  220.     Endif
  221.     Set DetectedParams = $($R1)
  222.     Debug-Output "OEMNADWD.INF: Calling Param_SetDefaults to merge detected params"
  223.     Shell $(ParamInf) Param_SetDefaults $(DetectedParams)
  224.     goto adapteroptions
  225. configureadapter = +
  226.     Ifstr $(KeyProduct) == $(KeyNull)
  227.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  228.         Ifstr $(KeyProduct) == $(KeyNull)
  229.             set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  230.             Debug-Output "Cannot find component product key"
  231.             goto fatalregistry
  232.         Endif
  233.     Endif
  234.     Debug-Output "INF: Shelling to FindService"
  235.     Shell $(UtilityInf) FindService, $(KeyProduct)
  236.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  237.         Debug-Output "INF: FindService shell failure"
  238.         Goto ShellCodeError
  239.     Endif
  240.     Ifstr(i) $($R0) != NO_ERROR
  241.         Debug-Output "INF: FindService Shell error: "$($R0)
  242.         Goto fatalregistry
  243.     endif
  244.     set KeyParameters = $($R2)
  245.     CloseRegKey $($R1)
  246.     Ifstr $(KeyParameters) == $(KeyNull)
  247.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  248.         Debug-Output "Cannot find component service"
  249.         goto fatalregistry
  250.     endif
  251.     set OldVersionExisted = $(TRUE )
  252.     set ValueName = ""
  253.     set ValueData = ""
  254.     set ValueStr  = ""
  255.     set ValueList = {}
  256.     EnumRegValue $(KeyParameters) ValueList
  257.     ForListDo $(ValueList)
  258.         set ValueItem = $($)
  259.         set ValueName = *($(ValueItem),1)
  260.         set ValueData = *($(ValueItem),4)
  261.         Ifstr(i) $(ValueName) == "InterruptNumber"
  262.             set IRQLevel = $(ValueData)
  263.         else-Ifstr(i) $(ValueName) == "IOBaseAddress"
  264.             set IOBaseValue = $(ValueData)
  265.         else-Ifstr(i) $(ValueName) == "MemoryMappedBaseAddress"
  266.             set WinBaseValue = $(ValueData)
  267.         endif
  268.     EndForListDo
  269. adaptersetup =+
  270.     Shell $(ParamInf) Param_ParameterConfidence
  271.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  272.         Debug-Output "OEMNADWD.INF: parameter confidence too low to bypass configuration"
  273.         Goto adapteroptions
  274.     Endif
  275.     Ifstr(i) $(DetectedCard) == TRUE
  276.         Ifstr(i) $(!STF_INSTALL_MODE) != CUSTOM
  277.             Goto adapterverify
  278.         Endif
  279.     Endif
  280.     goto adapteroptions
  281. adapteroptions = +
  282.     set from = adapteroptions
  283.     set WinBaseAddress = *($(WinBaseAddressHexList), ~($(WinBaseAddressDecList),+
  284.         $(WinBaseValue)))
  285.     set IOBaseAddress = *($(IOBaseAddressHexList), ~($(IOBaseAddressDecList),+
  286.         $(IOBaseValue)))
  287.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  288.     ui start "InputDlg"
  289.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  290.         set IRQLevel = $(Combo1Out)
  291.         set WinBaseAddress = $(Combo2Out)
  292.         set IOBaseAddress = $(Combo3Out)
  293.         ui pop 1
  294.     else-ifstr(i) $(DLGEVENT) == "BACK"
  295.         set CommonStatus = STATUS_USERCANCEL
  296.         Debug-Output "Action: exit. Bye."
  297.         ui pop 1
  298.         goto end
  299.     else
  300.         ui pop 1
  301.         Debug-Output "Action: unknown. Bye."
  302.         goto end
  303.     endif
  304.     set WinBaseValue = *($(WinBaseAddressDecList), ~($(WinBaseAddressHexList),+
  305.         $(WinBaseAddress)))
  306.     set IOBaseValue = *($(IOBaseAddressDecList), ~($(IOBaseAddressHexList),+
  307.         $(IOBaseAddress)))
  308. adapterverify =+
  309.     Ifstr(i) $(DetectedCard) != TRUE
  310.         Goto skipoptions
  311.     Endif
  312.     Debug-Output "OEMNADWD.INF: Calling Param_VerifyCard"
  313.     Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
  314.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  315.         Debug-Output "OEMNADWD.INF: Param_VerifyCard succeeded"
  316.         Goto skipoptions
  317.     Endif
  318.     Set from = adapteroptions
  319.     Set to = skipoptions
  320.     Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING
  321.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  322.         Debug-Output "ShellCode error: cannot get an error string."
  323.         goto ShellCodeError
  324.     endif
  325.     set Error = $($R0)
  326.     Goto Warning
  327. skipoptions = +
  328.     ifint $(OldVersionExisted) == $(TRUE)
  329.         ifstr(i) $(!NTN_InstallMode) == configure
  330.             goto writeparameters
  331.         endif
  332.     endif
  333.     StartWait
  334.     ifint $(OldVersionExisted) == $(FALSE)
  335.         ifstr(i) $(!NTN_InstallMode) == "install"
  336.            Ifstr(i) $(DoCopy) == "YES"
  337.               Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  338.               Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  339.                   Goto ShellCodeError
  340.               Else-Ifstr(i) $($R0) == STATUS_FAILED
  341.                   Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  342.                   ifint $($ShellCode) != $(!SHELL_CODE_OK)
  343.                       goto ShellCodeError
  344.                   endif
  345.                   set Error = $($R0)
  346.                   Goto fatal
  347.               Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  348.                   Goto successful
  349.               Endif
  350.               Set SrcDir = $($R1)
  351.            Endif
  352.            install "Install-Option"
  353.            ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  354.               Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  355.               ifint $($ShellCode) != $(!SHELL_CODE_OK)
  356.                   goto ShellCodeError
  357.               endif
  358.               set Error = $($R0)
  359.               goto fatal
  360.            endif
  361.         endif
  362.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  363.             $(ProductSoftwareName), +
  364.             $(ProductSoftwareName), +
  365.             $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  366.             $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  367.             $(NetEventDLL)
  368.         Set OEM_ABANDON_SOFTWARE = TRUE
  369.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  370.             Debug-Output "ShellCode error"
  371.             goto ShellCodeError
  372.         endif
  373.         set RegistryErrorIndex = $($R0)
  374.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  375.             EndWait
  376.             Debug-Output "Registry error: add software components"
  377.             CloseRegKey $($R1)
  378.             CloseRegKey $($R2)
  379.             CloseRegKey $($R3)
  380.             CloseRegKey $($R4)
  381.             CloseRegKey $($R5)
  382.             goto fatalregistry
  383.         endif
  384.         Set SoftProductKey      = $($R1)
  385.         Set SoftNetRuleKey      = $($R2)
  386.         Set SoftServiceKey      = $($R3)
  387.         Set SoftParameterKey    = $($R4)
  388.         Set SoftLinkageKey      = $($R5)
  389.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  390.                            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  391.                            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  392.                            {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  393.                            {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  394.                            {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  395.                            {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  396.         Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  397.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  398.             Debug-Output "ShellCode error."
  399.             goto ShellCodeError
  400.         endif
  401.         set RegistryErrorIndex = $($R0)
  402.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  403.             EndWait
  404.             Debug-Output "Resgitry error: add value list."
  405.             CloseRegKey $(SoftProductKey)
  406.             CloseRegKey $(SoftNetRuleKey)
  407.             CloseRegKey $(SoftServiceKey)
  408.             CloseRegKey $(SoftParameterKey)
  409.             CloseRegKey $(SoftLinkageKey)
  410.             goto fatalregistry
  411.         endif
  412.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  413.                             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  414.                             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  415.                             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  416.                             {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  417.                             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  418.         Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  419.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  420.             Debug-Output "ShellCode error."
  421.             goto ShellCodeError
  422.         endif
  423.         set RegistryErrorIndex = $($R0)
  424.         CloseRegKey $(SoftProductKey)
  425.         CloseRegKey $(SoftNetRuleKey)
  426.         CloseRegKey $(SoftServiceKey)
  427.         CloseRegKey $(SoftParameterKey)
  428.         CloseRegKey $(SoftLinkageKey)
  429.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  430.             EndWait
  431.             Debug-Output "Resgitry error: add value list."
  432.             goto fatalregistry
  433.         endif
  434.     endif
  435.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  436.     ifint $($R4) != -1
  437.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  438.     endif
  439.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  440.         Debug-Output "Cannot add hardware component"
  441.         goto ShellCodeError
  442.     endif
  443.     set RegistryErrorIndex = $($R0)
  444.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  445.         EndWait
  446.         Debug-Output "Registry error: add hardware component"
  447.         Debug-Output $(RegistryErrorIndex)
  448.         CloseRegKey $($R1)
  449.         CloseRegKey $($R2)
  450.         CloseRegKey $($R3)
  451.         goto fatalregistry
  452.     endif
  453.     set KeyParameters = $($R3)
  454.     set KeyAdapterRules = $($R2)
  455.     set AdapterNumber = $($R4)
  456.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  457.                        {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitle)},+
  458.                        {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDescription)},+
  459.                        {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  460.                        {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  461.                        {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  462.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  463.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  464.         Debug-Output "ShellCode error"
  465.         goto ShellCodeError
  466.     endif
  467.     CloseRegKey $($R1)
  468.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  469.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  470.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  471.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  472.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  473.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  474.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  475.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  476.         Debug-Output "ShellCode error."
  477.         goto ShellCodeError
  478.     endif
  479.     set RegistryErrorIndex = $($R0)
  480.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  481.         EndWait
  482.         Debug-Output "Resgitry error: add value list."
  483.         CloseRegKey $(KeyParameters)
  484.         CloseRegKey $(KeyAdapterRules)
  485.         goto fatalregistry
  486.     endif
  487.     CloseRegKey $(KeyAdapterRules)
  488.     goto writeparameters
  489. writeparameters = +
  490.     Shell $(UtilityInf), GetBusTypeNum
  491.     set BusTypeNum = $($R1)
  492.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  493.         Debug-Output "ShellCode error."
  494.         goto ShellCodeError
  495.     endif
  496.     IfContains $(Option) in $(EthernetCards)
  497.         set CardMediaType = 1
  498.         set NewValueList = {+
  499.                        {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(IRQLevel)},+
  500.                        {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  501.                        {IOBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseValue)},+
  502.                        {MemoryMappedBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(WinBaseValue)},+
  503.                        {MediaType,$(NoTitle),$(!REG_VT_DWORD),$(CardMediaType)}+
  504.                        }
  505.     else
  506.         set CardMediaType = 2
  507.         set NewValueList = {+
  508.                        {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(IRQLevel)},+
  509.                        {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  510.                        {IOBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseValue)},+
  511.                        {MemoryMappedBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(WinBaseValue)},+
  512.                        {MediaType,$(NoTitle),$(!REG_VT_DWORD),$(CardMediaType)},+
  513.                        {MaximumPacketSize,$(NoTitle),$(!REG_VT_DWORD),8192}+
  514.                        }
  515.     endif
  516.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  517.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  518.         Debug-Output "ShellCode error."
  519.         goto ShellCodeError
  520.     endif
  521.     set RegistryErrorIndex = $($R0)
  522.     CloseRegKey $(KeyParameters)
  523.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  524.         Debug-Output "Registry error: Add value list"
  525.         goto fatalregistry
  526.     endif
  527.     EndWait
  528.     goto successful
  529. bindingadapter =+
  530.     set Error = "Binding: Sorry, not yet implemented."
  531.     goto fatal
  532. removeadapter = +
  533.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  534.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  535.             $(ProductSoftwareName)
  536.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  537.             Debug-Output "ShellCode error"
  538.             goto ShellCodeError
  539.         endif
  540.         set RegistryErrorIndex = $($R0)
  541.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  542.             goto fatalregistry
  543.         endif
  544.     else
  545.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  546.             $(ProductSoftwareName), $(!NTN_RegBase)
  547.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  548.             Debug-Output "ShellCode error"
  549.             goto ShellCodeError
  550.         endif
  551.         set RegistryErrorIndex = $($R0)
  552.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  553.             goto fatalregistry
  554.         endif
  555.     endif
  556.     goto end
  557. UpgradeSoftware = +
  558.     ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  559.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  560.         Ifstr $(KeyProduct) != $(KeyNull)
  561.             GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  562.             set Version = *($(VersionInfo), 4)
  563.             Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  564.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  565.                 Debug-Output "ShellCode error"
  566.                 goto ShellCodeError
  567.             endif
  568.             set !UG_Filename = $($R0)
  569.             ifstr(i) $(!UG_Filename) != ""
  570.                 install "Install-Update"
  571.                 ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  572.                     goto fatal
  573.                 endif
  574.             endif
  575.             SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  576.             SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  577.             ifint $(Version) != $(ProductVersion)
  578.             endif
  579.             CloseRegKey $(KeyProduct)
  580.         else
  581.             goto fatalregistry
  582.         endif
  583.     else
  584.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
  585.               $(MAXIMUM_ALLOWED) NetworkCardKey
  586.         Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  587.             GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  588.             set ServiceName = *($(ServiceNameInfo), 4)
  589.             OpenRegKey $(NetworkCardKey) "" "NetRules" +
  590.                 $(MAXIMUM_ALLOWED) NetRuleKey
  591.             Ifstr(i) $(NetRuleKey) != $(KeyNull)
  592.             else
  593.                 goto fatalregistry
  594.             endif
  595.             CloseRegKey $(NetRules)
  596.             CloseRegKey $(NetworkCardKey)
  597.         else
  598.             goto fatalregistry
  599.         endif
  600.         OpenRegKey $(!REG_H_LOCAL) "" +
  601.               $(!NTN_ServiceBase)"\"$(ServiceName) +
  602.               $(MAXIMUM_ALLOWED) ServiceKey
  603.         Ifstr(i) $(ServiceKey) != $(KeyNull)
  604.             CloseRegKey $(ServiceKey)
  605.         else
  606.             goto fatalregistry
  607.         endif
  608.     endif
  609.     goto end
  610. successful = +
  611.     goto end
  612. abandon = +
  613.     ForListDo $(OEM_ABANDON_OPTIONS)
  614.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  615.             $(ProductSoftwareName), $($)
  616.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  617.             Debug-Output "ShellCode error"
  618.             goto ShellCodeError
  619.         endif
  620.         set RegistryErrorIndex = $($R0)
  621.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  622.             goto fatalregistry
  623.         endif
  624.     EndForListDo
  625.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  626.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  627.             $(ProductSoftwareName), FALSE
  628.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  629.             Debug-Output "ShellCode error"
  630.             goto ShellCodeError
  631.         endif
  632.         set RegistryErrorIndex = $($R0)
  633.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  634.             goto fatalregistry
  635.         endif
  636.     endif
  637.     goto end
  638. warning = +
  639.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  640.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  641.         goto ShellCodeError
  642.     endif
  643.     ifstr(i) $($R1) == "OK"
  644.         goto $(to)
  645.     else-ifstr(i) $($R1) == "CANCEL"
  646.         goto $(from)
  647.     else
  648.         goto "end"
  649.     endif
  650. nonfatalinfo = +
  651.     Set CommonStatus = STATUS_USERCANCEL
  652.     Set Severity = STATUS
  653.     goto nonfatalmsg
  654. nonfatal = +
  655.     Set Severity = NONFATAL
  656.     goto nonfatalmsg
  657. nonfatalmsg = +
  658.     ifstr(i) $(Error) == ""
  659.         Set Severity = NONFATAL
  660.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  661.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  662.             goto ShellCodeError
  663.         endif
  664.         set Error = $($R0)
  665.     endif
  666.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  667.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  668.         goto ShellCodeError
  669.     endif
  670.     ifstr(i) $($R1) == "OK"
  671.         goto $(from)
  672.     else
  673.         goto "end"
  674.     endif
  675. fatalregistry = +
  676.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  677.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  678.         goto ShellCodeError
  679.     endif
  680.     set Error = $($R0)
  681.     goto fatal
  682. fataldetect = +
  683.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  684.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  685.         Debug-Output "ShellCode error: cannot get an error string."
  686.         goto ShellCodeError
  687.     endif
  688.     set Error = $($R0)
  689.     Goto fatal
  690. fatal = +
  691.     ifstr(i) $(Error) == ""
  692.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  693.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  694.             goto ShellCodeError
  695.         endif
  696.         set Error = $($R0)
  697.     endif
  698.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  699.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  700.         goto ShellCodeError
  701.     endif
  702.     goto setfailed
  703. ShellCodeError = +
  704.     set DlgType      = "MessageBox"
  705.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  706.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  707.     set STF_MB_TYPE  = 1
  708.     set STF_MB_ICON  = 3
  709.     set STF_MB_DEF   = 1
  710.     ui start "Error Message"
  711.     goto setfailed
  712. setfailed = +
  713.     set CommonStatus = STATUS_FAILED
  714.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  715.         set OEM_ABANDON_ON = FALSE
  716.         goto abandon
  717.     endif
  718.     goto end
  719. end = +
  720.     goto term
  721. term = +
  722.     Return $(CommonStatus)
  723. [Install-Option]
  724.     set STF_VITAL = ""
  725.     ifstr(i) $(AddCopy) == "YES"
  726.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  727.     endif
  728.     ifstr(i) $(DoCopy) == "YES"
  729.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  730.        CopyFilesInCopyList
  731.     endif
  732.     ifstr(i) $(DoConfig) == "YES"
  733.     endif
  734.     Exit
  735. [Install-Update]
  736.    set STF_VITAL        = ""
  737.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  738.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  739.    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  740.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  741.    CopyFilesInCopyList
  742.    exit
  743. [Source Media Descriptions]
  744.     1    = "Windows NT Advanced Server Setup Disk #1"   , TAGFILE = disk1
  745.     2    = "Windows NT Advanced Server Setup Disk #2"   , TAGFILE = disk2
  746.     3    = "Windows NT Advanced Server Setup Disk #3"   , TAGFILE = disk3
  747.     4    = "Windows NT Advanced Server Setup Disk #4"   , TAGFILE = disk4
  748.     5    = "Windows NT Advanced Server Setup Disk #5"   , TAGFILE = disk5
  749.     6    = "Windows NT Advanced Server Setup Disk #6"   , TAGFILE = disk6
  750.     7    = "Windows NT Advanced Server Setup Disk #7"   , TAGFILE = disk7
  751.     8    = "Windows NT Advanced Server Setup Disk #8"   , TAGFILE = disk8
  752.     9    = "Windows NT Advanced Server Setup Disk #9"   , TAGFILE = disk9
  753.     10    = "Windows NT Advanced Server Setup Disk #10"  , TAGFILE = disk10
  754.     11    = "Windows NT Advanced Server Setup Disk #11"  , TAGFILE = disk11
  755.     12    = "Windows NT Advanced Server Setup Disk #12"  , TAGFILE = disk12
  756.     13    = "Windows NT Advanced Server Setup Disk #13"  , TAGFILE = disk13
  757.     14    = "Windows NT Advanced Server Setup Disk #14"  , TAGFILE = disk14
  758.     15    = "Windows NT Advanced Server Setup Disk #15"  , TAGFILE = disk15
  759.     16    = "Windows NT Advanced Server Setup Disk #16"  , TAGFILE = disk16
  760.     17    = "Windows NT Advanced Server Setup Disk #17"  , TAGFILE = disk17
  761.     18    = "Windows NT Advanced Server Setup Disk #18"  , TAGFILE = disk18
  762.     19    = "Windows NT Advanced Server Setup Disk #19"  , TAGFILE = disk19
  763.     20    = "Windows NT Advanced Server Setup Disk #20"  , TAGFILE = disk20
  764.     21    = "Windows NT Advanced Server Setup Disk #21"  , TAGFILE = disk21
  765.     22    = "Windows NT Advanced Server Setup Disk #22"  , TAGFILE = disk22
  766.     23    = "Windows NT Advanced Server Setup Disk #23"  , TAGFILE = disk23
  767.     24    = "Windows NT Advanced Server Setup Disk #24"  , TAGFILE = disk24
  768.     25    = "Windows NT Advanced Server Setup Disk #25"  , TAGFILE = disk25
  769.     26    = "Windows NT Advanced Server Setup Disk #26"  , TAGFILE = disk26
  770.     27    = "Windows NT Advanced Server Setup Disk #27"  , TAGFILE = disk27
  771.     28    = "Windows NT Advanced Server Setup Disk #28"  , TAGFILE = disk28
  772.     29    = "Windows NT Advanced Server Setup Disk #29"  , TAGFILE = disk29
  773. [ProductType]
  774. STF_PRODUCT  = LanmanNT
  775. STF_PLATFORM = I386
  776. [Files-Inf]
  777. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  778. [Files-SMCISA]
  779. 22,SMC8000N.SYS , SIZE=36864
  780. [LanguagesSupported]
  781.     ENG
  782. [OptionsTextENG]
  783.     SMCISA = "SMC (WD) EtherCard"
  784. [FileConstantsENG]
  785. ProCaption   = "Windows NT Setup"
  786. ProCancel    = "Cancel"
  787. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  788.                "Are you sure you want to cancel copying files?"
  789. ProCancelCap = "Network Setup Message"
  790. ProText1     = "Copying:"
  791. ProText2     = "To:"
  792. FunctionTitle   = "SMC (WD) ISA Adapter Card Setup"
  793. ProductSoftwareDescription      = "SMC (WD) Adapter Driver"
  794. ProductHardwareDescription      = "SMC (WD) ISA Adapter"
  795. ProductSoftwareTitle    = "SMC (WD) Adapter Driver"
  796. ProductHardwareTitle    = "SMC (WD) ISA Adapter"
  797. ShellCodeErrorTitle     = "Error: "$(FunctionTitle)
  798. ShellCodeErrorText      = "Shell Code Error."
  799. [DialogConstantsENG]
  800. Help        = "&Help"
  801. Exit        = "Cancel"
  802. OK          = "OK"
  803. HelpContext = ""
  804. Continue    = "Continue"
  805. Cancel      = "Cancel"
  806. [FileDependentDlgENG]
  807. Combo1Label = "&IRQ Level:"
  808. Combo2Label = "&Memory Base Address:"
  809. Combo3Label = "I/&O Port Address:"
  810. DlgType = "MultiCombo"
  811. DlgTemplate = "WD"
  812. Caption = $(FunctionTitle)
  813. Combo1List = $(IRQ_List)
  814. Combo1Out  = $(IRQLevel)
  815. Combo2List = $(WinBaseAddressHexList)
  816. Combo2Out  = $(WinBaseAddress)
  817. Combo3List = $(IOBaseAddressHexList)
  818. Combo3Out  = $(IOBaseAddress)
  819. ComboListItemsIn  = {Combo1List, Combo2List, Combo3List}
  820. ComboListItemsOut = {Combo1Out, Combo2Out, Combo3Out}
  821. EditTextIn = ""
  822. EditTextLim = ""
  823. NotifyFields = {NO, NO, NO}
  824. HelpContext = $(!IDH_DB_OEMNADWD_INS)
  825.  
  826.  
  827.  
  828.