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

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