home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1996 February / VPR9602A.ISO / drvlib / netcard / alpha / c320nt / oemsetup.inf < prev   
INI File  |  1995-10-27  |  35KB  |  811 lines

  1. [Identification]
  2.     OptionType = NetAdapter
  3. [PlatformsSupported]
  4.     PCI
  5.     EISA
  6.     "Jazz-Internal Bus"
  7. [LanguagesSupported]
  8.     ENG
  9. [Options]
  10.     c320tnt
  11. [OptionsTextENG]
  12.     c320tnt   = "Cisco CDDI/FDDI EISA Adapter"
  13. [FileConstants]
  14. UtilityInf      = "UTILITY.INF"
  15. subroutineinf   = "SUBROUTN.INF"
  16. SoftwareType    = "driver"
  17. Exit_Code       = 0
  18. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  19. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  20. COMPRESSEDID_MASK = 4294967295
  21. C320_EISA_ID  = 53629710
  22. C320T_EISA_ID = 70406926
  23. Manufacturer    = "Microsoft"
  24. ProductMajorVersion     = "3"
  25. ProductMinorVersion     = "5"
  26. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  27. ThisInfFileName = ""
  28. [GeneralConstants]
  29. from      = ""
  30. to        = ""
  31. ExitCodeOk     = 0
  32. ExitCodeCancel = 1
  33. ExitCodeFatal  = 2
  34. KeyNull         = ""
  35. MAXIMUM_ALLOWED   = 33554432
  36. RegistryErrorIndex = NO_ERROR
  37. KeyProduct      = ""
  38. KeyParameters   = ""
  39. TRUE            = 1
  40. FALSE           = 0
  41. NoTitle            = 0
  42. ExitState   = "Active"
  43. OldVersionC320NTExisted = $(FALSE)
  44. OldVersionC320TNTExisted = $(FALSE)
  45. DriverPath      = $(!STF_NTPATH)\drivers
  46. [FileConstantsENG]
  47. ProCaption   = "Windows NT Setup"
  48. ProCancel    = "Cancel"
  49. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  50.                "Are you sure you want to cancel copying files?"
  51. ProCancelCap = "Network Setup Message"
  52. ProText1     = "Copying:"
  53. ProText2     = "To:"
  54. FunctionTitle   = "Cisco CDDI/FDDI EISA Adapter Setup"
  55. ProductSoftwareC320NTDescription      = "Cisco CDDI/FDDI EISA Driver"
  56. ProductHardwareC320NTDescription      = "Cisco CDDI/FDDI EISA Adapter"
  57. ProductSoftwareC320NTName     = "c320nt"
  58. ProductSoftwareC320NTTitle    = "Cisco CDDI/FDDI EISA Driver"
  59. ProductSoftwareC320NTImagePath = "\SystemRoot\System32\drivers\c320nt.sys"
  60. NetRuleSoftwareC320NTType     = "c320ntSys ndisDriver c320ntDriver"
  61. NetRuleSoftwareC320NTUse      = $(SoftwareType)
  62. NetRuleSoftwareC320NTBindForm = """c320ntSys"" yes no container"
  63. NetRuleSoftwareC320NTClass    = {"c320ntDriver basic"}
  64. NetRuleSoftwareC320NTBindable = {"c320ntDriver c320ntAdapter non exclusive 100"}
  65. ProductHardwareC320NTName     = "C320NT"
  66. ProductHardwareC320NTTitle    = "Cisco CDDI/FDDI EISA Adapter"
  67. NetRuleHardwareC320NTType     = "c320nt c320ntAdapter"
  68. NetRuleHardwareC320NTBindForm = " yes yes container"
  69. NetRuleHardwareC320NTClass    = {"c320ntAdapter basic"}
  70. ProductKeyC320NTName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareC320NTName)"\CurrentVersion"
  71. ParamKeyC320NTName    = $(!NTN_ServiceBase)$(ProductHardwareC320NTName)"\Parameters"
  72. ; Turbo Adapter defines
  73. ProductSoftwareC320TNTDescription      = "Cisco CDDI/FDDI EISA Driver"
  74. ProductHardwareC320TNTDescription      = "Cisco CDDI/FDDI EISA Adapter"
  75. ProductSoftwareC320TNTName     = "c320tnt"
  76. ProductSoftwareC320TNTTitle    = "Cisco CDDI/FDDI EISA Driver"
  77. ProductSoftwareC320TNTImagePath = "\SystemRoot\System32\drivers\c320tnt.sys"
  78. NetRuleSoftwareC320TNTType     = "c320tntSys ndisDriver c320tntDriver"
  79. NetRuleSoftwareC320TNTUse      = $(SoftwareType)
  80. NetRuleSoftwareC320TNTBindForm = """c320tntSys"" yes no container"
  81. NetRuleSoftwareC320TNTClass    = {"c320tntDriver basic"}
  82. NetRuleSoftwareC320TNTBindable = {"c320tntDriver c320tntAdapter non exclusive 100"}
  83. ProductHardwareC320TNTName     = "C320TNT"
  84. ProductHardwareC320TNTTitle    = "Cisco CDDI/FDDI EISA Adapter"
  85. NetRuleHardwareC320TNTType     = "c320tnt c320tntAdapter"
  86. NetRuleHardwareC320TNTBindForm = " yes yes container"
  87. NetRuleHardwareC320TNTClass    = {"c320tntAdapter basic"}
  88. ProductKeyC320TNTName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareC320TNTName)"\CurrentVersion"
  89. ParamKeyC320TNTName    = $(!NTN_ServiceBase)$(ProductHardwareC320TNTName)"\Parameters"
  90. [DialogConstantsENG]
  91. Help        = "&Help"
  92. Exit        = "Cancel"
  93. OK          = "OK"
  94. HelpContext = ""
  95. Continue    = "Continue"
  96. Cancel      = "Cancel"
  97. [date]
  98.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  99. [Identify]
  100.     read-syms Identification
  101.     set Status     = STATUS_SUCCESSFUL
  102.     set Identifier = $(OptionType)
  103.     set Media      = #("Source Media Descriptions", 1, 1)
  104.     Return $(Status) $(Identifier) $(Media)
  105. [ReturnOptions]
  106.     set Status        = STATUS_FAILED
  107.     set OptionList     = {}
  108.     set OptionTextList = {}
  109.     set LanguageList = ^(LanguagesSupported, 1)
  110.     Ifcontains(i) $($0) in $(LanguageList)
  111.         ifstr(i) $($1) == ""
  112.            goto returnoptions
  113.         endif
  114.         set PlatformList = ^(PlatformsSupported, 1)
  115.         Ifcontains(i) $($1) in $(PlatformList)
  116.            goto returnoptions
  117.         else
  118.            set Status = STATUS_NOTSUPPORTED
  119.            goto finish_ReturnOptions
  120.         endif
  121.     else
  122.         set Status = STATUS_NOLANGUAGE
  123.         goto finish_ReturnOptions
  124.     endif
  125. returnoptions = +
  126.     set OptionList     = ^(Options, 1)
  127.     set OptionTextList = ^(OptionsText$($0), 1)
  128.     set Status         = STATUS_SUCCESSFUL
  129. finish_ReturnOptions = +
  130.     Return $(Status) $(OptionList) $(OptionTextList)
  131. [InstallOption]
  132.     set Option   = $($1)
  133.     set SrcDir   = $($2)
  134.     set AddCopy  = $($3)
  135.     set DoCopy   = $($4)
  136.     set DoConfig = $($5)
  137.     set LanguageList = ^(LanguagesSupported, 1)
  138.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  139.         Return STATUS_NOLANGUAGE
  140.     endif
  141.     set-subst LF = "\n"
  142.     read-syms GeneralConstants
  143.     read-syms FileConstants
  144.     read-syms DialogConstants$(!STF_LANGUAGE)
  145.     ifstr(i) $(!NTN_Origination) == "NCPA"
  146.         set Continue = "OK"
  147.     endif
  148.     read-syms FileConstants$(!STF_LANGUAGE)
  149.     detect date
  150.     set-title  $(FunctionTitle)
  151.     set to   = Begin
  152.     set from = Begin
  153.     set CommonStatus = STATUS_SUCCESSFUL
  154. ; Get my INF Filename
  155.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  156.     Ifstr $(KeyProduct) != $(KeyNull)
  157.         Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  158.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  159.             CloseRegKey $(KeyProduct)
  160.             Debug-Output " ShellCode error"
  161.             goto ShellCodeError
  162.         endif
  163.         CloseRegKey $(KeyProduct)
  164.         set ThisInfFileName = $($R0)
  165.     else
  166.         set ThisInfFileName = CRES
  167.     endif
  168.     EndWait
  169. Begin = +
  170.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  171.         set StartLabel = removeadapter
  172.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  173.         set StartLabel = UpgradeSoftware
  174.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  175.         set StartLabel = bindingadapter
  176.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  177.         set CommonStatus = STATUS_REBOOT
  178.         Debug-Output $(ThisInfFileName)" Configure: Product Key Name is "$(ProductKeyName)" NTN_RegBase is "$(!NTN_RegBase)
  179.         Ifstr(i) $(ProductKeyC320NTName) == $(!NTN_RegBase)
  180.             Debug-Output $(ThisInfFileName)" Cannot configure the CresNT driver software."
  181.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  182.         else-Ifstr(i) $(ProductKeyC320TNTName) == $(!NTN_RegBase)
  183.             Debug-Output $(ThisInfFileName)" Cannot configure the CresNT driver software."
  184.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  185.         else
  186.             Debug-Output $(ThisInfFileName)" Cannot configure the CresNT adapter card."
  187.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_HARDWARE
  188.         endif
  189.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  190.             Debug-Output $(ThisInfFileName)" ShellCode error: cannot get an error string."
  191.             goto ShellCodeError
  192.         endif
  193.         set Error = $($R0)
  194.         set from = end
  195.         set to = end
  196.         goto nonfatalinfo
  197.     else
  198.         set StartLabel = installadapter
  199.         set OEM_ABANDON_HW_OPTIONS = {}
  200.         set OEM_ABANDON_SW_OPTIONS = {}
  201.         set OEM_ABANDON_ON = TRUE
  202.     endif
  203.     set from = $(fatal)
  204.     set to = $(fatal)
  205.     Debug-Output $(ThisInfFileName)" =================================================="
  206.     Debug-Output $(ThisInfFileName)" STF_CWDIR is: "$(!STF_CWDIR)
  207.     Debug-Output $(ThisInfFileName)" Selected Option is: "$(Option)
  208.     Debug-Output $(ThisInfFileName)" =================================================="
  209.     goto $(StartLabel)
  210. installadapter = +
  211.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyC320NTName) $(MAXIMUM_ALLOWED) KeyProduct
  212.     Ifstr $(KeyProduct) != $(KeyNull)
  213.         Debug-Output $(ThisInfFileName)" Opened Product Key for "$(ProductKeyC320NTName)
  214.         CloseRegKey $(KeyProduct)
  215.         ifstr(i) !(NTN_RegBase) == $(ProductKeyC320NTName)
  216.             Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareC320NTTitle),+
  217.                 $(ProductVersion)
  218.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  219.                 Debug-Output $(ThisInfFileName)" ShellCode error: cannot get an error string."
  220.                 goto ShellCodeError
  221.             endif
  222.             goto end
  223.         endif
  224.         set OldVersionC320NTExisted = $(TRUE)
  225.     endif
  226.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyC320TNTName) $(MAXIMUM_ALLOWED) KeyProduct
  227.     Ifstr $(KeyProduct) != $(KeyNull)
  228.         Debug-Output $(ThisInfFileName)" Opened Product Key for "$(ProductKeyC320TNTName)
  229.         CloseRegKey $(KeyProduct)
  230.         ifstr(i) !(NTN_RegBase) == $(ProductKeyC320TNTName)
  231.             Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareC320TNTTitle),+
  232.                 $(ProductVersion)
  233.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  234.                 Debug-Output $(ThisInfFileName)" ShellCode error: cannot get an error string."
  235.                 goto ShellCodeError
  236.             endif
  237.             goto end
  238.         endif
  239.         set OldVersionC320TNTExisted = $(TRUE)
  240.     endif
  241.     goto nextstep
  242. configureadapter = +
  243.     set Error = "Configure: Sorry not yet implemented."
  244.     goto fatal
  245. nextstep = +
  246.     StartWait
  247. installproduct = +
  248.     Debug-Output $(ThisInfFileName)" Installing product, Shelling to find Cisco EISA Adapters"
  249.     Shell $(UtilityInf), EISAFindBus, $(C320_EISA_ID) $(COMPRESSEDID_MASK)
  250.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  251.         goto ShellCodeError
  252.     endif
  253.     ifstr $($R0) != "NO_ERROR"
  254.         set Error = $($R0)
  255.         goto fatal
  256.     endif
  257.     set CardInfo = {}
  258.     ifstr(i) $($R1) != {}
  259.         set CardInfo = $($R1)
  260.     endif
  261.     Debug-Output $(ThisInfFileName)" Shelling to find Cisco EISA Adapters"
  262.     Shell $(UtilityInf), EISAFindBus, $(C320T_EISA_ID) $(COMPRESSEDID_MASK)
  263.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  264.         goto ShellCodeError
  265.     endif
  266.     ifstr $($R0) != "NO_ERROR"
  267.         set Error = $($R0)
  268.         goto fatal
  269.     endif
  270.     ifstr(i) $($R1) != {}
  271.         ifstr(i) $(CardInfo) != {}
  272.             ForListDo $($R1)
  273.                 set CardInfo = >($(CardInfo), $($))
  274.             EndForListDo
  275.         else
  276.             set CardInfo = $($R1)
  277.         endif
  278.     endif
  279.     ifstr(i) $(CardInfo) == {}
  280.         Debug-Output $(ThisInfFileName)" Cannot find any card"
  281.         set Error = $(CANNOT_FIND_ANY_CARD)
  282.         set CommonStatus = STATUS_USERCANCEL
  283.         set from = "end"
  284.         goto nonfatal
  285.     endif
  286.     Debug-Output $(ThisInfFileName)" Card Information: "$(CardInfo)
  287.     set AdapterList = $(CardInfo)
  288.     set C320Present = $(FALSE)
  289.     set C320TPresent = $(FALSE)
  290.     ForListDo $(AdapterList)
  291.         set EISAId = *($($),3)
  292.         ifint $(EISAId) == $(C320_EISA_ID)
  293.             set C320NTPresent = $(TRUE)
  294.             Debug-Output $(ThisInfFileName)" EISA Rev 3 Adapter present"
  295.         endif
  296.         ifint $(EISAId) == $(C320T_EISA_ID)
  297.             set C320TNTPresent = $(TRUE)
  298.             Debug-Output $(ThisInfFileName)" EISA Adapter present"
  299.         endif
  300.     EndForListDo
  301. ; INSTALLING SOFTWARE COMPONENTS
  302.     ForListDo $(AdapterList)
  303.         set EISAId = *($($),3)
  304.         ifint $(EISAId) == $(C320_EISA_ID)
  305.             set Option = C320NT
  306.         else-Ifint $(EISAId) == $(C320T_EISA_ID)
  307.             set Option = C320TNT
  308.         else
  309.             goto fatal
  310.         endif
  311.         ifint $($(Option)Present) == $(TRUE)
  312.             ifint $(OldVersion$(Option)Existed) == $(FALSE)
  313.                 Ifstr(i) $(DoCopy) == "YES"
  314.                    Debug-Output $(ThisInfFileName)" Verifying source directories for "$(Option)
  315.                    Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  316.                    Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  317.                         Goto ShellCodeError
  318.                    Else-Ifstr(i) $($R0) == STATUS_FAILED
  319.                        Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  320.                        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  321.                           goto ShellCodeError
  322.                        endif
  323.                        set Error = $($R0)
  324.                        Goto fatal
  325.                    Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  326.                        Goto successful
  327.                    Endif
  328.                    Set SrcDir = $($R1)
  329.                 Endif
  330.                 Debug-Output $(ThisInfFileName)" Copying files for "$(Option)" driver, SrcDir: "$(SrcDir)
  331.                 install "Install-Option"
  332.                 ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  333.                     Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  334.                     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  335.                        goto ShellCodeError
  336.                     endif
  337.                     set Error = $($R0)
  338.                     goto fatal
  339.                 endif
  340.                 Debug-Output $(ThisInfFileName)" Adding S/W Component in Registry for "$(Option)
  341.                 Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  342.                         $(ProductSoftware$(Option)Name), +
  343.                         $(ProductSoftware$(Option)Name), +
  344.                         $(ProductSoftware$(Option)Title), $(STF_CONTEXTINFNAME), +
  345.                         $(ProductSoftware$(Option)ImagePath), "kernel", "NDIS", {}, "",+
  346.                         $(NetEventDLL)
  347.                 Set OEM_ABANDON_SW_OPTIONS = >($(OEM_ABANDON_SW_OPTIONS), $(ProductSoftware$(Option)Name))
  348.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  349.                     Debug-Output $(ThisInfFileName)" ShellCode error"
  350.                     goto ShellCodeError
  351.                 endif
  352.                 set RegistryErrorIndex = $($R0)
  353.                 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  354.                     EndWait
  355.                     Debug-Output $(ThisInfFileName)" Registry error: add software components"
  356.                     CloseRegKey $($R1)
  357.                     CloseRegKey $($R2)
  358.                     CloseRegKey $($R3)
  359.                     CloseRegKey $($R4)
  360.                     CloseRegKey $($R5)
  361.                     goto fatalregistry
  362.                 endif
  363.                 set OldVersion$(Option)Existed = $(TRUE)
  364.                 set SoftProductKey      = $($R1)
  365.                 Set SoftNetRuleKey      = $($R2)
  366.                 Set SoftServiceKey      = $($R3)
  367.                 Set SoftParameterKey    = $($R4)
  368.                 Set SoftLinkageKey      = $($R5)
  369.                 set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  370.                                    {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  371.                                    {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  372.                                    {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftware$(Option)Title)},+
  373.                                    {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftware$(Option)Description)},+
  374.                                    {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftware$(Option)Name)},+
  375.                                    {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  376.                 Debug-Output $(ThisInfFileName)" Adding value to S/W Product key for "$(Option)
  377.                 Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  378.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  379.                     Debug-Output $(ThisInfFileName)" ShellCode error."
  380.                     goto ShellCodeError
  381.                 endif
  382.                 set RegistryErrorIndex = $($R0)
  383.                 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  384.                     EndWait
  385.                     Debug-Output $(ThisInfFileName)" Registry error: add value list"
  386.                     CloseRegKey $(SoftProductKey)
  387.                     CloseRegKey $(SoftNetRuleKey)
  388.                     CloseRegKey $(SoftServiceKey)
  389.                     CloseRegKey $(SoftParameterKey)
  390.                     CloseRegKey $(SoftLinkageKey)
  391.                     goto fatalregistry
  392.                 endif
  393.                 set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftware$(Option)Type)},+
  394.                                     {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftware$(Option)Use)}, +
  395.                                     {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftware$(Option)BindForm)}, +
  396.                                     {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftware$(Option)Class)}, +
  397.                                     {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftware$(Option)Bindable)}, +
  398.                                     {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  399.                 Debug-Output $(ThisInfFileName)" Adding value to S/W NetRule key for "$(Option)
  400.                 Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  401.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  402.                     Debug-Output $(ThisInfFileName)" ShellCode error."
  403.                     goto ShellCodeError
  404.                 endif
  405.                 set RegistryErrorIndex = $($R0)
  406.                 CloseRegKey $(SoftProductKey)
  407.                 CloseRegKey $(SoftNetRuleKey)
  408.                 CloseRegKey $(SoftServiceKey)
  409.                 CloseRegKey $(SoftParameterKey)
  410.                 CloseRegKey $(SoftLinkageKey)
  411.                 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  412.                     EndWait
  413.                     Debug-Output $(ThisInfFileName)" Registry error: add value list."
  414.                     goto fatalregistry
  415.                 endif
  416.             else
  417.                 Debug-Output $(ThisInfFileName)" S/W for "$(Option)" already exists, not re-installing"
  418.             endif
  419.         endif
  420.     EndForListDo
  421. ; INSTALLING HARDWARE COMPONENTS
  422.     ForListDo $(AdapterList)
  423.         set BusNum = *($($),1)
  424.         set SlotNum = *($($),2)
  425.         set EISAId = *($($),3)
  426.         ifint $(EISAId) == $(C320_EISA_ID)
  427.             set Option = C320NT
  428.         else-Ifint $(EISAId) == $(C320T_EISA_ID)
  429.             set Option = C320TNT
  430.         else
  431.             goto fatal
  432.         endif
  433.         Debug-Output $(ThisInfFileName)" Bus: "$(BusNum)" Slot: "$(SlotNum)" EISAID: "$(EISAId)" Option: "$(Option)
  434.         Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNum), +
  435.             $(SlotNum), $(ProductHardware$(Option)Description), $(ProductHardware$(Option)Name)
  436.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  437.             goto ShellCodeError
  438.         endif
  439.         ifstr $($R0) != "NO_ERROR"
  440.             set Error = $($R0)
  441.             goto fatal
  442.         endif
  443.         ifstr(i) $($R1) != "YES"
  444.             Debug-Output $(ThisInfFileName)" Adding H/W Component "$(Option)" Slot: "$(SlotNum)
  445.             Shell $(UtilityInf), AddHardwareComponent,$(ProductHardware$(Option)Name),$(STF_CONTEXTINFNAME),$(ProductKey$(Option)Name)
  446.             ifint $($R4) != -1
  447.                 Set OEM_ABANDON_HW_OPTIONS = >($(OEM_ABANDON_HW_OPTIONS), {$(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4),$(ProductSoftware$(Option)Name)})
  448.             endif
  449.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  450.                 Debug-Output $(ThisInfFileName)" Cannot add hardware component"
  451.                 goto ShellCodeError
  452.             endif
  453.             set RegistryErrorIndex = $($R0)
  454.             Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  455.                 EndWait
  456.                 Debug-Output $(ThisInfFileName)" Registry error: add hardware component"
  457.                 Debug-Output $(ThisInfFileName)" Registry Error Index: "$(RegistryErrorIndex)
  458.                 CloseRegKey $($R1)
  459.                 CloseRegKey $($R2)
  460.                 CloseRegKey $($R3)
  461.                 goto fatalregistry
  462.             endif
  463.             set KeyAdapter = $($R1)
  464.             set KeyAdapterRules = $($R2)
  465.             set KeyAdapterParameters = $($R3)
  466.             set AdapterNumber = $($R4)
  467.             set NewValueList =  {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  468.                                 {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  469.                                 {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  470.                                 {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Name)},+
  471.                                 {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  472.                                 {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  473.             Debug-Output $(ThisInfFileName)" Adding H/W Component Value"
  474.             Shell  $(UtilityInf), AddValueList, $(KeyAdapter), $(NewValueList)
  475.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  476.                 Debug-Output $(ThisInfFileName)" ShellCode error"
  477.                 goto ShellCodeError
  478.             endif
  479.             Shell $(UtilityInf), GetBusTypeNum
  480.             set BusTypeNum = $($R1)
  481.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  482.                 Debug-Output $(ThisInfFileName)" ShellCode error."
  483.                 goto ShellCodeError
  484.             endif
  485.             set NewValueList = {+
  486.                                {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  487.                                {BusType,$(NoTitle),$(!REG_VT_DWORD),2},+
  488.                                {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  489.                                {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)},+
  490.                                {CardType,$(NoTitle),$(!REG_VT_DWORD),$(CardTypeValue)},+
  491.                                {TransmitQDepth,$(NoTitle),$(!REG_VT_DWORD),32},+
  492.                                {ReceiveBuffers,$(NoTitle),$(!REG_VT_DWORD),16},+
  493.                                {BurstSize,$(NoTitle),$(!REG_VT_DWORD),63}+
  494.                                }
  495.             Debug-Output $(ThisInfFileName)" Adding H/W Component parameters"
  496.             Shell  $(UtilityInf), AddValueList, $(KeyAdapterParameters), $(NewValueList)
  497.             CloseRegKey $(KeyParameters)
  498.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  499.                 Debug-Output $(ThisInfFileName)" ShellCode error."
  500.                 goto ShellCodeError
  501.             endif
  502.             set TempProdName = """"$(ProductHardware$(Option)Name)$(AdapterNumber)""""
  503.             set TempBindForm = $(TempProdName)$(NetRuleHardware$(Option)BindForm)
  504.             set NewValueList =  {+
  505.                                 {type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardware$(Option)Type)},+
  506.                                 {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)},+
  507.                                 {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardware$(Option)Class)},+
  508.                                 {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}+
  509.                                 }
  510.             Debug-Output $(ThisInfFileName)" Adding H/W Component rules"
  511.             Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  512.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  513.                 Debug-Output $(ThisInfFileName)" ShellCode error."
  514.                 goto ShellCodeError
  515.             endif
  516.             CloseRegKey $(KeyAdapter)
  517.             CloseRegKey $(KeyAdapterParameters)
  518.             CloseRegKey $(KeyAdapterRules)
  519.         else
  520.             Debug-Output $(ThisInfFileName)" Adapter already installed in Slot: "$(SlotNum)
  521.         endif
  522.     EndForListDo
  523.     goto writeparameters
  524. writeparameters = +
  525.     EndWait
  526.     goto successful
  527. bindingadapter =+
  528.     set Error = "Binding: Sorry, not yet implemented."
  529.     goto fatal
  530. removeadapter = +
  531.     Ifstr(i) $(ProductKeyC320NTName) == $(!NTN_RegBase)
  532.         Debug-Output $(ThisInfFileName)" removing S/W component C320NT"
  533.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  534.             $(ProductSoftwareC320NTName)
  535.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  536.             Debug-Output $(ThisInfFileName)" ShellCode error"
  537.             goto ShellCodeError
  538.         endif
  539.         set RegistryErrorIndex = $($R0)
  540.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  541.             goto fatalregistry
  542.         endif
  543.     else-Ifstr(i) $(ProductKeyC320TNTName) == $(!NTN_RegBase)
  544.         Debug-Output $(ThisInfFileName)" removing S/W component C320TNT"
  545.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  546.             $(ProductSoftwareC320TNTName)
  547.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  548.             Debug-Output $(ThisInfFileName)" ShellCode error"
  549.             goto ShellCodeError
  550.         endif
  551.         set RegistryErrorIndex = $($R0)
  552.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  553.             goto fatalregistry
  554.         endif
  555.     else
  556.         Debug-Output $(ThisInfFileName)" Opening NTN_RegBase = "$(!NTN_RegBase)
  557.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) NetAdapterKey
  558.         Ifstr $(NetAdapterKey) == $(KeyNull)
  559.             Debug-Output $(ThisInfFileName)" Could not open Adapter key"
  560.             goto fatalregistry
  561.         else
  562.             GetRegValue $(NetAdapterKey), "ServiceName", ServiceNameInfo
  563.             set ServiceName = *($(ServiceNameInfo), 4)
  564.             Debug-Output $(ThisInfFileName)" ServiceName in NTN_RegBase is "$(ServiceName)
  565.             GetRegValue $(NetAdapterKey), "ProductName", ProductNameInfo
  566.             set Option = *($(ProductNameInfo), 4)
  567.             Debug-Output $(ThisInfFileName)" ProductName in NTN_RegBase is "$(Option)
  568.             CloseRegKey $(NetAdapterKey)
  569.             ifstr(i) $(ServiceName) != ""
  570.                 Debug-Output $(ThisInfFileName)" Removing "$(Option)" H/W"
  571.                 Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  572.                     $(ProductSoftware$(Option)Name), $(!NTN_RegBase)
  573.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  574.                     Debug-Output $(ThisInfFileName)" ShellCode error"
  575.                     goto ShellCodeError
  576.                 endif
  577.                 set RegistryErrorIndex = $($R0)
  578.                 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  579.                     goto fatalregistry
  580.                 endif
  581.              endif
  582.         endif
  583.     endif
  584.     goto end
  585. UpgradeSoftware = +
  586.     ifstr(i) $(ProductKeyC320NTName) == $(!NTN_RegBase)
  587.         set Option = C320NT
  588.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyC320NTName) $(MAXIMUM_ALLOWED) KeyProduct
  589.         Ifstr $(KeyProduct) != $(KeyNull)
  590.             Debug-Output $(ThisInfFileName)" Upgrading C320NT S/W"
  591.             GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  592.             set Version = *($(VersionInfo), 4)
  593.             Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  594.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  595.                 Debug-Output $(ThisInfFileName)" ShellCode error"
  596.                 goto ShellCodeError
  597.             endif
  598.             set !UG_Filename = $($R0)
  599.             ifstr(i) $(!UG_Filename) != ""
  600.                 Debug-Output $(ThisInfFileName)" Copying C320NT sys & inf files for C320NT"
  601.                 install "Install-Update"
  602.                 ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  603.                     goto fatal
  604.                 endif
  605.             endif
  606.             SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  607.             SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  608.             ifint $(Version) != $(ProductVersion)
  609.             endif
  610.             CloseRegKey $(KeyProduct)
  611.         else
  612.             goto fatalregistry
  613.         endif
  614.     else-Ifstr(i) $(ProductKeyC320TNTName) == $(!NTN_RegBase)
  615.         set Option = C320TNT
  616.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyC320TNTName) $(MAXIMUM_ALLOWED) KeyProduct
  617.         Ifstr $(KeyProduct) != $(KeyNull)
  618.             Debug-Output $(ThisInfFileName)" Upgrading C320TNT S/W"
  619.             GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  620.             set Version = *($(VersionInfo), 4)
  621.             Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  622.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  623.                 Debug-Output $(ThisInfFileName)" ShellCode error"
  624.                 goto ShellCodeError
  625.             endif
  626.             set !UG_Filename = $($R0)
  627.             ifstr(i) $(!UG_Filename) != ""
  628.                 Debug-Output $(ThisInfFileName)" Copying C320TNT sys & inf files"
  629.                 install "Install-Update"
  630.                 ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  631.                     goto fatal
  632.                 endif
  633.             endif
  634.             SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  635.             SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  636.             ifint $(Version) != $(ProductVersion)
  637.             endif
  638.             CloseRegKey $(KeyProduct)
  639.         else
  640.             goto fatalregistry
  641.         endif
  642.     else
  643.         Debug-Output $(ThisInfFileName)" H/W upgrade requested, just make sure the H/W component exists"
  644.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) NetworkCardKey
  645.         Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  646.             GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  647.             set ServiceName = *($(ServiceNameInfo), 4)
  648.             OpenRegKey $(NetworkCardKey) "" "NetRules" $(MAXIMUM_ALLOWED) NetRuleKey
  649.             Ifstr(i) $(NetRuleKey) != $(KeyNull)
  650.             else
  651.                 goto fatalregistry
  652.             endif
  653.             CloseRegKey $(NetRules)
  654.             CloseRegKey $(NetworkCardKey)
  655.         else
  656.             goto fatalregistry
  657.         endif
  658.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ServiceName) +
  659.               $(MAXIMUM_ALLOWED) ServiceKey
  660.         Ifstr(i) $(ServiceKey) != $(KeyNull)
  661.             Debug-Output $(ThisInfFileName)" Service "$(ServiceName)" exists"
  662.             CloseRegKey $(ServiceKey)
  663.         else
  664.             goto fatalregistry
  665.         endif
  666.     endif
  667.     goto end
  668. successful = +
  669.     goto end
  670. abandon = +
  671.     ForListDo $(OEM_ABANDON_HW_OPTIONS)
  672.         Debug-Output $(ThisInfFileName)" H/W Abandon: Component: "*($($),1)" S/W Name: "*($($),2)
  673.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  674.             *($($),2), *($($),1)
  675.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  676.             Debug-Output $(ThisInfFileName)" ShellCode error"
  677.             goto ShellCodeError
  678.         endif
  679.         set RegistryErrorIndex = $($R0)
  680.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  681.             goto fatalregistry
  682.         endif
  683.     EndForListDo
  684.     ForListDo $(OEM_ABANDON_SW_OPTIONS)
  685.         Debug-Output $(ThisInfFileName)" S/W Abandon: Component: "$($)
  686.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  687.             $($), FALSE
  688.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  689.             Debug-Output $(ThisInfFileName)" ShellCode error"
  690.             goto ShellCodeError
  691.         endif
  692.         set RegistryErrorIndex = $($R0)
  693.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  694.             goto fatalregistry
  695.         endif
  696.     EndForListDo
  697.     goto end
  698. warning = +
  699.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  700.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  701.         goto ShellCodeError
  702.     endif
  703.     ifstr(i) $($R1) == "OK"
  704.         goto $(to)
  705.     else-ifstr(i) $($R1) == "CANCEL"
  706.         goto $(from)
  707.     else
  708.         goto "end"
  709.     endif
  710. nonfatalinfo = +
  711.     Set CommonStatus = STATUS_USERCANCEL
  712.     Set Severity = STATUS
  713.     goto nonfatalmsg
  714. nonfatal = +
  715.     Set Severity = NONFATAL
  716.     goto nonfatalmsg
  717. nonfatalmsg = +
  718.     ifstr(i) $(Error) == ""
  719.         Set Severity = NONFATAL
  720.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  721.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  722.             goto ShellCodeError
  723.         endif
  724.         set Error = $($R0)
  725.     endif
  726.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  727.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  728.         goto ShellCodeError
  729.     endif
  730.     ifstr(i) $($R1) == "OK"
  731.         goto $(from)
  732.     else
  733.         goto "end"
  734.     endif
  735. fatalregistry = +
  736.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  737.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  738.         goto ShellCodeError
  739.     endif
  740.     set Error = $($R0)
  741.     goto fatal
  742. fatal = +
  743.     ifstr(i) $(Error) == ""
  744.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  745.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  746.             goto ShellCodeError
  747.         endif
  748.         set Error = $($R0)
  749.     endif
  750.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  751.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  752.         goto ShellCodeError
  753.     endif
  754.     goto setfailed
  755. ShellCodeError = +
  756.     set DlgType      = "MessageBox"
  757.     set STF_MB_TITLE = "Error: "$(FunctionTitle)
  758.     set STF_MB_TEXT  = "Shell Code Error"
  759.     set STF_MB_TYPE  = 1
  760.     set STF_MB_ICON  = 3
  761.     set STF_MB_DEF   = 1
  762.     ui start "Error Message"
  763.     goto setfailed
  764. setfailed = +
  765.     set CommonStatus = STATUS_FAILED
  766.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  767.         set OEM_ABANDON_ON = FALSE
  768.         goto abandon
  769.     endif
  770.     goto end
  771. end = +
  772.     goto term
  773. term = +
  774.     Return $(CommonStatus)
  775. [Install-Option]
  776.     set STF_VITAL = ""
  777.     ifstr(i) $(AddCopy) == "YES"
  778.         AddSectionFilesToCopyList Files-C320TNT $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  779.     endif
  780.     ifstr(i) $(DoCopy) == "YES"
  781.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  782.        CopyFilesInCopyList
  783.     endif
  784.     ifstr(i) $(DoConfig) == "YES"
  785.     endif
  786.     Exit
  787. [Install-Update]
  788.    set STF_VITAL        = ""
  789.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  790.    AddSectionFilesToCopyList Files-C320TNT $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  791.    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  792.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  793.    CopyFilesInCopyList
  794.    exit
  795. [Source Media Descriptions]
  796.     1  = "Cisco EISA Driver Disk" 
  797.     2  = "Windows NT Setup CD-ROM Disk"  
  798.     99  = "LMHOST disk"
  799. [ProductType]
  800. STF_PRODUCT  = Winnt
  801. STF_PLATFORM = ALPHA
  802. [Files-Inf]
  803. 1,oemsetup.inf,    SIZE=1000, RENAME=$(!UG_Filename)
  804. [Files-C320NT]
  805. 1,c320nt.sys , SIZE=46000
  806. [Files-C320TNT]
  807. 1,c320tnt.sys, SIZE=47000
  808.  
  809.  
  810.  
  811.