home *** CD-ROM | disk | FTP | other *** search
/ ftp.msan.hr / ftp.msan.hr.tar / ftp.msan.hr / Drivers / LAN / D-LINK / DE-528 / OEMSETUP.INF < prev    next >
INI File  |  2001-09-25  |  43KB  |  1,134 lines

  1. ;********************************************************************
  2. ;
  3. ;   The D-Link DE-528 Ethernet NIC miniport driver
  4. ;   oemsetup file for WinNT 3.5x, WinNT 4.0
  5. ;
  6. ;********************************************************************
  7.  
  8. [Identification]
  9.     OptionType = NetAdapter
  10.  
  11. [PlatformsSupported]
  12.     PCI
  13.  
  14. [Options]
  15.     DE528
  16.  
  17. [FileConstants]
  18.     UtilityInf                  = "UTILITY.INF"
  19.     subroutineinf               = "SUBROUTN.INF"
  20.     SoftwareType                = "driver"
  21.     Exit_Code                   = 0
  22. ;;;1997,06,10    NetEventDLL                 = "%SystemRoot%\System32\netevent.dll;%SystemRoot%\System32\drivers\DE528.SYS"
  23.     NetEventDLL                 = "%SystemRoot%\System32\netevent.dll;%SystemRoot%\System32\drivers\DE528.SYS"
  24.     IoLogMsgDLL                 = "%SystemRoot%\System32\IoLogMsg.dll"
  25.  
  26.     Manufacturer                = "D-Link"
  27.     ProductMajorVersion         = "1"
  28.     ProductMinorVersion         = "03"
  29.     ProductVersion              = $(ProductMajorVersion)"."$(ProductMinorVersion)
  30.     ProductSoftwareName         = "DE528"
  31.     ProductSoftwareImagePath    = "%SystemRoot%\System32\drivers\DE528.SYS"
  32.     NetRuleSoftwareType         = "de528Sys ndisDriver de528Driver"
  33.     NetRuleSoftwareUse          = $(SoftwareType)
  34.     NetRuleSoftwareBindForm     = """de528Sys"" yes no container"
  35.     NetRuleSoftwareClass        = {"de528Driver basic"}
  36.     NetRuleSoftwareBindable     = {"de528Driver de528Adapter non exclusive 100"}
  37.     ProductHardwareName         = "DE528"
  38.     NetRuleHardwareBindForm     = " yes yes container"
  39.  
  40.     ProductKeyName              = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  41.     ParamKeyName                = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  42.  
  43.     FunctionTitle               = "D-Link DE-528 Ethernet NIC Setup"
  44.     ProductSoftwareDescription  = "D-Link DE-528 Ethernet NIC Driver"
  45.     ProductSoftwareTitle        = "D-Link DE-528 Ethernet NIC Driver"
  46.  
  47.     ProductHardwareDE528Title   = "D-Link DE-528 Ethernet NIC"
  48.     ProductHardwareDE528Description = "D-Link DE-528 Ethenet NIC"
  49.     NetRuleHardwareDE528Type    = "de528 de528Adapter"
  50.     NetRuleHardwareDE528Class   = {"de528Adapter basic"}
  51.  
  52.     AdapterDE528Type            = 5             ;; PCI board
  53.  
  54.     DE528CFID                   = 2150174956    ;; 0x802910EC
  55.  
  56. [GeneralConstants]
  57.     from      = ""
  58.     to        = ""
  59.     ExitCodeOk     = 0
  60.     ExitCodeCancel = 1
  61.     ExitCodeFatal  = 2
  62.     KeyNull         = ""
  63.     MAXIMUM_ALLOWED   = 33554432
  64.     RegistryErrorIndex = NO_ERROR
  65.     KeyProduct      = ""
  66.     KeyParameters   = ""
  67.     TRUE            = 1
  68.     FALSE           = 0
  69.     NoTitle            = 0
  70.     ExitState   = "Active"
  71.     OldVersionExisted = $(FALSE)
  72.     DriverPath      = $(!STF_NTPATH)\drivers
  73.     NT350VersionConstant = "3.50"
  74.     NT310VersionConstant = "3.10"
  75.  
  76. [date]
  77.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  78.  
  79. ;
  80. ; The [Identify] section is the first section executed by Setup. It
  81. ; returns information to Setup about the type of drivers that can
  82. ; be installed by this .INF file (in our case, network drivers).
  83. ;
  84. [Identify]
  85.     read-syms Identification
  86.     set Status     = STATUS_SUCCESSFUL
  87.     set Identifier = $(OptionType)
  88.     set Media      = #("Source Media Descriptions", 1, 1)
  89.     Return $(Status) $(Identifier) $(Media)
  90.  
  91. ;
  92. ; If the [Identify] section indicates that the .INF file supports
  93. ; the appropriate type of driver, Setup calls the [ReturnOptions]
  94. ; section.  Setup passes a single parameter to this section,
  95. ; indicating the language to be used for dialog strings.  This
  96. ; section returns information to the Setup program, listing the
  97. ; names of any drivers which can be installed by this .INF file.
  98. ; It also returns the text strings for each driver to be used in
  99. ; the dialog box asking the user to select the driver to install.
  100. ;
  101. [ReturnOptions]
  102.     ;
  103.     ; Initialize variables to failure state.
  104.     ;
  105.     set Status        = STATUS_FAILED
  106.     set OptionList     = {}
  107.     set OptionTextList = {}
  108.  
  109.     ;
  110.     ; See if our language list supports the language specified.
  111.     ; If a second parameter was passed in, see if it is a supported
  112.     ; platform.
  113.     ;
  114.     set LanguageList = ^(LanguagesSupported, 1)
  115.     Ifcontains(i) $($0) in $(LanguageList)
  116.     ifstr(i) $($1) == ""
  117.         goto returnoptions
  118.     endif
  119.         set PlatformList = ^(PlatformsSupported, 1)
  120.     Ifcontains(i) $($1) in $(PlatformList)
  121.         goto returnoptions
  122.     else
  123.         set Status = STATUS_NOTSUPPORTED
  124.         goto finish_ReturnOptions
  125.     endif
  126.     else
  127.         set Status = STATUS_NOLANGUAGE
  128.         goto finish_ReturnOptions
  129.     endif
  130.  
  131.  
  132.     ;
  133.     ; If we get here, we are successful, so return the option list.
  134.     ;
  135. returnoptions = +
  136.     set OptionList     = ^(Options, 1)
  137.     set OptionTextList = ^(OptionsText$($0), 1)
  138.     set Status         = STATUS_SUCCESSFUL
  139.  
  140.     ;
  141.     ; Exit from this section.
  142.     ;
  143. finish_ReturnOptions = +
  144.     Return $(Status) $(OptionList) $(OptionTextList)
  145.  
  146. ;
  147. ; If the [ReturnOptions] section returns successfully, indicating
  148. ; the language is supported, Setup displays a dialog box from which
  149. ; the user can select a driver to install.  Setup then calls the
  150. ; [InstallOption] section, with the following parameters:
  151. ;
  152. ;       Language to use
  153. ;       OptionID to install
  154. ;       SourceDirectory
  155. ;       AddCopy  (yes/no)
  156. ;       DoCopy   (yes/no)
  157. ;       DoConfig (yes/no)
  158. ;
  159. ; ScrDir seems to always be A:\, even when you later install from
  160. ; the oemnad#.inf which is copied to the system32 directory.
  161. ;
  162. ; AddCopy and DoCopy are valid only when NTN_InstallMode = install.
  163. ; AddCopy is yes if the files should be added to the copy list.
  164. ; DoCopy is yes if CopyFilesInCopyList should be called.
  165. ;
  166. ; DoConfig is not used for network cards.
  167. ;
  168. ; This .INF file is automatically copied to the SYSTEM32 directory,
  169. ; by WinNT, and renamed so as to have a unique name.
  170. ;
  171. [InstallOption]
  172.     ;;;
  173.     ;;; Change "Set !G:DebugOutputControl=0" to 1 in NCAPSHEL.INF for debug support.
  174.     ;;;
  175.     ;;; set !G:DebugOutputControl=1     ;; Debug output {1=turned on, 0= turned off}
  176.  
  177.     ;
  178.     ; Read input parameters.
  179.     ;
  180.     set Option   = $($1)
  181.     set SrcDir   = $($2)
  182.     set AddCopy  = $($3)
  183.     set DoCopy   = $($4)
  184.     set DoConfig = $($5)
  185.  
  186.     ;
  187.     ; Check if specified language is supported.
  188.     ;
  189.     set LanguageList = ^(LanguagesSupported, 1)
  190.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  191.     Return STATUS_NOLANGUAGE
  192.     endif
  193.  
  194.     ;
  195.     ; Set up local variables and constant values.
  196.     ;
  197.     set-subst LF = "\n"
  198.     read-syms GeneralConstants
  199.     read-syms FileConstants
  200. ;   set NetRuleSoftwareBindable = $($R1)
  201.     read-syms DialogConstants$(!STF_LANGUAGE)
  202.     ifstr(i) $(!NTN_Origination) == "NCPA"
  203.     set Continue = "OK"
  204.     endif
  205.     read-syms FileConstants$(!STF_LANGUAGE)
  206.     ;; read-syms FileDependentDlg$(!STF_LANGUAGE)
  207.     ;; SetHelpFile $(!STF_WINDOWSSYSPATH)"\"$(OptionHelpFile) $(MinHelpId) $(MaxHelpId)
  208.     detect date
  209.     set-title  $(Function$(Option)Title)
  210.     set to   = Begin
  211.     set from = Begin
  212.     set CommonStatus = STATUS_SUCCESSFUL
  213.     EndWait
  214.  
  215.     ;; ;
  216.     ;; ; Problem was discovered using unattend.txt files for automatic
  217.     ;; ; installation.  It was found that $2 passed into this section does
  218.     ;; ; not have an appropriate value when using unattend.txt.  It was
  219.     ;; ; found that during manual AND unattended installations, the variable
  220.     ;; ; STF_SRCDIR_OVERRIDE did contain an appropriate value.
  221.     ;; ;
  222.     ;; ifstr(i) $(!STF_SRCDIR_OVERRIDE) != ""
  223.     ;;     set SrcDir = $(!STF_SRCDIR_OVERRIDE)
  224.     ;; endif
  225.  
  226. Begin = +
  227.  
  228.     ;;
  229.     ;; Get the Version of Windows NT we are installing on.  This will allow us to use the
  230.     ;; PCI Support that will be included in NT v3.51
  231.     ;;
  232.     set CurrentVersionValue = ""
  233.     OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows Nt\CurrentVersion" $(!REG_KEY_READ) KeyNt
  234.     Ifstr(i) $(KeyNt) != ""
  235.     GetRegValue $(KeyNt) "CurrentVersion" CurrentVersionValue
  236.     Debug-Output "$(InfFile) $(Option): WinNT CurrentVersion ="$(CurrentVersionValue)
  237.     CloseRegKey $(KeyNt)
  238.     Endif
  239.  
  240.     ifstr(i) (*($(CurrentVersionValue),4)) == $(NT310VersionConstant)    ;; NT v3.10 not supported!
  241.         Debug-Output "$(InfFile) $(Option): Configureadapter"
  242.     set Error = "Windows NT v3.10 is not support by this product"
  243.     goto fatal
  244.     endif
  245.  
  246. ;    set ActivateDetection = FALSE
  247.  
  248.     ;
  249.     ; NTN_InstallMode
  250.     ;   install   - this is a primary or original installation, it
  251.     ;               may be an upgrade
  252.     ;   deinstall - this product and its binaries are to be removed
  253.     ;               from the disk
  254.     ;   configure - this product is to be (re-) configured
  255.     ;   bind      - this product's relationships to other products
  256.     ;               have changed and should be reviewed.
  257.     ;
  258.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  259.         set StartLabel = removeadapter
  260.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  261.         set StartLabel = UpgradeSoftware
  262.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  263.         set StartLabel = bindingadapter
  264.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  265.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  266.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  267.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  268.             goto ShellCodeError
  269.             endif
  270.             set Error = $($R0)
  271.             set from = end
  272.             set to = end
  273.             goto nonfatalinfo
  274.         else
  275.             set StartLabel = configureadapter
  276.         endif
  277.     else
  278.         set StartLabel = installadapter
  279.         set OEM_ABANDON_OPTIONS = {}
  280.         set OEM_ABANDON_SOFTWARE = FALSE
  281.         set OEM_ABANDON_ON = TRUE
  282.     endif
  283.  
  284.     ;; ;
  285.     ;; ; HARDWARE_PUT_IN_REGISTRY gets set to true once the hardware
  286.     ;; ; component is installed.  That way if we get an error we know
  287.     ;; ; to uninstall it.  HWList has the path to the hardware that
  288.     ;; ; is needed by RemoveHardwareComponent.
  289.     ;; ;
  290.     ;; ; SOFTWARE_PUT_IN_REGISTRY gets set to true once the software
  291.     ;; ; component is installed.
  292.     ;; ;
  293.     ;; set HARDWARE_PUT_IN_REGISTRY = $(FALSE)
  294.     ;; set HWList = ""
  295.     ;; set SOFTWARE_PUT_IN_REGISTRY = $(FALSE)
  296.  
  297.     Debug-Output "$(InfFile) $(Option): =================================================="
  298.     Debug-Output "$(InfFile) $(Option): STF_CWDIR is: "$(!STF_CWDIR)
  299.     Debug-Output "$(InfFile) $(Option): STF_SRCDIR is: "$(!STF_SRCDIR)
  300.     Debug-Output "$(InfFile) $(Option): STF_LANGUAGE is: "$(!STF_LANGUAGE)
  301.     Debug-Output "$(InfFile) $(Option): Option is: "$(Option)
  302.     Debug-Output "$(InfFile) $(Option): !STF_NCN_InstallMode is:"$(!NTN_InstallMode)
  303.     Debug-Output "$(InfFile) $(Option): !STF_NCDETECT  is: "$(!STF_NCDETECT)
  304.     Debug-Output "$(InfFile) $(Option): !STF_NCOPTION  is: "$(!STF_NCOPTION)
  305.     Debug-Output "$(InfFile) $(Option): !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  306.     Debug-Output "$(InfFile) $(Option): !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  307.     Debug-Output "$(InfFile) $(Option): !STF_GUI_UNATTENDED is: "$(!STF_GUI_UNATTENDED)
  308.     Debug-Output "$(InfFile) $(Option): !STF_BusType is $(!STF_BUSTYPE)"            ;; Primary Bus
  309.     Debug-Output "$(InfFile) $(Option): !STF_BusTypeList is $(!STF_BUSTYPELIST)"    ;; All Buses
  310.     Debug-Output "$(InfFile) $(Option): =================================================="
  311.  
  312.     set from = $(fatal)
  313.     set to = $(fatal)
  314.     goto $(StartLabel)
  315.  
  316. ;------------------------------------------------------------------------
  317. ; InstallMode = install
  318. ; Came here straight from figuring out which platform we are on.
  319. ; Option, SrcDir, AddCopy, DoCopy, and DoConfig are valid.
  320. ;
  321. installadapter = +
  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. ;   Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) NO
  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. ;;;    Set SrcDir = "A:\WINNT"
  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.    SetHelpFile $(!STF_WINDOWSSYSPATH)"\"pcinthlp.hlp 10 20 10
  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) NO
  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.  
  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\de528 exist?
  579.  
  580.     set NTDetected = $(FALSE)
  581.  
  582.         Debug-Output "$(InfFile) $(Option): About to look for D-Link DE-528 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.             SetHelpFile $(!STF_WINDOWSSYSPATH)"\"pcinthlp.hlp 10 20 10
  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) == "DE528"
  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)WINNT $(!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)WINNT $(!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)WINNT $(!STF_WINDOWSSYSPATH)
  1052.    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1053.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir)WINNT $(!STF_WINDOWSSYSPATH)\drivers
  1054.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1055.    CopyFilesInCopyList
  1056.    exit
  1057.  
  1058. [Source Media Descriptions]
  1059.      1 = "D-Link DE-528 Ethernet NIC OEM Driver Disk"
  1060.      ; from disk a:\ or b:\
  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-DE528]
  1076. 1,DE528.SYS , SIZE=50000
  1077.  
  1078. [LanguagesSupported]
  1079.     ENG
  1080.  
  1081. [OptionsTextENG]
  1082.     DE528     = "D-Link DE-528 Ethernet NIC"
  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 = "Choose the proper Duplex Mode from the list."$(!LF)+
  1111.           "This option only useful for DE-528 NIC"$(!LF)$(!LF)+
  1112.           "  (1) Half Duplex"$(!LF)+
  1113.           "  (2) Full Duplex"
  1114.  
  1115. Combo1Label = "&Duplex Mode"
  1116. DlgTemplate = "ADAP_PROTO_COMBO"
  1117. DlgType = "Combination"
  1118. ;Caption = $(Function$(Option)Title)
  1119. Caption = "DE-528 Duplex mode (for DE-528 NIC only)"
  1120. Combo1List = $(DuplexModeList)
  1121. Combo1Out  = $(DuplexModeValue)
  1122. ComboListItemsIn  = {Combo1List}
  1123. ComboListItemsOut = {Combo1Out}
  1124. EditTextLim = ""
  1125. CBOptionsGreyed = {}
  1126. ;;MinHelpId = 10
  1127. ;;MaxHelpId = 90
  1128. ;;HelpContext = $(Help$(Option)Id)
  1129. HelpContext = 10
  1130.  
  1131. [DuplexModeDlg]
  1132.     DuplexMode_0 = "(1)  Half Duplex  (Default)", 0
  1133.     DuplexMode_1 = "(2)  Full Duplex", 1
  1134.