home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2000 September / VPR0009B.BIN / DRIVER / MELCO / LCI2T_ / lci2t_.exe / WINNT / OEMSETUP.INF < prev    next >
INI File  |  2000-03-17  |  43KB  |  1,132 lines

  1. ;********************************************************************
  2. ;
  3. ;   MELCO LCI2-T Ethernet Adapter OEMSETUP.INF file
  4. ;
  5. ;********************************************************************
  6.  
  7. [Identification]
  8.     OptionType = NetAdapter
  9.  
  10. [PlatformsSupported]
  11.     PCI
  12.  
  13. [Options]
  14.     PCINT
  15.  
  16. [FileConstants]
  17.     UtilityInf                  = "UTILITY.INF"
  18.     subroutineinf               = "SUBROUTN.INF"
  19.     SoftwareType                = "driver"
  20.     Exit_Code                   = 0
  21.     NetEventDLL                 = "%SystemRoot%\System32\netevent.dll;%SystemRoot%\System32\drivers\lci2t.sys"
  22.     IoLogMsgDLL                 = "%SystemRoot%\System32\IoLogMsg.dll"
  23.  
  24.     Manufacturer                = "MELCO INC."
  25.     ProductMajorVersion         = "1"
  26.     ProductMinorVersion         = "03"
  27.     ProductVersion              = $(ProductMajorVersion)"."$(ProductMinorVersion)
  28.     ProductSoftwareName         = "LCI2T"
  29.     ProductSoftwareImagePath    = "%SystemRoot%\System32\drivers\lci2t.sys"
  30.     NetRuleSoftwareType         = "pcintSys ndisDriver pcintDriver"
  31.     NetRuleSoftwareUse          = $(SoftwareType)
  32.     NetRuleSoftwareBindForm     = """pcintSys"" yes no container"
  33.     NetRuleSoftwareClass        = {"pcintDriver basic"}
  34.     NetRuleSoftwareBindable     = {"pcintDriver pcintAdapter non exclusive 100"}
  35.     ProductHardwareName         = "LCI2T"
  36.     NetRuleHardwareBindForm     = " yes yes container"
  37.  
  38.     ProductKeyName              = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  39.     ParamKeyName                = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  40.  
  41.     FunctionTitle               = "MELCO LCI2-T Ethernet Adapter Setup"
  42.     ProductSoftwareDescription  = "MELCO LCI2-T Ethernet Adapter Driver"
  43.     ProductSoftwareTitle        = "MELCO LCI2-T Ethernet Adapter Driver"
  44.  
  45.     ProductHardwarePCINTTitle   = "MELCO LCI2-T Ethernet Adapter"
  46.     ProductHardwarePCINTDescription = "MELCO LCI2-T Ethernet Adapter"
  47.     NetRuleHardwarePCINTType    = "pcint pcintAdapter"
  48.     NetRuleHardwarePCINTClass   = {"pcintAdapter basic"}
  49.  
  50.     AdapterPCINTType            = 5             ;; PCI board
  51.  
  52.     PCINTCFID                   = 2150174956    ;; 0x802910EC
  53.  
  54. [GeneralConstants]
  55.     from      = ""
  56.     to        = ""
  57.     ExitCodeOk     = 0
  58.     ExitCodeCancel = 1
  59.     ExitCodeFatal  = 2
  60.     KeyNull         = ""
  61.     MAXIMUM_ALLOWED   = 33554432
  62.     RegistryErrorIndex = NO_ERROR
  63.     KeyProduct      = ""
  64.     KeyParameters   = ""
  65.     TRUE            = 1
  66.     FALSE           = 0
  67.     NoTitle            = 0
  68.     ExitState   = "Active"
  69.     OldVersionExisted = $(FALSE)
  70.     DriverPath      = $(!STF_NTPATH)\drivers
  71.     NT350VersionConstant = "3.50"
  72.     NT310VersionConstant = "3.10"
  73.  
  74. [date]
  75.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  76.  
  77. ;
  78. ; The [Identify] section is the first section executed by Setup. It
  79. ; returns information to Setup about the type of drivers that can 
  80. ; be installed by this .INF file (in our case, network drivers).
  81. ;
  82. [Identify]
  83.     read-syms Identification
  84.     set Status     = STATUS_SUCCESSFUL
  85.     set Identifier = $(OptionType)
  86.     set Media      = #("Source Media Descriptions", 1, 1)
  87.     Return $(Status) $(Identifier) $(Media)
  88.  
  89. ;
  90. ; If the [Identify] section indicates that the .INF file supports
  91. ; the appropriate type of driver, Setup calls the [ReturnOptions]
  92. ; section.  Setup passes a single parameter to this section,
  93. ; indicating the language to be used for dialog strings.  This 
  94. ; section returns information to the Setup program, listing the
  95. ; names of any drivers which can be installed by this .INF file.
  96. ; It also returns the text strings for each driver to be used in 
  97. ; the dialog box asking the user to select the driver to install.
  98. ;
  99. [ReturnOptions]
  100.     ;
  101.     ; Initialize variables to failure state.
  102.     ;
  103.     set Status        = STATUS_FAILED
  104.     set OptionList     = {}
  105.     set OptionTextList = {}
  106.     
  107.     ;
  108.     ; See if our language list supports the language specified.
  109.     ; If a second parameter was passed in, see if it is a supported
  110.     ; platform.
  111.     ;
  112.     set LanguageList = ^(LanguagesSupported, 1)
  113.     Ifcontains(i) $($0) in $(LanguageList)
  114.     ifstr(i) $($1) == ""
  115.         goto returnoptions
  116.     endif
  117.         set PlatformList = ^(PlatformsSupported, 1)
  118.     Ifcontains(i) $($1) in $(PlatformList)
  119.         goto returnoptions
  120.     else
  121.         set Status = STATUS_NOTSUPPORTED
  122.         goto finish_ReturnOptions
  123.     endif
  124.     else
  125.         set Status = STATUS_NOLANGUAGE
  126.         goto finish_ReturnOptions
  127.     endif
  128.  
  129.     
  130.     ;
  131.     ; If we get here, we are successful, so return the option list.
  132.     ;
  133. returnoptions = +
  134.     set OptionList     = ^(Options, 1)
  135.     set OptionTextList = ^(OptionsText$($0), 1)
  136.     set Status         = STATUS_SUCCESSFUL
  137.  
  138.     ;
  139.     ; Exit from this section.
  140.     ;
  141. finish_ReturnOptions = +
  142.     Return $(Status) $(OptionList) $(OptionTextList)
  143.  
  144. ;
  145. ; If the [ReturnOptions] section returns successfully, indicating
  146. ; the language is supported, Setup displays a dialog box from which
  147. ; the user can select a driver to install.  Setup then calls the 
  148. ; [InstallOption] section, with the following parameters:
  149. ;
  150. ;       Language to use
  151. ;       OptionID to install
  152. ;       SourceDirectory
  153. ;       AddCopy  (yes/no)
  154. ;       DoCopy   (yes/no)
  155. ;       DoConfig (yes/no)
  156. ;
  157. ; ScrDir seems to always be A:\, even when you later install from
  158. ; the oemnad#.inf which is copied to the system32 directory.
  159. ;
  160. ; AddCopy and DoCopy are valid only when NTN_InstallMode = install.
  161. ; AddCopy is yes if the files should be added to the copy list.
  162. ; DoCopy is yes if CopyFilesInCopyList should be called.
  163. ;
  164. ; DoConfig is not used for network cards.
  165. ;
  166. ; This .INF file is automatically copied to the SYSTEM32 directory,
  167. ; by WinNT, and renamed so as to have a unique name.
  168. ;
  169. [InstallOption]
  170.     ;;;
  171.     ;;; Change "Set !G:DebugOutputControl=0" to 1 in NCAPSHEL.INF for debug support.
  172.     ;;;
  173.     ;;; set !G:DebugOutputControl=1     ;; Debug output {1=turned on, 0= turned off}
  174.  
  175.     ;
  176.     ; Read input parameters.
  177.     ;
  178.     set Option   = $($1)
  179.     set SrcDir   = $($2)
  180.     set AddCopy  = $($3)
  181.     set DoCopy   = $($4)
  182.     set DoConfig = $($5)
  183.     
  184.     ;
  185.     ; Check if specified language is supported.
  186.     ;
  187.     set LanguageList = ^(LanguagesSupported, 1)
  188.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  189.     Return STATUS_NOLANGUAGE
  190.     endif
  191.     
  192.     ;
  193.     ; Set up local variables and constant values.
  194.     ;
  195.     set-subst LF = "\n"
  196.     read-syms GeneralConstants
  197.     read-syms FileConstants
  198. ;   set NetRuleSoftwareBindable = $($R1)
  199.     read-syms DialogConstants$(!STF_LANGUAGE)
  200.     ifstr(i) $(!NTN_Origination) == "NCPA"
  201.     set Continue = "OK"
  202.     endif
  203.     read-syms FileConstants$(!STF_LANGUAGE)
  204.     ;; read-syms FileDependentDlg$(!STF_LANGUAGE)
  205.     ;; SetHelpFile $(!STF_WINDOWSSYSPATH)"\"$(OptionHelpFile) $(MinHelpId) $(MaxHelpId)
  206.     detect date
  207.     set-title  $(Function$(Option)Title)
  208.     set to   = Begin
  209.     set from = Begin
  210.     set CommonStatus = STATUS_SUCCESSFUL
  211.     EndWait
  212.  
  213.     ;; ;
  214.     ;; ; Problem was discovered using unattend.txt files for automatic
  215.     ;; ; installation.  It was found that $2 passed into this section does
  216.     ;; ; not have an appropriate value when using unattend.txt.  It was
  217.     ;; ; found that during manual AND unattended installations, the variable
  218.     ;; ; STF_SRCDIR_OVERRIDE did contain an appropriate value.
  219.     ;; ;
  220.     ;; ifstr(i) $(!STF_SRCDIR_OVERRIDE) != ""
  221.     ;;     set SrcDir = $(!STF_SRCDIR_OVERRIDE)
  222.     ;; endif
  223.  
  224. Begin = +
  225.  
  226.     ;;
  227.     ;; Get the Version of Windows NT we are installing on.  This will allow us to use the
  228.     ;; PCI Support that will be included in NT v3.51
  229.     ;;
  230.     set CurrentVersionValue = ""
  231.     OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows Nt\CurrentVersion" $(!REG_KEY_READ) KeyNt
  232.     Ifstr(i) $(KeyNt) != ""
  233.     GetRegValue $(KeyNt) "CurrentVersion" CurrentVersionValue
  234.     Debug-Output "$(InfFile) $(Option): WinNT CurrentVersion ="$(CurrentVersionValue)
  235.     CloseRegKey $(KeyNt)
  236.     Endif
  237.  
  238.     ifstr(i) (*($(CurrentVersionValue),4)) == $(NT310VersionConstant)    ;; NT v3.10 not supported!
  239.         Debug-Output "$(InfFile) $(Option): Configureadapter"
  240.     set Error = "Windows NT v3.10 is not support by this product"
  241.     goto fatal
  242.     endif
  243.  
  244. ;    set ActivateDetection = FALSE
  245.  
  246.     ;
  247.     ; NTN_InstallMode
  248.     ;   install   - this is a primary or original installation, it
  249.     ;               may be an upgrade
  250.     ;   deinstall - this product and its binaries are to be removed
  251.     ;               from the disk
  252.     ;   configure - this product is to be (re-) configured
  253.     ;   bind      - this product's relationships to other products
  254.     ;               have changed and should be reviewed. 
  255.     ;
  256.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  257.         set StartLabel = removeadapter
  258.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  259.         set StartLabel = UpgradeSoftware
  260.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  261.         set StartLabel = bindingadapter
  262.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  263.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  264.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  265.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  266.             goto ShellCodeError
  267.             endif
  268.             set Error = $($R0)
  269.             set from = end
  270.             set to = end
  271.             goto nonfatalinfo
  272.         else
  273.             set StartLabel = configureadapter
  274.         endif
  275.     else
  276.         set StartLabel = installadapter
  277.         set OEM_ABANDON_OPTIONS = {}
  278.         set OEM_ABANDON_SOFTWARE = FALSE
  279.         set OEM_ABANDON_ON = TRUE
  280.     endif
  281.  
  282.     ;; ;
  283.     ;; ; HARDWARE_PUT_IN_REGISTRY gets set to true once the hardware
  284.     ;; ; component is installed.  That way if we get an error we know
  285.     ;; ; to uninstall it.  HWList has the path to the hardware that
  286.     ;; ; is needed by RemoveHardwareComponent.
  287.     ;; ;
  288.     ;; ; SOFTWARE_PUT_IN_REGISTRY gets set to true once the software
  289.     ;; ; component is installed.
  290.     ;; ;
  291.     ;; set HARDWARE_PUT_IN_REGISTRY = $(FALSE)
  292.     ;; set HWList = ""
  293.     ;; set SOFTWARE_PUT_IN_REGISTRY = $(FALSE)
  294.  
  295.     Debug-Output "$(InfFile) $(Option): =================================================="
  296.     Debug-Output "$(InfFile) $(Option): STF_CWDIR is: "$(!STF_CWDIR)
  297.     Debug-Output "$(InfFile) $(Option): STF_SRCDIR is: "$(!STF_SRCDIR)
  298.     Debug-Output "$(InfFile) $(Option): STF_LANGUAGE is: "$(!STF_LANGUAGE)
  299.     Debug-Output "$(InfFile) $(Option): Option is: "$(Option)
  300.     Debug-Output "$(InfFile) $(Option): !STF_NCN_InstallMode is:"$(!NTN_InstallMode)
  301.     Debug-Output "$(InfFile) $(Option): !STF_NCDETECT  is: "$(!STF_NCDETECT)
  302.     Debug-Output "$(InfFile) $(Option): !STF_NCOPTION  is: "$(!STF_NCOPTION)
  303.     Debug-Output "$(InfFile) $(Option): !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  304.     Debug-Output "$(InfFile) $(Option): !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  305.     Debug-Output "$(InfFile) $(Option): !STF_GUI_UNATTENDED is: "$(!STF_GUI_UNATTENDED)
  306.     Debug-Output "$(InfFile) $(Option): !STF_BusType is $(!STF_BUSTYPE)"            ;; Primary Bus
  307.     Debug-Output "$(InfFile) $(Option): !STF_BusTypeList is $(!STF_BUSTYPELIST)"    ;; All Buses
  308.     Debug-Output "$(InfFile) $(Option): =================================================="
  309.  
  310.     set from = $(fatal)
  311.     set to = $(fatal)
  312.     goto $(StartLabel)
  313.  
  314. ;------------------------------------------------------------------------
  315. ; InstallMode = install
  316. ; Came here straight from figuring out which platform we are on.
  317. ; Option, SrcDir, AddCopy, DoCopy, and DoConfig are valid.
  318. ;
  319. installadapter = +
  320.  
  321.  
  322.     install "Install-Hlp"
  323.  
  324.     Debug-Output "$(InfFile) $(Option): Installadapter"
  325.     ;
  326.     ; Get open handle KeyProduct. 
  327.     ; Returns an empty string if key does not exist.
  328.     ;
  329.     ; NTN_RegBase appears empty on the installation of the first card.
  330.     ; KeyProduct will be KeyNull on the installation of the first card.
  331.     ;
  332.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  333.     Ifstr $(KeyProduct) != $(KeyNull)
  334.         CloseRegKey $(KeyProduct)
  335.         ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  336. ;           Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  337. ;              $(ProductVersion)
  338.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  339.                 Debug-Output "ShellCode error: cannot get an error string."
  340.                 goto ShellCodeError
  341.             endif
  342.             goto end
  343.         else
  344. ;           Shell $(UtilityInf), CardExistedDlg
  345. ;           ifint $($ShellCode) != $(!SHELL_CODE_OK)
  346. ;               Debug-Output "ShellCode error: cannot get an error string."
  347. ;               goto ShellCodeError
  348. ;           endif
  349. ;           ifstr(i) $($R1) != "OK"
  350. ;               set CommonStatus = STATUS_USERCANCEL
  351. ;               goto end
  352. ;           endif
  353.             set OldVersionExisted = $(TRUE)
  354.         endif
  355.     Endif
  356.  
  357.     Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  358.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  359.         Goto ShellCodeError
  360.     Else-Ifstr(i) $($R0) == STATUS_FAILED
  361.         Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  362.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  363.             goto ShellCodeError
  364.         endif
  365.         set Error = $($R0)
  366.         Goto fatal
  367.     Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  368.        Goto successful
  369.     Endif
  370.  
  371.     Set SrcDir = $($R1)
  372.  
  373.     ;; Goto adapteroptions
  374.     Goto installproduct
  375.  
  376. configureadapter = +
  377.     Debug-Output "$(InfFile) $(Option): Configureadapter"
  378.  
  379.    Ifstr(i) $(KeyProduct) == $(KeyNull)
  380.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  381.         Ifstr $(KeyProduct) == $(KeyNull)
  382.             Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  383.            Goto fatalregistry
  384.         Endif
  385.     Endif
  386.     Shell $(UtilityInf) FindService, $(KeyProduct)
  387.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  388.         Goto ShellCodeError
  389.     Endif
  390.     Ifstr(i) $($R0) != NO_ERROR
  391.         Goto fatalregistry
  392.     endif
  393.     set KeyParameters = $($R2)
  394.     CloseRegKey $($R1)
  395.     Ifstr $(KeyParameters) == $(KeyNull)
  396.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  397.         goto fatalregistry
  398.     endif
  399.     set OldVersionExisted = $(TRUE)
  400.     set ValueName = ""
  401.     set ValueData = ""
  402.     set ValueStr  = ""
  403.     set ValueList = {}
  404.     EnumRegValue $(KeyParameters) ValueList
  405.     ForListDo $(ValueList)
  406.         set ValueItem = $($)
  407.         set ValueName = *($(ValueItem),1)
  408.         set ValueData = *($(ValueItem),4)
  409.         Ifstr(i) $(ValueName) == "DuplexMode"
  410.             set DuplexModeIndex = $(ValueData)
  411.         endif
  412.     EndForListDo
  413.     set DuplexModeValue = *($(DuplexModeList), ~($(DuplexModeValues),$(DuplexModeIndex)))
  414.     ifstr(i) $(DuplexModeValue) == ""
  415.         set DuplexModeValue = *($(DuplexModeList), 1)
  416.     endif
  417. ;;;    set Error = "Cannot configure the software component"
  418. ;;;    goto fatal
  419.  
  420. adapteroptions = +
  421.     Debug-Output "$(InfFile) $(Option): Adapteroptions"
  422.     set from = adapteroptions
  423.  
  424.    read-syms FileDependentDlg$(!STF_LANGUAGE)
  425.    ;SetHelpFile $(!STF_WINDOWSSYSPATH)"\"$(OptionHelpFile) $(MinHelpId) $(MaxHelpId) $(Help$(Option)Id)
  426.  
  427.    SetHelpFile $(!STF_WINDOWSSYSPATH)"\"pcinthlp.hlp 10 1140 50
  428.    ui start "InputDlg"
  429.  
  430. ;   ifstr(i) $(DLGEVENT) == "CONTINUE"
  431. ;      set DuplexModeIndex = $(Combo1Out)
  432. ;      ui pop 1
  433. ;   else-ifstr(i) $(DLGEVENT) == "BACK"
  434. ;      set CommonStatus = STATUS_USERCANCEL
  435. ;      ui pop 1
  436. ;      goto end
  437. ;   else
  438. ;      ui pop 1
  439. ;      goto end
  440. ;   endif
  441.  
  442.    ifstr(i) $(DLGEVENT) == "CONTINUE"
  443.       set DuplexModeIndex = $(Combo1Out)
  444.       ui pop 1
  445.    else-ifstr(i) $(DLGEVENT) == "BACK"
  446.       set CommonStatus = STATUS_USERCANCEL
  447.       ui pop 1
  448.       goto end
  449.    else
  450.       ui pop 1
  451.       goto end
  452.    endif
  453.  
  454.    set DuplexModeValue = *($(DuplexModeValues), ~($(DuplexModeList),$(DuplexModeIndex)))
  455.     ifstr(i) $(!NTN_InstallMode) == configure
  456.        goto updateparameters
  457.     endif
  458.     ;; ifstr(i) $(!NTN_InstallMode) == configure
  459.     ;;    goto updateparameters
  460.     ;; endif
  461.  
  462. installproduct =+
  463.     Debug-Output "$(InfFile) $(Option): installproduct"
  464.     StartWait
  465.     set AdapterList = $($R1)
  466.     ifint $(OldVersionExisted) == $(FALSE)
  467.         Ifstr(i) $(DoCopy) == "YES"
  468.             Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  469.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  470.                 Goto ShellCodeError
  471.             Else-Ifstr(i) $($R0) == STATUS_FAILED
  472.                 Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  473.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  474.                     goto ShellCodeError
  475.                 endif
  476.                 set Error = $($R0)
  477.                 Goto fatal
  478.             Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  479.                 Goto successful
  480.             Endif
  481.             Set SrcDir = $($R1)
  482.         Endif
  483.         install "Install-Option"
  484.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  485.             Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  486.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  487.                 goto ShellCodeError
  488.             endif
  489.             set Error = $($R0)
  490.             goto fatal
  491.         endif
  492.     endif
  493.  
  494.     ;
  495.     ; Check to see if the Product Software key exists already in the system service keys
  496.     ; before we try to add the software component.
  497.     ;
  498.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ProductHardwareName) $(!REG_KEY_READ) KeyNt
  499.     CloseRegKey $(KeyNt)
  500.  
  501.     Ifstr(i) $(KeyNt) == ""
  502.         Debug-Output "$(InfFile) $(Option): AddSoftwareComponent"
  503.         Debug-Output "$(InfFile) $(Option): --> $(Manufacturer)"
  504.         Debug-Output "$(InfFile) $(Option): --> $(ProductSoftwareName)"
  505.         Debug-Output "$(InfFile) $(Option): --> $(ProductSoftwareTitle)"
  506.         Debug-Output "$(InfFile) $(Option): --> $(STF_CONTEXTINFNAME)"
  507.         Debug-Output "$(InfFile) $(Option): --> $(ProductSoftwareImagePath)"
  508.         Debug-Output "$(InfFile) $(Option): --> $(NetEventDLL)"
  509.  
  510.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  511.         $(ProductSoftwareName), +
  512.         $(ProductSoftwareName), +
  513.         $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  514.         $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  515.         $(NetEventDLL)
  516.  
  517.         Set OEM_ABANDON_SOFTWARE = TRUE
  518.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  519.             goto ShellCodeError
  520.         endif
  521.         set RegistryErrorIndex = $($R0)
  522.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  523.             EndWait
  524.             CloseRegKey $($R1)
  525.             CloseRegKey $($R2)
  526.             CloseRegKey $($R3)
  527.             CloseRegKey $($R4)
  528.             CloseRegKey $($R5)
  529.             goto fatalregistry
  530.         endif
  531.         Set SoftProductKey      = $($R1)
  532.         Set SoftNetRuleKey      = $($R2)
  533.         Set SoftServiceKey      = $($R3)
  534.         Set SoftParameterKey    = $($R4)
  535.         Set SoftLinkageKey      = $($R5)
  536.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  537.                {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  538.                {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  539.                {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  540.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  541.                {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  542.                {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  543.         Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  544.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  545.             goto ShellCodeError
  546.         endif
  547.         set RegistryErrorIndex = $($R0)
  548.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  549.             EndWait
  550.             CloseRegKey $(SoftProductKey)
  551.             CloseRegKey $(SoftNetRuleKey)
  552.             CloseRegKey $(SoftServiceKey)
  553.             CloseRegKey $(SoftParameterKey)
  554.             CloseRegKey $(SoftLinkageKey)
  555.             goto fatalregistry
  556.         endif
  557.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  558.                 {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  559.                 {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  560.                 {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  561.                 {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  562.                 {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  563.         Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  564.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  565.             goto ShellCodeError
  566.         endif
  567.         set RegistryErrorIndex = $($R0)
  568.         CloseRegKey $(SoftProductKey)
  569.         CloseRegKey $(SoftNetRuleKey)
  570.         CloseRegKey $(SoftServiceKey)
  571.         CloseRegKey $(SoftParameterKey)
  572.         CloseRegKey $(SoftLinkageKey)
  573.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  574.             EndWait
  575.             goto fatalregistry
  576.         endif
  577.     endif ;; Does Services\pcint exist?
  578.  
  579.     set NTDetected = $(FALSE)
  580.  
  581.         Debug-Output "$(InfFile) $(Option): About to look for Realtek RTL8029(AS) PCI Ethernet NICs"
  582.         ;;
  583.         ;; we must be installing a PCI card.
  584.         ;;
  585.         ;; Note: If we are are on WinNT v3.51 and above, we have PCI detection support
  586.         ;; and are able to setup the adapter without user intervention. Otherwise, we can
  587.         ;; only do one card at a time.
  588.         ;;
  589.         set TargetVersion = *($(CurrentVersionValue),4)
  590.         Debug-Output "$(InfFile) $(Option): Current Version:"$(TargetVersion)
  591.  
  592.         ifstr $(TargetVersion) == $(NT350VersionConstant)   ;; We need to ask on v3.50
  593.             Debug-Output "Running on WindowsNT 3.50"
  594.             set Version350 = $(TRUE)
  595.         else
  596.             Debug-Output "Running on WindowsNT 3.51"
  597.             set Version350 = $(FALSE)
  598.         endif
  599.  
  600.         ifint $(Version350) == $(TRUE)
  601.             Debug-Output "Running on WindowsNT v3.50, Not using PCI Detection!!!"
  602.             ifstr $(!STF_GUI_UNATTENDED) == "YES"
  603.                 Debug-Output "$(InfFile) $(Option): Running in GUI unattended mode"
  604.                 ifstr(i) $(!AutoNetInterfaceType) != ""
  605.                     set BusInterfaceType = $(!AutoNetInterfaceType)
  606.                 else
  607.                     set BusInterfaceType = 5
  608.                 endif
  609.                 ifstr(i) $(!AutoNetBusNumber) != ""
  610.                     set BusNumber = $(!AutoNetBusNumber)
  611.                 else
  612.                     set BusNumber = 0
  613.                 endif
  614.                 set NTDetected = $(FALSE)
  615.                 set AdapterList = $(Option)   ;; 1 Item to install
  616.                 Debug-Output "$(InfFile) $(Option): BusInterfaceType = $(BusInterfaceType)"
  617.                 Debug-Output "$(InfFile) $(Option): BusNumber = $(BusNumber)"
  618.             else
  619.                 Debug-Output "$(InfFile) $(Option): Running 3.50 Bus Dialog"
  620.                 set BusInterfaceType = 5
  621.                 set BusNumber = 0
  622.                 set NTDetected = $(FALSE)
  623.                 Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardware$(Option)Description) $(BusInterfaceType) $(BusNumber)
  624.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  625.                     Debug-Output "ShellCode error."
  626.                     goto ShellCodeError
  627.                 endif
  628.                 set BusInterfaceType = $($R1)
  629.                 set BusNumber = $($R2)
  630.                 set AdapterList = $(Option)   ;; 1 Item to install
  631.                 Debug-Output "$(InfFile) $(Option): BusInterfaceType = $(BusInterfaceType)"
  632.                 Debug-Output "$(InfFile) $(Option): BusNumber = $(BusNumber)"
  633.             endif
  634.         else
  635.             Debug-Output "$(InfFile) $(Option): Running 3.51 using PCI Dectection"
  636.             ;;
  637.             ;; v3.51 has PCI detection code built in.
  638.             ;;
  639.             ;;set BusInterfaceType = 5
  640.             ;;set BusNumber = 0
  641.             ;; Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardware$(Option)Description) $(BusInterfaceType) $(BusNumber)
  642.  
  643.             set NTDetected = $(TRUE)
  644.             set VendorID = 4332       ;; 0x10EC is REALTEK's Vendor ID
  645.             set DeviceID = 32809      ;; 0x8029 is RTL8029's Device ID
  646.             ;;set-div CFID = $($(Option)CFID) 1
  647.             Debug-Output "$(InfFile) $(Option): VendorID = $(VendorID)"
  648.             Debug-Output "$(InfFile) $(Option): DeviceID = $(DeviceID)"
  649.             ;;Shell $(UtilityInf), GetPCIInformation, $(VendorID) $(CFID)
  650.             Shell $(UtilityInf), GetPCIInformation, $(VendorID) $(DeviceID)
  651.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  652.                 goto ShellCodeError
  653.             endif
  654.             ifstr(i) $($R0) == {}
  655.                 set Error = $(CANNOT_FIND_ANY_CARD)
  656.                 set CommonStatus = USER_CANCEL
  657.                 set from = end
  658.                 goto nonfatal
  659.             endif
  660.             set AdapterList = $($R0)
  661.         endif   ;;; NT v3.50
  662.     endif  ;;; Looking for PCI cards in Option.
  663.  
  664.     ; "AdapterList" has the list of currently installed adatpers in the system!
  665.     ;
  666.     Debug-Output "$(InfFile) $(Option): Adapterlist = $(AdatperList)"
  667.     ForListDo $(AdapterList)
  668.         Set InstallCard = "YES"
  669.         ifint $(NTDetected) == $(TRUE)
  670.             set DetectedBusNum = *($($),1)
  671.             set DetectedSlotNum = *($($),2)
  672.             Debug-Output "$(InfFile) $(Option): DetectedBusNumber = $(DetectedBusNum)"
  673.             Debug-Output "$(InfFile) $(Option): DetectedSlotNum = $(DetectedSlotNum)"
  674.  
  675.             Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(DetectedBusNum), +
  676.             $(DetectedSlotNum), $(ProductHardware$(Option)Description), $(ProductHardwareName)
  677.  
  678.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  679.                 goto ShellCodeError
  680.             endif
  681.             ifstr $($R0) != "NO_ERROR"
  682.                 set Error = $($R0)
  683.                 goto fatal
  684.             endif
  685.             ifstr(i) $($R1) == "YES"
  686.                 set InstallCard = "NO"  ;; Don't want to re-install, it's there already
  687.             endif
  688.         endif
  689.         ;;
  690.         ;; Are we installing the card?
  691.         ;;
  692.         ifstr(i) $(InstallCard) == "NO"
  693.             Debug-Output "$(InfFile) $(Option): Card Already at $(DetectedBusNum):$(DetectedSlotNum) already installed!"
  694.             set Error = "An adapter at $(DetectedBusNum):$(DetectedSlotNum) is already installed!"
  695.             Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  696.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  697.                 goto ShellCodeError
  698.             endif
  699.         else
  700.             Debug-Output "$(InfFile) $(Option): Installing Card at $(DetectedBusNum):$(DetectedSlotNum)!"
  701.             Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  702.             ifint $($R4) != -1
  703.                 Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  704.             endif
  705.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  706.                 goto ShellCodeError
  707.             endif
  708.             set RegistryErrorIndex = $($R0)
  709.             Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  710.                 EndWait
  711.                 CloseRegKey $($R1)
  712.                 CloseRegKey $($R2)
  713.                 CloseRegKey $($R3)
  714.                 goto fatalregistry
  715.             endif
  716.  
  717.             read-syms FileDependentDlg$(!STF_LANGUAGE)
  718.             ;SetHelpFile $(!STF_WINDOWSSYSPATH)"\"$(OptionHelpFile) $(MinHelpId) $(MaxHelpId) $(Help$(Option)Id)
  719.  
  720.             SetHelpFile $(!STF_WINDOWSSYSPATH)"\"pcinthlp.hlp 10 1140 50
  721.             ui start "InputDlg"
  722.  
  723. ;            ifstr(i) $(DLGEVENT) == "CONTINUE"
  724.                set DuplexModeIndex = $(Combo1Out)
  725.                ui pop 1
  726. ;            else-ifstr(i) $(DLGEVENT) == "BACK"
  727. ;               set CommonStatus = STATUS_USERCANCEL
  728. ;               ui pop 1
  729. ;               goto end
  730. ;            else
  731. ;               ui pop 1
  732. ;               goto end
  733. ;            endif
  734.  
  735.             set DuplexModeValue = *($(DuplexModeValues), ~($(DuplexModeList),$(DuplexModeIndex)))
  736.             Set HardNetCardKey      = $($R1)
  737.             Set HardNetRuleKey      = $($R2)
  738.             Set HardParameterKey    = $($R3)
  739.             set AdapterNumber = $($R4)
  740.             set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  741.                     {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  742.                     {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  743.                     {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  744.                     {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  745.                     {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  746.             Shell  $(UtilityInf), AddValueList, $(HardNetCardKey), $(NewValueList)
  747.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  748.                 goto ShellCodeError
  749.             endif
  750.  
  751.                 ;
  752.                 ; PCI
  753.                 ;
  754.                 set BusTypeNum = 5
  755.                 set BusMaster = "YES"
  756.                 set Bus = "PCI"
  757.                 ifstr(i) $(Option) == "PCINT"
  758.                     set CardType = 2
  759.                 else
  760.                     set CardType = 0
  761.                 endif
  762.  
  763.             ;;
  764.             ;; If we used the OS to dected the card, then we already know bus and slot information.
  765.             ;;
  766.             ifint $(NTDetected) == $(TRUE)
  767.                 set BusNumber = $(DetectedBusNum)
  768.                 set SlotNum = $(DetectedSlotNum)
  769.                 set BusInterfaceType = $(BusTypeNum)
  770.                 ;
  771.                 ; Note: we need to record SlotNumber too so that we can use the
  772.                 ; "IsNetCardAlreadyInstalled" routine
  773.                 ;
  774.                 Set NewValueList =  {+
  775.                     {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  776.                     {Slot,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)}+
  777.                     }
  778.                 Debug-Output "$(InfFile) $(Option): Set HardwareParameterKey = $(NewValueList)"
  779.                 Shell  $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  780.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  781.                     goto ShellCodeError
  782.                 endif
  783.  
  784.                 Set NewValueList = { {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)} }
  785.                 Debug-Output "$(InfFile) $(Option): Set HardwareParameterKey = $(NewValueList)"
  786.                 Shell  $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  787.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  788.                     goto ShellCodeError
  789.                 endif
  790.             else
  791.                 Set NewValueList =  {+
  792.                     {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  793.                     }
  794.                 Debug-Output "$(InfFile) $(Option): Set HardwareParameterKey = $(NewValueList)"
  795.                 Shell  $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  796.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  797.                     goto ShellCodeError
  798.                 endif
  799.             endif
  800.  
  801.             Set NewValueList =  {+
  802.                 {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusInterfaceType)},+
  803.                 {CardType,$(NoTitle),$(!REG_VT_DWORD),$(CardType)},+
  804.                 {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  805.                 {AdapterCFID,$(NoTitle),$(!REG_VT_DWORD),$($(Option)CFID)},+
  806.                 }
  807.  
  808.             Debug-Output "$(InfFile) $(Option): Set HardwareParameterKey = $(NewValueList)"
  809.             Shell  $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  810.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  811.                 goto ShellCodeError
  812.             endif
  813.  
  814.             set NewValueList = {{DuplexMode,$(NoTitle),$(!REG_VT_DWORD),$(DuplexModeValue)}}
  815.             Shell  $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  816.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  817.                goto ShellCodeError
  818.             endif
  819.             set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  820.             set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  821.             set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardware$(Option)Type)},+
  822.                     {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  823.                     {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardware$(Option)Class)}, +
  824.                     {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  825.  
  826.             Debug-Output "$(InfFile) $(Option): HardwareRuleKey = $(NewValueList)"
  827.             Shell  $(UtilityInf), AddValueList, $(HardNetRuleKey), $(NewValueList)
  828.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  829.                 goto ShellCodeError
  830.             endif
  831.             CloseRegKey $(HardNetCardKey)
  832.             CloseRegKey $(HardNetRuleKey)
  833.             CloseRegKey $(HardParameterKey)
  834.         endif
  835.     EndForListDo
  836.     EndWait
  837.     goto successful
  838.  
  839. updateparameters =+
  840.     Debug-Output "$(InfFile) $(Option): Updateparameters"
  841.     set HardParameterKey    = $($R3)
  842.  
  843.     set NewValueList = {{DuplexMode,$(NoTitle),$(!REG_VT_DWORD),$(DuplexModeValue)}}
  844.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  845.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  846.     goto ShellCodeError
  847.     endif
  848.     CloseRegKey $(KeyParameters)
  849.     goto successful
  850.  
  851. bindingadapter =+
  852.     Debug-Output "$(InfFile) $(Option): bindingadapter"
  853.     set Error = "Binding: Sorry, not yet implemented."
  854.     goto fatal
  855.  
  856. removeadapter = +
  857.     Debug-Output "$(InfFile) $(Option): removeadapter"
  858.     Debug-Output "$(InfFile) $(Option): ----> $(ProductKeyName), $(!NTN_RegBase)"
  859.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  860.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  861.         $(ProductSoftwareName)
  862.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  863.         goto ShellCodeError
  864.         endif
  865.         set RegistryErrorIndex = $($R0)
  866.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  867.         goto fatalregistry
  868.     endif
  869.     else
  870.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  871.         $(ProductSoftwareName), $(!NTN_RegBase)
  872.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  873.         goto ShellCodeError
  874.     endif
  875.     set RegistryErrorIndex = $($R0)
  876.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  877.         goto fatalregistry
  878.     endif
  879.     endif
  880.     goto end
  881.  
  882. UpgradeSoftware = +
  883.     Debug-Output "$(InfFile) $(Option): UpdateSoftware"
  884.      OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  885.      Ifstr $(KeyProduct) != $(KeyNull)
  886.        Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  887.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  888.            Debug-Output "ShellCode error"
  889.            goto ShellCodeError
  890.        endif
  891.        set !UG_Filename = $($R0)
  892.        install "Install-Update"
  893.        ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  894.            goto fatal
  895.        endif
  896.        SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  897.        SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  898.        CloseRegKey $(KeyProduct)
  899.      else
  900.        goto fatalregistry
  901.      endif
  902.      goto end
  903.  
  904. successful = +
  905.     Debug-Output "$(InfFile) $(Option): Successful"
  906.     goto end
  907.  
  908. abandon = +
  909.     Debug-Output "$(InfFile) $(Option): Abandon"
  910.     ForListDo $(OEM_ABANDON_OPTIONS)
  911.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  912.         $(ProductSoftwareName), $($)
  913.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  914.         goto ShellCodeError
  915.     endif
  916.     set RegistryErrorIndex = $($R0)
  917.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  918.         goto fatalregistry
  919.     endif
  920.     EndForListDo
  921.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  922.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  923.         $(ProductSoftwareName), FALSE
  924.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  925.         goto ShellCodeError
  926.     endif
  927.     set RegistryErrorIndex = $($R0)
  928.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  929.         goto fatalregistry
  930.     endif
  931.     endif
  932.     goto end
  933.  
  934. warning = +
  935.     Debug-Output "$(InfFile) $(Option): warning"
  936.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  937.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  938.     goto ShellCodeError
  939.     endif
  940.     ifstr(i) $($R1) == "OK"
  941.     goto $(to)
  942.     else-ifstr(i) $($R1) == "CANCEL"
  943.     goto $(from)
  944.     else
  945.     goto "end"
  946.     endif
  947.  
  948. nonfatalinfo = +
  949.     Debug-Output "$(InfFile) $(Option): nonfatalinfo"
  950.     Set CommonStatus = STATUS_USERCANCEL
  951.     Set Severity = STATUS
  952.     goto nonfatalmsg
  953.  
  954. nonfatal = +
  955.     Debug-Output "$(InfFile) $(Option): nonfatal"
  956.     Set Severity = NONFATAL
  957.     goto nonfatalmsg
  958.  
  959. nonfatalmsg = +
  960.     Debug-Output "$(InfFile) $(Option): nonfatalmsg"
  961.     ifstr(i) $(Error) == ""
  962.     Set Severity = NONFATAL
  963.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  964.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  965.         goto ShellCodeError
  966.     endif
  967.     set Error = $($R0)
  968.     endif
  969.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  970.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  971.     goto ShellCodeError
  972.     endif
  973.     ifstr(i) $($R1) == "OK"
  974.     goto $(from)
  975.     else
  976.     ;   goto "end"
  977.     goto "RemoveAdapter"
  978.     endif
  979.  
  980. fatalregistry = +
  981.     Debug-Output "$(InfFile) $(Option): fatalregistry"
  982.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  983.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  984.     goto ShellCodeError
  985.     endif
  986.     set Error = $($R0)
  987.     goto fatal
  988.  
  989. fatal = +
  990.     Debug-Output "$(InfFile) $(Option): fatal"
  991.     ifstr(i) $(Error) == ""
  992.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  993.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  994.         goto ShellCodeError
  995.     endif
  996.     set Error = $($R0)
  997.     endif
  998.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  999.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1000.     goto ShellCodeError
  1001.     endif
  1002.     goto setfailed
  1003.  
  1004. ShellCodeError = +
  1005.     Debug-Output "$(InfFile) $(Option): ShellCodeError"
  1006.     set DlgType      = "MessageBox"
  1007.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  1008.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  1009.     set STF_MB_TYPE  = 1
  1010.     set STF_MB_ICON  = 3
  1011.     set STF_MB_DEF   = 1
  1012.     ui start "Error Message"
  1013.     goto setfailed
  1014.  
  1015. setfailed = +
  1016.     Debug-Output "$(InfFile) $(Option): Setfailed"
  1017.     set CommonStatus = STATUS_FAILED
  1018.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  1019.     set OEM_ABANDON_ON = FALSE
  1020.     goto abandon
  1021.     endif
  1022.     goto end
  1023.  
  1024. end = +
  1025.     goto term
  1026.  
  1027. term = +
  1028.     Return $(CommonStatus)
  1029.  
  1030. [Install-Option]
  1031.     set STF_VITAL = ""
  1032.     ifstr(i) $(AddCopy) == "YES"
  1033.     AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1034.     endif
  1035.     ifstr(i) $(DoCopy) == "YES"
  1036.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1037.        CopyFilesInCopyList
  1038.     endif
  1039.     Exit
  1040.  
  1041. [Install-Hlp]
  1042.    set STF_VITAL = ""
  1043.    AddSectionFilesToCopyList Files-Hlp $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1044.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1045.    CopyFilesInCopyList
  1046.    Exit
  1047.  
  1048. [Install-Update]
  1049.    set STF_VITAL        = ""
  1050.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  1051.    AddSectionFilesToCopyList Files-Hlp $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1052.    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1053.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1054.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1055.    CopyFilesInCopyList
  1056.    exit
  1057.  
  1058. [Source Media Descriptions]
  1059.      1 = "MELCO LCI2-T Driver Disk"
  1060.  
  1061. [ProductType]
  1062. STF_PRODUCT  = Winnt
  1063. STF_PLATFORM = I386
  1064.  
  1065. [Files-Inf]
  1066. 1,      oemsetup.inf,    SIZE=1000,     RENAME=$(!UG_Filename)
  1067.  
  1068. [Files-Hlp]
  1069. 1, PCINTHLP.HLP , SIZE=10000
  1070.  
  1071. ;
  1072. ; Driver files
  1073. ;
  1074. [Files-PCINT]
  1075. 1,LCI2T.SYS , SIZE=50000
  1076.  
  1077. [LanguagesSupported]
  1078.     ENG
  1079.  
  1080. [OptionsTextENG]
  1081.     PCINT     = "MELCO LCI2-T Ethernet Adapter"
  1082.  
  1083. [FileConstantsENG]
  1084.     ProCaption   = "Windows NT Setup"
  1085.     ProCancel    = "Cancel"
  1086.     ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  1087.                    "Are you sure you want to cancel copying files?"
  1088.     ProCancelCap = "Network Setup Message"
  1089.     ProText1     = "Copying:"
  1090.     ProText2     = "To:"
  1091.  
  1092. DuplexModeList  = ^(DuplexModeDlg, 1)
  1093. DuplexModeValues = ^(DuplexModeDlg, 2)
  1094. NoList  = ^(NoChoices, 1)
  1095. NoValues = ^(NoChoices, 2)
  1096. ShellCodeErrorTitle = "Error: "$(Function$(Option)Title)
  1097. ShellCodeErrorText      = "Shell Code Error."
  1098. CANNOT_FIND_ANY_CARD    = "Network card is not present in the system"
  1099.  
  1100. [DialogConstantsENG]
  1101. Help        = "&Help"
  1102. Exit        = "Cancel"
  1103. OK          = "OK"
  1104. HelpContext = ""
  1105. Continue    = "Continue"
  1106. Cancel      = "Cancel"
  1107.  
  1108. [FileDependentDlgENG]
  1109. DlgText = "Choose the proper Connection Type"$(!LF)
  1110.  
  1111. Combo1Label = "&Connection Type"
  1112. DlgTemplate = "ADAP_PROTO_COMBO"
  1113. DlgType = "Combination"
  1114. ;Caption = $(Function$(Option)Title)
  1115. Caption = "MELCO LCI2-T Ethernet Adapter Setup"
  1116. Combo1List = $(DuplexModeList)
  1117. Combo1Out  = $(DuplexModeValue)
  1118. ComboListItemsIn  = {Combo1List}
  1119. ComboListItemsOut = {Combo1Out}
  1120. EditTextLim = ""
  1121. CBOptionsGreyed = {}
  1122. ;MinHelpId = 10
  1123. ;MaxHelpId = 20
  1124. ;;HelpContext = $(Help$(Option)Id)
  1125.  
  1126. HelpContext = 50
  1127.  
  1128.  
  1129. [DuplexModeDlg]
  1130.     DuplexMode_0 = "10BASE-T Half_Duplex", 0
  1131.     DuplexMode_1 = "10BASE-T Full_Duplex", 1
  1132.