home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2000 September / VPR0009B.BIN / DRIVER / MELCO / LGYTL_ / lgytl_.exe / WINNT / OEMSETUP.INF < prev    next >
INI File  |  1999-10-15  |  43KB  |  1,134 lines

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