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

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