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

  1. ;
  2. ; OEMSETUP FILE FOR Cogent eMASTER+ 960 PCI Etherner Adapters
  3. ;
  4. ;
  5. ; Usage:
  6. ;
  7. ;     This file is the installation/configuration/deinstallation
  8. ;     procedure of the Cogent EM960 PCI driver for Windows NT.  It can be
  9. ;     called from Windows Setup directly, or via the Windows NT Networks
  10. ;     Control Program Applet (NCPA) from inside the Windoss
  11. ;     Control Panel.
  12. ;
  13. ;------------------------------------------------------------------------
  14.  
  15.  
  16. [Identification]
  17.     OptionType = NetAdapter
  18.  
  19.  
  20. [PlatformsSupported]
  21.     ISA
  22.     EISA
  23.     "Jazz-Internal Bus"
  24.     PCI
  25.  
  26.  
  27. [Options]
  28.     EM960
  29.  
  30.  
  31. [NoChoices]
  32.     No_0 = "",0
  33.  
  34.  
  35. [ConnectionChoicesEM960]
  36.     Connect_0 = "AUTOSENSE" , 0
  37.     Connect_1 = "THICK/THIN" , 1
  38.     Connect_2 = "UTP" , 2
  39.     Connect_3 = "UTP/Full Duplex" , 3
  40.     Connect_4 = "UTP/Link Disabled" , 4
  41.  
  42.  
  43. [FileConstants]
  44. UtilityInf      = "UTILITY.INF"
  45. subroutineinf   = "SUBROUTN.INF"
  46. SoftwareType    = "driver"
  47. Exit_Code       = 0
  48. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  49. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  50.  
  51. Manufacturer    = "Cogent"
  52.  
  53. FloppyDir = "A:\WINNT"
  54.  
  55. ProductMajorVersion     = "1"
  56. ProductMinorVersion     = "0"
  57. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  58.  
  59. ProductSoftwareName     = "EM960"
  60. ProductSoftwareTitle    = "Cogent EM960 Adapter Driver"
  61. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\EM960.sys"
  62. NetRuleSoftwareType     = "EM960Sys ndisDriver EM960Driver"
  63. NetRuleSoftwareUse      = $(SoftwareType)
  64. NetRuleSoftwareBindForm = """EM960Sys"" yes no container"
  65. NetRuleSoftwareClass    = {"EM960Driver basic"}
  66. NetRuleSoftwareEM960Bindable = {"EM960Driver EM960Adapter non exclusive 100"}
  67.  
  68. OptionHelpFile = "em960.hlp"
  69.  
  70. ProductHardwareName     = "EM960"
  71. ProductHardwareEM960Title       = "Cogent EM960 PCI Adapter"
  72. NetRuleHardwareEM960Type     = "EM960 EM960Adapter"
  73. NetRuleHardwareBindForm = " yes yes container"
  74. NetRuleHardwareEM960Class    = {"EM960Adapter basic"}
  75. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  76. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  77. AdapterEM960Type = 5  ;; PCI board
  78. HelpEM960Id = 1
  79.  
  80.  
  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.  
  99.  
  100. [date]
  101.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  102.  
  103.  
  104. [Identify]
  105.     read-syms Identification
  106.     set Status     = STATUS_SUCCESSFUL
  107.     set Identifier = $(OptionType)
  108.     set Media      = #("Source Media Descriptions", 1, 1)
  109.     Return $(Status) $(Identifier) $(Media)
  110.  
  111.  
  112. [ReturnOptions]
  113.     set Status        = STATUS_FAILED
  114.     set OptionList     = {}
  115.     set OptionTextList = {}
  116.     set LanguageList = ^(LanguagesSupported, 1)
  117.     Ifcontains(i) $($0) in $(LanguageList)
  118.         ifstr(i) $($1) == ""
  119.            goto returnoptions
  120.         endif
  121.         set PlatformList = ^(PlatformsSupported, 1)
  122.         Ifcontains(i) $($1) in $(PlatformList)
  123.            goto returnoptions
  124.         else
  125.            set Status = STATUS_NOTSUPPORTED
  126.            goto finish_ReturnOptions
  127.         endif
  128.     else
  129.         set Status = STATUS_NOLANGUAGE
  130.         goto finish_ReturnOptions
  131.     endif
  132.  
  133. returnoptions = +
  134.     set OptionList     = ^(Options, 1)
  135.     set OptionTextList = ^(OptionsText$($0), 1)
  136.     set Status         = STATUS_SUCCESSFUL
  137.  
  138. finish_ReturnOptions = +
  139.     Return $(Status) $(OptionList) $(OptionTextList)
  140.  
  141.  
  142. [InstallOption]
  143.     set Option   = $($1)
  144.     set SrcDir   = $($2)
  145.     set AddCopy  = $($3)
  146.     set DoCopy   = $($4)
  147.     set DoConfig = $($5)
  148.     set LanguageList = ^(LanguagesSupported, 1)
  149.  
  150.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  151.         Return STATUS_NOLANGUAGE
  152.     endif
  153.  
  154.     set-subst LF = "\n"
  155.     read-syms GeneralConstants
  156.     read-syms FileConstants
  157.     set NetRuleSoftwareBindable = $($R1)
  158.     read-syms DialogConstants$(!STF_LANGUAGE)
  159.     ifstr(i) $(!NTN_Origination) == "NCPA"
  160.         set Continue = "OK"
  161.     endif
  162.     read-syms FileConstants$(!STF_LANGUAGE)
  163.     detect date
  164.     set-title  $(Function$(Option)Title)
  165.     set to   = Begin
  166.     set from = Begin
  167.     set CommonStatus = STATUS_SUCCESSFUL
  168.  
  169.     set HlpDir = $(!STF_WINDOWSSYSPATH)
  170.     Ifstr(i) $(!STF_SRCDIR_OVERRIDE) != ""  
  171.        set HlpDir = $(SrcDir)
  172.     endif
  173.  
  174.    ;Set !DebugOutputControl = 1
  175.  
  176.    Debug-Output $(InfName)": STF_CWDDIR   is: "$(!STF_CWDDIR)
  177.    Debug-Output $(InfName)": STF_LANGUAGE is: "$(!STF_LANGUAGE)
  178.    Debug-Output $(InfName)": Option       is: "$(Option)
  179.    Debug-Output $(InfName)": SrcDir       is: "$(SrcDir)
  180.    Debug-Output $(InfName)": AddCopy      is: "$(AddCopy)
  181.    Debug-Output $(InfName)": DoCopy       is: "$(DoCopy)
  182.    Debug-Output $(InfName)": DoConfig     is: "$(DoConfig)
  183.    Debug-Output $(InfName)": SYSPATH      is: "$(!STF_WINDOWSSYSPATH)
  184.    Debug-Output $(InfName)": STF_SRCDIR   is: "$(!STF_SRCDIR)
  185.    Debug-Output $(InfName)": STF_SRCDIR_OVERRIDE   is: "$(!STF_SRCDIR_OVERRIDE)
  186.  
  187.     EndWait
  188.  
  189. Begin = +
  190.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  191.         set StartLabel = removeadapter
  192.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  193.         set StartLabel = UpgradeSoftware
  194.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  195.         set StartLabel = bindingadapter
  196.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  197. ;;        set CommonStatus = STATUS_REBOOT
  198.           Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  199.                Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  200.                ifint $($ShellCode) != $(!SHELL_CODE_OK)
  201.                      goto ShellCodeError
  202.                endif
  203.                set Error = $($R0)
  204.                set from = end
  205.                set to = end
  206.                goto nonfatalinfo
  207.           else
  208.                set StartLabel = configureadapter
  209.           endif
  210.    else
  211.         set StartLabel = installadapter
  212.         set OEM_ABANDON_OPTIONS = {}
  213.         set OEM_ABANDON_SOFTWARE = FALSE
  214.         set OEM_ABANDON_ON = TRUE
  215.     endif
  216.     set from = $(fatal)
  217.     set to = $(fatal)
  218.     goto $(StartLabel)
  219.  
  220. installadapter = +
  221.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  222.     Ifstr $(KeyProduct) != $(KeyNull)
  223.         CloseRegKey $(KeyProduct)
  224.         ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  225.            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  226.                $(ProductVersion)
  227.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  228.                goto ShellCodeError
  229.            endif
  230.            goto end
  231.         else
  232.            Shell $(UtilityInf), CardExistedDlg
  233.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  234.               goto ShellCodeError
  235.            endif
  236.            ifstr(i) $($R1) != "OK"
  237.                set CommonStatus = STATUS_USERCANCEL
  238.                goto end
  239.            endif
  240.            set OldVersionExisted = $(TRUE)
  241.         endif
  242.     Endif
  243. ;    install "Install-Hlp"
  244.     Goto adapteroptions
  245.  
  246. configureadapter = +
  247.    Ifstr(i) $(KeyProduct) == $(KeyNull)
  248.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  249.         Ifstr $(KeyProduct) == $(KeyNull)
  250.             Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  251.            Goto fatalregistry
  252.         Endif
  253.     Endif
  254.     Shell $(UtilityInf) FindService, $(KeyProduct)
  255.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  256.         Goto ShellCodeError
  257.     Endif
  258.     Ifstr(i) $($R0) != NO_ERROR
  259.         Goto fatalregistry
  260.     endif
  261.     set KeyParameters = $($R2)
  262.     CloseRegKey $($R1)
  263.     Ifstr $(KeyParameters) == $(KeyNull)
  264.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  265.         goto fatalregistry
  266.     endif
  267.     set OldVersionExisted = $(TRUE)
  268.     set ValueName = ""
  269.     set ValueData = ""
  270.     set ValueStr  = ""
  271.     set ValueList = {}
  272.     EnumRegValue $(KeyParameters) ValueList
  273.     ForListDo $(ValueList)
  274.         set ValueItem = $($)
  275.         set ValueName = *($(ValueItem),1)
  276.         set ValueData = *($(ValueItem),4)
  277.         Ifstr(i) $(ValueName) == "ConnectionType"
  278.             set ConnectionIndex = $(ValueData)
  279.         endif
  280.     EndForListDo
  281.     set ConnectionValue = *($(ConnectionList), ~($(ConnectionValues),$(ConnectionIndex)))
  282.     ifstr(i) $(ConnectionValue) == ""
  283.         set ConnectionValue = *($(ConnectionList), 2)
  284.     endif
  285.  
  286. adapteroptions = +
  287.     set from = adapteroptions
  288.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  289.  
  290.     SetHelpFile $(HlpDir)"\"$(OptionHelpFile) $(MinHelpId) $(MaxHelpId) $(Help$(Option)Id)
  291.  
  292.     ui start "InputDlg"
  293.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  294.        set ConnectionIndex = $(Combo1Out)
  295.        ui pop 1
  296.     else-ifstr(i) $(DLGEVENT) == "BACK"
  297.        set CommonStatus = STATUS_USERCANCEL
  298.        ui pop 1
  299.        goto end
  300.     else
  301.        ui pop 1
  302.        goto end
  303.     endif
  304.  
  305.     set ConnectionValue = *($(ConnectionValues), ~($(ConnectionList),$(ConnectionIndex)))
  306.  
  307.     ifstr(i) $(!NTN_InstallMode) == configure
  308.        goto updateparameters
  309.     endif
  310.  
  311.  
  312. installproduct =+
  313.    StartWait
  314.     set AdapterList = $($R1)
  315.     ifint $(OldVersionExisted) == $(FALSE)
  316.         Ifstr(i) $(DoCopy) == "YES"
  317.            Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  318.            Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  319.                Goto ShellCodeError
  320.            Else-Ifstr(i) $($R0) == STATUS_FAILED
  321.                Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  322.                ifint $($ShellCode) != $(!SHELL_CODE_OK)
  323.                   goto ShellCodeError
  324.                endif
  325.                set Error = $($R0)
  326.                Goto fatal
  327.            Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  328.                Goto successful
  329.            Endif
  330.            Set SrcDir = $($R1)
  331.         Endif
  332.         install "Install-Option"
  333.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  334.            Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  335.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  336.                goto ShellCodeError
  337.            endif
  338.            set Error = $($R0)
  339.            goto fatal
  340.         endif
  341.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  342.             $(ProductSoftwareName), +
  343.             $(ProductSoftwareName), +
  344.             $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  345.             $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  346.             $(NetEventDLL)
  347.         Set OEM_ABANDON_SOFTWARE = TRUE
  348.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  349.             goto ShellCodeError
  350.         endif
  351.         set RegistryErrorIndex = $($R0)
  352.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  353.             EndWait
  354.             CloseRegKey $($R1)
  355.             CloseRegKey $($R2)
  356.             CloseRegKey $($R3)
  357.             CloseRegKey $($R4)
  358.             CloseRegKey $($R5)
  359.             goto fatalregistry
  360.         endif
  361.         Set SoftProductKey      = $($R1)
  362.         Set SoftNetRuleKey      = $($R2)
  363.         Set SoftServiceKey      = $($R3)
  364.         Set SoftParameterKey    = $($R4)
  365.         Set SoftLinkageKey      = $($R5)
  366.  
  367.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  368.                            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  369.                            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  370.                            {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  371.                            {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  372.                            {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  373.                            {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  374.         Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  375.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  376.             goto ShellCodeError
  377.         endif
  378.         set RegistryErrorIndex = $($R0)
  379.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  380.             EndWait
  381.             CloseRegKey $(SoftProductKey)
  382.             CloseRegKey $(SoftNetRuleKey)
  383.             CloseRegKey $(SoftServiceKey)
  384.             CloseRegKey $(SoftParameterKey)
  385.             CloseRegKey $(SoftLinkageKey)
  386.             goto fatalregistry
  387.         endif
  388.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  389.                             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  390.                             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  391.                             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  392.                             {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftware$(Option)Bindable)}, +
  393.                             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  394.         Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  395.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  396.             goto ShellCodeError
  397.         endif
  398.         set RegistryErrorIndex = $($R0)
  399.         CloseRegKey $(SoftProductKey)
  400.         CloseRegKey $(SoftNetRuleKey)
  401.         CloseRegKey $(SoftServiceKey)
  402.         CloseRegKey $(SoftParameterKey)
  403.         CloseRegKey $(SoftLinkageKey)
  404.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  405.             EndWait
  406.             goto fatalregistry
  407.         endif
  408.     endif
  409.  
  410.     ForListDo $(AdapterList)
  411.         set BusNum = *($($),1)
  412.         Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNum), +
  413.             $(ProductHardware$(Option)Description), $(ProductHardwareName)
  414.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  415.             goto ShellCodeError
  416.         endif
  417.         ifstr $($R0) != "NO_ERROR"
  418.             set Error = $($R0)
  419.             goto fatal
  420.         endif
  421.         ifstr(i) $($R1) != "YES"
  422.                 Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  423.                 ifint $($R4) != -1
  424.                     Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  425.                 endif
  426.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  427.                     goto ShellCodeError
  428.                 endif
  429.                 set RegistryErrorIndex = $($R0)
  430.                 Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  431.                     EndWait
  432.                     CloseRegKey $($R1)
  433.                     CloseRegKey $($R2)
  434.                     CloseRegKey $($R3)
  435.                     goto fatalregistry
  436.                 endif
  437.                 Set HardNetCardKey      = $($R1)
  438.                 Set HardNetRuleKey      = $($R2)
  439.                 Set HardParameterKey    = $($R3)
  440.                 set AdapterNumber = $($R4)
  441.                 set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  442.                                    {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  443.                                    {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  444.                                    {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  445.                                    {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  446.                                    {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  447.                 Shell  $(UtilityInf), AddValueList, $(HardNetCardKey), $(NewValueList)
  448.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  449.                     goto ShellCodeError
  450.                 endif
  451. ;;                Shell $(UtilityInf), GetBusTypeNum
  452. ;;                set BusTypeNum = $($R1)
  453. ;;                ifint $($ShellCode) != $(!SHELL_CODE_OK)
  454. ;;                      goto ShellCodeError
  455. ;;                endif
  456.                 set BusTypeNum = 5
  457.                 set CRC = 1
  458.                 set DisablePosting = 1
  459.                       set NewValueList = {{AdapterType,$(NoTitle),$(!REG_VT_DWORD),$(Adapter$(Option)Type)},+
  460.                                          {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  461.                                          {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  462.                                          {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  463.                                          {SoftwareCRC,$(NoTitle),$(!REG_VT_DWORD),$(CRC)},+
  464.                                          {DisableHPPE,$(NoTitle),$(!REG_VT_DWORD),$(DisablePosting)},+
  465.                                          {ConnectionType,$(NoTitle),$(!REG_VT_DWORD),$(ConnectionValue)}}
  466.  
  467.                 Shell  $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  468.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  469.                     goto ShellCodeError
  470.                 endif
  471.  
  472.                 set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  473.                 set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  474.                 set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardware$(Option)Type)},+
  475.                                     {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  476.                                     {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardware$(Option)Class)}, +
  477.                                     {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  478.                 Shell  $(UtilityInf), AddValueList, $(HardNetRuleKey), $(NewValueList)
  479.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  480.                     goto ShellCodeError
  481.                 endif
  482.                 CloseRegKey $(HardNetCardKey)
  483.                 CloseRegKey $(HardNetRuleKey)
  484.                 CloseRegKey $(HardParameterKey)
  485.         endif
  486.     EndForListDo
  487.     EndWait
  488.      goto successful
  489.  
  490. updateparameters =+
  491.      set HardParameterKey    = $($R3)
  492.      set NewValueList = {+
  493.                         {ConnectionType,$(NoTitle),$(!REG_VT_DWORD),$(ConnectionValue)}}
  494.      Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  495.      ifint $($ShellCode) != $(!SHELL_CODE_OK)
  496.          goto ShellCodeError
  497.      endif
  498.      CloseRegKey $(KeyParameters)
  499.      goto successful
  500.  
  501. bindingadapter =+
  502.     set Error = "Binding: Sorry, not yet implemented."
  503.     goto fatal
  504.  
  505. removeadapter = +
  506.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  507.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  508.             $(ProductSoftwareName)
  509.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  510.             goto ShellCodeError
  511.         endif
  512.         set RegistryErrorIndex = $($R0)
  513.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  514.             goto fatalregistry
  515.         endif
  516.     else
  517.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  518.             $(ProductSoftwareName), $(!NTN_RegBase)
  519.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  520.             goto ShellCodeError
  521.         endif
  522.         set RegistryErrorIndex = $($R0)
  523.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  524.             goto fatalregistry
  525.         endif
  526.     endif
  527.     goto end
  528.  
  529. UpgradeSoftware = +
  530.     ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  531.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  532.         Ifstr $(KeyProduct) != $(KeyNull)
  533.             GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  534.             set Version = *($(VersionInfo), 4)
  535.             Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  536.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  537.                 goto ShellCodeError
  538.             endif
  539.             set !UG_Filename = $($R0)
  540.             ifstr(i) $(!UG_Filename) != ""
  541.                 install "Install-Update"
  542.                 ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  543.                     goto fatal
  544.                 endif
  545.             endif
  546.             SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  547.             SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$( roductMinorVersion)}
  548.             ifint $(Version) != $(ProductVersion)
  549.             endif
  550.             CloseRegKey $(KeyProduct)
  551.         else
  552.             goto fatalregistry
  553.         endif
  554.     else
  555.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
  556.               $(MAXIMUM_ALLOWED) NetworkCardKey
  557.         Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  558.             GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  559.             set ServiceName = *($(ServiceNameInfo), 4)
  560.             OpenRegKey $(NetworkCardKey) "" "NetRules" +
  561.                 $(MAXIMUM_ALLOWED) NetRuleKey
  562.             Ifstr(i) $(NetRuleKey) != $(KeyNull)
  563.             else
  564.                 goto fatalregistry
  565.             endif
  566.             CloseRegKey $(NetRules)
  567.             CloseRegKey $(NetworkCardKey)
  568.         else
  569.             goto fatalregistry
  570.         endif
  571.         OpenRegKey $(!REG_H_LOCAL) "" +
  572.               $(!NTN_ServiceBase)"\"$(ServiceName) +
  573.               $(MAXIMUM_ALLOWED) ServiceKey
  574.         Ifstr(i) $(ServiceKey) != $(KeyNull)
  575.             CloseRegKey $(ServiceKey)
  576.         else
  577.             goto fatalregistry
  578.         endif
  579.     endif
  580.     goto end
  581. successful = +
  582.     goto end
  583.  
  584. abandon = +
  585.     ForListDo $(OEM_ABANDON_OPTIONS)
  586.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  587.             $(ProductSoftwareName), $($)
  588.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  589.             goto ShellCodeError
  590.         endif
  591.         set RegistryErrorIndex = $($R0)
  592.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  593.             goto fatalregistry
  594.         endif
  595.     EndForListDo
  596.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  597.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  598.             $(ProductSoftwareName), FALSE
  599.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  600.             goto ShellCodeError
  601.         endif
  602.         set RegistryErrorIndex = $($R0)
  603.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  604.             goto fatalregistry
  605.         endif
  606.     endif
  607.     goto end
  608.  
  609. warning = +
  610.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  611.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  612.         goto ShellCodeError
  613.     endif
  614.     ifstr(i) $($R1) == "OK"
  615.         goto $(to)
  616.     else-ifstr(i) $($R1) == "CANCEL"
  617.         goto $(from)
  618.     else
  619.         goto "end"
  620.     endif
  621.  
  622. nonfatalinfo = +
  623.     Set CommonStatus = STATUS_USERCANCEL
  624.     Set Severity = STATUS
  625.     goto nonfatalmsg
  626.  
  627. nonfatal = +
  628.     Set Severity = NONFATAL
  629.     goto nonfatalmsg
  630.  
  631. nonfatalmsg = +
  632.     ifstr(i) $(Error) == ""
  633.         Set Severity = NONFATAL
  634.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  635.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  636.             goto ShellCodeError
  637.         endif
  638.         set Error = $($R0)
  639.     endif
  640.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  641.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  642.         goto ShellCodeError
  643.     endif
  644.     ifstr(i) $($R1) == "OK"
  645.         goto $(from)
  646.     else
  647.         goto "end"
  648.     endif
  649.  
  650. fatalregistry = +
  651.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  652.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  653.         goto ShellCodeError
  654.     endif
  655.     set Error = $($R0)
  656.     goto fatal
  657.  
  658. fatal = +
  659.     ifstr(i) $(Error) == ""
  660.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  661.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  662.             goto ShellCodeError
  663.         endif
  664.         set Error = $($R0)
  665.     endif
  666.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  667.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  668.         goto ShellCodeError
  669.     endif
  670.     goto setfailed
  671.  
  672. ShellCodeError = +
  673.     set DlgType      = "MessageBox"
  674.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  675.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  676.     set STF_MB_TYPE  = 1
  677.     set STF_MB_ICON  = 3
  678.     set STF_MB_DEF   = 1
  679.     ui start "Error Message"
  680.     goto setfailed
  681.  
  682. setfailed = +
  683.     set CommonStatus = STATUS_FAILED
  684.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  685.         set OEM_ABANDON_ON = FALSE
  686.         goto abandon
  687.     endif
  688.     goto end
  689.  
  690. end = +
  691.     goto term
  692.  
  693. term = +
  694.     Return $(CommonStatus)
  695.  
  696.  
  697. [Install-Option]
  698.     set STF_VITAL = ""
  699.     ifstr(i) $(AddCopy) == "YES"
  700.         AddSectionFilesToCopyList Files-Hlp $(SrcDir) $(!STF_WINDOWSSYSPATH)
  701.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  702.     endif
  703.     ifstr(i) $(DoCopy) == "YES"
  704.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  705.        CopyFilesInCopyList
  706.     endif
  707.     ifstr(i) $(DoConfig) == "YES"
  708.     endif
  709.     Exit
  710.  
  711. [Install-Hlp]
  712.    set STF_VITAL = ""
  713.    AddSectionFilesToCopyList Files-Hlp $(SrcDir) $(!STF_WINDOWSSYSPATH)
  714.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  715.    CopyFilesInCopyList
  716.    Exit
  717.  
  718. [Install-Update]
  719.    set STF_VITAL        = ""
  720.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  721.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  722.    AddSectionFilesToCopyList Files-Hlp $(SrcDir) $(!STF_WINDOWSSYSPATH)
  723.    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  724.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  725.    CopyFilesInCopyList
  726.    exit
  727.  
  728.  
  729. [Source Media Descriptions]
  730.    1  = "Cogent eMASTER+ EM960 PCI Driver Disk"
  731.  
  732.  
  733. [ProductType]
  734. STF_PRODUCT  = Winnt
  735. STF_PLATFORM = I386
  736.  
  737.  
  738. [Files-Inf]
  739. 1,      oemsetup.inf,    SIZE=1000,     RENAME=$(!UG_Filename)
  740.  
  741. [Files-Hlp]
  742. 1, em960.hlp , SIZE=88888
  743.  
  744. [Files-EM960]
  745. 1, EM960.SYS , SIZE=88888
  746.  
  747.  
  748. [LanguagesSupported]
  749.     ENG
  750.  
  751.  
  752. [OptionsTextENG]
  753.     EM960    = "Cogent eMASTER+ 960 PCI Adapter"
  754.  
  755.  
  756. [FileConstantsENG]
  757. ProCaption   = "Windows NT Setup"
  758. ProCancel    = "Cancel"
  759. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  760.                "Are you sure you want to cancel copying files?"
  761. ProCancelCap = "Network Setup Message"
  762. ProText1     = "Copying:"
  763. ProText2     = "To:"
  764.  
  765. ProductSoftwareDescription        = "Cogent EM960 PCI Adapter Driver"
  766. ProductHardwareEM960Description    = "Cogent EM960 PCI Adapter"
  767.  
  768. FunctionTitleEM960   = "Cogent eMASTER+ 960 PCI Adapter Setup"
  769.  
  770. ConnectionList  = ^(ConnectionChoices$(Option), 1)
  771. ConnectionValues = ^(ConnectionChoices$(Option), 2)
  772. NoList  = ^(NoChoices, 1)
  773. NoValues = ^(NoChoices, 2)
  774. ShellCodeErrorTitle     = "Error: "$(FunctionTitle)
  775. ShellCodeErrorText      = "Shell Code Error."
  776. CANNOT_FIND_ANY_CARD            = "Network card is not present in the system"
  777.  
  778.  
  779. [DialogConstantsENG]
  780. Help        = "&Help"
  781. Exit        = "Cancel"
  782. OK          = "OK"
  783. HelpContext = ""
  784. Continue    = "Continue"
  785. Cancel      = "Cancel"
  786.  
  787.  
  788. [FileDependentDlgENG]
  789. Caption = $(FunctionTitle$(Option))
  790. DlgText     = "Please choose the proper cable type for your "+
  791.               "network adapter.  AutoSense will detect the cable "+
  792.               "type of the adapter if there is a cable connection."
  793. DlgTemplate = "ADAP_PROTO_COMBO"
  794. DlgType = "Combination"
  795. Combo1Label = "&Connection Type:"
  796. Combo1List = $(ConnectionList)
  797. Combo1Out  = $(ConnectionValue)
  798. ComboListItemsIn  = {Combo1List}
  799. ComboListItemsOut = {Combo1Out}
  800. EditTextLim = ""
  801. CBOptionsGreyed = {}
  802. MinHelpId = 1
  803. MaxHelpId = 6
  804. HelpContext = $(Help$(Option)Id)
  805.  
  806.