;*******************************************************************************
;*                                                                            **
;*                     I N T E L   P R O P R I E T A R Y                      **
;*                                                                            **
;*   COPYRIGHT (c) 1993-2002 BY INTEL CORPORATION. ALL RIGHTS RESERVED.  NO   **
;*   PART  OF  THIS  PROGRAM OR PUBLICATION MAY BE REPRODUCED, TRANSMITTED,   **
;*   TRANSCRIBED, STORED IN A RETRIEVAL  SYSTEM,  OR  TRANSLATED  INTO  ANY   **
;*   LANGUAGE OR COMPUTER LANGUAGE IN ANY FORM OR BY ANY MEANS, ELECTRONIC,   **
;*   MECHANICAL, MAGNETIC, OPTICAL, CHEMICAL, MANUAL, OR OTHERWISE, WITHOUT   **
;*   THE PRIOR WRITTEN PERMISSION OF :                                        **
;*                                                                            **
;*                             INTEL CORPORATION                              **
;*                                                                            **
;*                          2200 MISSION COLLEGE BLVD                         **
;*                                                                            **
;*                     SANTA CLARA, CALIFORNIA 95052-8119                     **
;*                                                                            **
;*******************************************************************************
;***********************************************************************
; Windows NT OEMSETUP.INF for
;
;       Intel(R) PRO/100 PCI family of adapters
;       Intel(R) PRO/1000 family of adapters
;
; Version 6.4.3.00
;***********************************************************************
; $Revision: 3 $
;
;***********************************************************************
;
; Adapter/Driver Detection
;
; Adapter Constants  - Vendor and Device IDs in Decimal
;
[Adapter-Constants]
;   0x8086 = 32902

    VendorID = 32902

;   E100B Device IDs
;   0x1229 = 4649
;   0x1029 = 4137
;   0x2449 = 9289

DeviceListE100B = {4649, 4137, 9289}

;   Gigabit Device IDs
;   0x1000 = 4096
;   0x1001 = 4097
;   0x1004 = 4100
;   0x1008 = 4104
;   0x100C = 4108
;   0x100E = 4110
;   0x1015 = 4117
;   0x1016 = 4118
;   0x1017 = 4119
;   0x101D = 4125
DeviceListE1000 = {4096, 4097, 4100, 4104, 4108, 4110, 4117, 4118, 4119, 4125}

UtilityInf = "UTILITY.INF"
SubroutineInf = "SUBROUTN.INF"

; Messages to display if adapters cannot be found, or if all adapters
; have drivers loaded.

CANT_FIND_E100B = "Cannot find any PRO/100 Adapters in your system"
CANT_FIND_E1000 = "Cannot find any PRO/1000 Adapters in your system"
ALL_INSTALLED_E100B = "All the PRO/100 Adapters in this system already have drivers installed"
ALL_INSTALLED_E1000 = "All the PRO/1000 Adapters in this system already have drivers installed"
DONT_SUPPORT_NT351 = "This version of the driver software does not support Windows NT versions prior to NT 4.0"

; Adapter/Driver Detection end.
;***********************************************************************
; Define NMS Service File Constants
;***********************************************************************
[NMSService-FileConstants]
        NMSSvc        = "NMSSvc.exe"
        NMSSvcPS      = "NMSSvcPS.dll"
        NMSMsg        = "NMSMsg.dll"
        NMSAPI        = "NMSAPI.dll"
        NMSCfg        = "NMSCFG.sys"
        NMSDD         = "NMSDD.sys"
        RegSvr32      = "RegSvr32.exe"
        NmsMvft       = "MVFT.reg"
        NMSDir        = "NMS"
        NMSDirPreS    = "\NMS"

;***********************************************************************
; Define PROSet constants
;***********************************************************************
[FileConstants]
        Manufacturer  = "Intel"
        ModemEnabler  = "Cbmodem.sys"
        NDIS4         = "E100bnt.sys"
        NDIS4Gig      = "E1000nt4.sys"
        IANS          = "iANSNT4.sys"
        IANSE         = "iANSNT4e.sys"
        IANSN         = "iANSNT4n.sys"
        PROSet        = "PROSetp.cpl"
        PROMon        = "PROMon.exe"
        PROSetHelp    = "PROSetp.hlp"
        PROSetCnt     = "PROSetp.cnt"
        PROSetOld     = "PROSet.cpl"
        ROBOEX32      = "ROBOEX32.DLL"
        INETWH32      = "inetwh32.dll"
        PROSetReg     = "PROSetp.reg"
        iAFT          = "iAFT.sys"
        iVLAN         = "iVLAN.sys"
        TagFile1      = "D100disk"
        PROSetDir     = "PROSetII"
        DriverDir     = "DRIVERS"
        PROSetDirGiga = "PROSetII"
        DriverDirGiga = "DRIVERS"
        PROSetDirPreS     = "\PROSetII"
        DriverDirPreS     = "\DRIVERS"
        PROSetDirGigaPreS = "\PROSetII"
        DriverDirGigaPreS = "\DRIVERS"

        ProCaption   = "Windows NT Setup"
        ProCancel    = "Cancel"
        ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
                        "Are you sure you want to cancel copying files?"
        ProCancelCap = "Network Setup Message"
        ProText1     = "Copying:"
        ProText2     = "To:"

        AFTService   = "SOFTWARE\Intel\iAFT"
        VLANService  = "SOFTWARE\Intel\iVLANMiniport"
        AFTWarning   = "Setup detected that you have some adapter teams and/or VLANs that are no longer supported.  "+
                        "These teams and VLANs will be converted to supported teams and VLANs.  Are you sure you want to continue?"

        UnAttAdapterSwitch = "ALL"
;           Note: UnAttAdapterSwitch allows unattend installs to install selected
;                 adapters.
;
;       UnAttAdapterSwitch syntax:
;
;         UnAttAdapterSwitch = "ALL"
;           - specifies installation of all adapters found - default
;
;         UnAttAdapterSwitch = "INTERFACE:x[,y]"
;           - specifies installation of the xth adapter found
;           example: "INTERFACE:2"
;             - specifies installation of the second adapter found
;           example: "INTERFACE:1,3"
;             - specifies installation of the first and third adapters found
;
;         UnAttAdapterSwitch = "DEVICE:x1:y1:z1[,x2:y2:z2]"
;           - specifies installation of adapters by Bus:Slot:Function
;           example: "DEVICE:0:2:0"
;             - specifies installation of the device at Bus 0 Slot 2 Function 0
;           example: "DEVICE:0:4:0,1:14:0"
;             - specifies the devices at Bus 0 Slot 4 Function 0 and
;               Bus 1 Slot 14 Function 0
;
;***********************************************************************
; Define old PROSet Plus File Constants
;***********************************************************************
[PROSetPlusFileConstants]
        PROSetP       = "PROSetp.cpl"
        PROSetPHelp   = "PROSetp.hlp"
        PROSetPCnt    = "PROSetp.cnt"
        PROSetOld     = "PROSet.cpl"
        PROKddp       = "PROKddp.sys"
        PROdd         = "PROdd.sys"

;***********************************************************************
; Define file source constants.
;***********************************************************************
[NMSService-FileConstants-Src]
        NMSSvcSrc       = "NMSSvc.ex_"
        NMSSvcPSSrc     = "NMSSvcPS.dl_"
        NMSAPISrc       = "NMSAPI.dl_"
        NMSMsgSrc       = "NMSMsg.dl_"
        NMSCfgSrc       = "NMSCfg.sy_"
        NMSDDSrc        = "NMSDD.sy_"
        NmsMvftSrc      = "MVFT.re_"
        RegSvr32Src     = "RegSvr32.ex_"
        NMSSvcSrcNC     = "NMSSvc.exe"
        NMSSvcPSSrcNC   = "NMSSvcPS.dll"
        NMSAPISrcNC     = "NMSAPI.dll"
        NMSMsgSrcNC     = "NMSMsg.dll"
        NMSCfgSrcNC     = "NMSCfg.sys"
        NMSDDSrcNC      = "NMSDD.sys"
        RegSvr32SrcNC   = "RegSvr32.exe"
        NmsMvftSrcNC    = "MVFT.reg"

[FileConstants-Src]
        ModemEnablerSrc = "Cbmodem.sy_"
        NDIS4Src        = "E100bnt.sy_"
        NDIS4GigSrc     = "E1000nt4.sy_"
        IANSSrc         = "iANSNT4.sy_"
        IANSESrc        = "iANSNT4e.sy_"
        IANSNSrc        = "iANSNT4n.sy_"
        PROSetSrc       = "PROSetp.cp_"
        PROMonSrc       = "PROMon.ex_"
        PROSetHelpSrc   = "PROSetp.hl_"
        PROSetCntSrc    = "PROSetp.cn_"
        ROBOEX32Src     = "ROBOEX32.DL_"
        INETWH32Src     = "inetwh32.dl_"
        PROSetRegSrc    = "PROSetp.re_"
        ModemEnablerSrcNC = "Cbmodem.sys"
        NDIS4SrcNC      = "E100bnt.sys"
        NDIS4GigSrcNC   = "E1000nt4.sys"
        IANSSrcNC       = "iANSNT4.sys"
        IANSESrcNC      = "iANSNT4e.sys"
        IANSNSrcNC      = "iANSNT4n.sys"
        PROSetSrcNC     = "PROSetp.cpl"
        PROMonSrcNC     = "PROMon.exe"
        PROSetHelpSrcNC = "PROSetp.hlp"
        PROSetCntSrcNC  = "PROSetp.cnt"
        ROBOEX32SrcNC   = "ROBOEX32.DLL"
        INETWH32SrcNC   = "inetwh32.dll"
        PROSetRegSrcNC  = "PROSetp.reg"

;***********************************************************************
; Detect sections
;***********************************************************************
[DetectConstants]
OSName = {} ? $(PROSet) PROSetGetOSVersion

;***********************************************************************
; Define Option
;***********************************************************************
[Options]
        E100B
;       E1000
        E100BEXP
        E100BPCI
        E10PPCI
        E100BRWA

[OptionsText]
        E100B = "Intel(R) PRO/100 Family Adapter"
;       E1000 = "Intel(R) PRO/1000 Family Adapter"

[Source Media Descriptions]
        1 = "Intel PRO Adapter CD-ROM or diskette", TAGFILE = D100disk
        2 = "Intel PRO Adapter diskette 2", TAGFILE = D100dsk2

;***********************************************************************
; Returns information to Setup about the type of driver or drivers that
; can be installed by this INF file.
;***********************************************************************
[Identify]
        Return STATUS_SUCCESSFUL NetAdapter ""

;***********************************************************************
; This section returns information to the Setup program, listing the
; names of any drivers that can be installed by this INF file. It also
; returns the text strings for each driver (in the requested language)
; to be used in the dialog box that asks the user to select the driver
; to install.
;***********************************************************************
[ReturnOptions]
        Set Status         = STATUS_SUCCESSFUL
        Set OptionList     = ^(Options, 1)
        Set OptionTextList = ^(OptionsText, 1)

        IfStr(i) $($1) != ""
                IfContains(i) $($1) not-in "PCI"
                        Set Status         = STATUS_NOTSUPPORTED
                        Set OptionList     = {}
                        Set OptionTextList = {}
                EndIf
        EndIf

        Return $(Status) $(OptionList) $(OptionTextList)


;***********************************************************************
; If the [ReturnOptions] section returns successfully, indicating the
; language is supported, Setup displays a dialog box from which the user
; can select a driver to install. If the user proceeds with the
; installation, Setup calls the [InstallOption] section.
;***********************************************************************
[InstallOption]
        Set Option   = $($1)
        Set SrcDir   = $($2)
        Set AddCopy  = $($3)
        Set DoCopy   = $($4)
        Set DoConfig = $($5)

        Set ProsetOption = $(Option)

; Adapter/Driver Detection
        read-syms Adapter-Constants
; Adapter/Driver detection end.
        read-syms FileConstants
        read-syms NMSService-FileConstants
        read-syms FileConstants-Src
        read-syms NMSService-FileConstants-Src
        read-syms PROSetPlusFileConstants

;Check if SrcDir has trailing \ by checking for tag file existance
        set FileToCheck = $(SrcDir)$(TagFile1)
        LibraryProcedure TagFilePresent, $(!LIBHANDLE), CheckFileExistance $(FileToCheck)

        IfStr(i) $(TagFilePresent) == "NO"
                set FileToCheck = $(SrcDir)\$(TagFile1)
                LibraryProcedure TagFilePresent, $(!LIBHANDLE), CheckFileExistance $(FileToCheck)

                IfStr(i) $(TagFilePresent) == "YES"	;Force trail \ on the path because without Service Pack, SrcDir may not have the trailing \
                        set NMSDir        = $(NMSDirPreS)
                        set PROSetDir     = $(PROSetDirPreS)
                        set DriverDir     = $(DriverDirPreS)
                        set PROSetDirGiga = $(PROSetDirGigaPreS)
                        set DriverDirGiga = $(DriverDirGigaPreS)
                Endif
        Endif

        Set DetectAFTs = 0

        IfStr(i) $(!NTN_InstallMode) == deinstall
                Set StartLabel = RemoveAdapter

        Else-IfStr(i) $(!NTN_InstallMode) == update
                Set StartLabel = UpdateAdapters
                Set DetectAFTs = 1;

        Else-IfStr(i) $(!NTN_InstallMode) == bind
                Set StartLabel = BindingReview

        Else-IfStr(i) $(!NTN_InstallMode) == configure
                Set StartLabel = ConfigureAdapter

        Else-IfStr(i) $(!NTN_InstallMode) == install
                Set StartLabel = InstallAdapters
                Set DetectAFTs = 1;

        EndIf

        Set from = FatalError
        Set to   = FatalError

        IfInt $(DetectAFTs) == 1
                ; Check to see if there are AFT (obsolete) teams in the system
                ; by looking for the existence of AFT service, "iAFT"
                OpenRegKey $(!REG_H_LOCAL) "" $(AFTService) $(!REG_KEY_READ) hAFTService
                OpenRegKey $(!REG_H_LOCAL) "" $(VLANService) $(!REG_KEY_READ) hVLANService

                IfStr(i) $(hAFTService) != ""
                        Set OldTeamVLANWarning = 1
                EndIf

                IfStr(i) $(hVLANService) != ""
                        Set OldTeamVLANWarning = 1
                EndIf

                IfInt $(OldTeamVLANWarning) == 1
                        ; Display a warning messgae
                        Shell "Subroutn.Inf" SetupMessage $(!STF_LANGUAGE) "WARNING" $(AFTWarning)
                        IfStr(i) $($R0) != STATUS_SUCCESSFUL
                                return FAILED
                        Endif
                        IfStr(i) $($R1) == "CANCEL"
                                return FAILED
                        Endif
                EndIf
        EndIf

        Goto $(StartLabel)

;***********************************************************************
; Called when the user clicks the Add button in the NCPA.
;***********************************************************************
InstallAdapters = +
; This version of the software does not support NT 3.51 or earlier versions.

        Install "Install-PROSet"

        detect DetectConstants

        IfStr(i) $(OSName) == "NT351"
                set Error = $(DONT_SUPPORT_NT351)
                set CommonStatus = USER_CANCEL
                goto NoCanDo
        Endif

        Install "Install-Option"

        LoadLibrary "" $(!STF_WINDOWSSYSPATH)\$(PROSet) hLib
        LibraryProcedure DllExitStr $(hLib) InstallAdapters +
                $(ProsetOption), $(PROMon), $(STF_CONTEXTINFNAME), +
                $(!NetCardParameterName), $(!NetCardParameterValue), +
                $(!STF_GUI_UNATTENDED), $(SrcDir), $(UnAttAdapterSwitch)

        FreeLibrary $(hLib)

        Ifstr(i) $(DllExitStr) == "ERROR"
                return STATUS_USERCANCEL
        EndIf

        Install "Install-PROSet-More"

        ; Remove old files
        Install "Install-Remove-PROSet-Plus"

        return STATUS_SUCCESSFUL

;***********************************************************************
; Called when the user clicks the Update button in the NCPA.
;***********************************************************************
UpdateAdapters = +

        Install "Install-PROSet"

        detect DetectConstants

        Install "Install-Option"

        LoadLibrary "" $(!STF_WINDOWSSYSPATH)\$(PROSet) hLib
        LibraryProcedure DllExitStr $(hLib) UpdateAdapters +
                $(PROMon), $(!NTN_RegBase), $(SrcDir)
        FreeLibrary $(hLib)

        Ifstr(i) $(DllExitStr) == "ERROR"
                return STATUS_USERCANCEL
        EndIf

        Set NewInfName = $(DllExitStr)

        Install "Install-PROSet-More"

        ; Remove old PROSet Plus files
        Install "Install-Remove-PROSet-Plus"

        return STATUS_SUCCESSFUL

;***********************************************************************
; Called when the binding engine runs and the software component has a
; Review = 1 flag in the CurrentVersion key of the software component
; key.
;***********************************************************************
BindingReview = +

        LoadLibrary "" $(!STF_WINDOWSSYSPATH)\$(PROSet) hLib
        LibraryProcedure DllExitStr $(hLib) BindingReview $(ProsetOption)
        FreeLibrary $(hLib)

        return STATUS_SUCCESSFUL

;***********************************************************************
; Called when user clicks the Remove button on the NCPA to remove an
; adapter.  We only need to remove the hardware components; the NCPA
; will remove the software component when the last hardware component
; is removed.  This function is also used to remove adapter teams.
;***********************************************************************
RemoveAdapter = +

        ;***************************************************************
        ; Application specific emulation of RemoveAdapter operation.
        ;***************************************************************
        IfStr(i) $(!NTN_RegBase) == "CLEANUP"
                Install "Install-Cleanup"
                Install "Install-PROMon-Cleanup"

                LoadLibrary "" $(!STF_WINDOWSSYSPATH)\$(PROSet) hLib
                LibraryProcedure UnregNMSExitStr $(hLib) UnregisterNMS +
                        $(ProsetOption), $(!NTN_RegBase)
                FreeLibrary $(hLib)
                Install "NMS-Cleanup"

                return STATUS_SUCCESSFUL
        EndIf

        ;***************************************************************
        ; Operation initiated by the NCPA
        ;***************************************************************
        LoadLibrary "" $(!STF_WINDOWSSYSPATH)\$(PROSet) hLib
        LibraryProcedure DllExitStr $(hLib) RemoveAdapter +
                $(ProsetOption), $(!NTN_RegBase)

        IfStr(i) $(DllExitStr) == "CLEANUP"
                LibraryProcedure UnregNMSExitStr $(hLib) UnregisterNMS +
                        $(ProsetOption), $(!NTN_RegBase)
        EndIf

        FreeLibrary $(hLib)

        IfStr(i) $(DllExitStr) == "ERROR"
                return STATUS_USERCANCEL
        EndIf

        ; Remove PROSet files
        IfStr(i) $(DllExitStr) == "CLEANUP"
                Install "Install-Cleanup"
                Install "Install-PROMon-Cleanup"
        EndIf

        ; Remove NMS files
        IfStr(i) $(UnregNMSExitStr) == "CLEANUP"
                Install "NMS-Cleanup"
        EndIf

        return STATUS_SUCCESSFUL

;***********************************************************************
; Called when the user selects Properties button on an adapter.
;***********************************************************************
ConfigureAdapter = +

        LoadLibrary "" $(!STF_WINDOWSSYSPATH)\$(PROSet) hLib
        LibraryProcedure DllExitStr $(hLib) DLLEntry +
                $(!NTN_RegBase), $(ProsetOption)
        FreeLibrary $(hLib)

        IfStr(i) $(DllExitStr) == "REBOOT"
                return STATUS_SUCCESSFUL
        EndIf

        return STATUS_USERCANCEL

;***********************************************************************
; Something's busted!
;***********************************************************************
FatalError = +

        return STATUS_FAILED

; Adapter/Driver detection
;
; We land here if no adapter was detected, or if all detected drivers
; already have drivers loaded.

NoCanDo = +
        Debug-Output "$(InfFile) : NoCanDo"
        Set Severity = NONFATAL
        goto NoCanDoMsg

NoCanDoMsg = +
        IfStr(i) $(Error) == ""
                Set Severity = NONFATAL
                Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
                Ifint $($ShellCode) != $(!SHELL_CODE_OK)
                        goto InfError
                Endif
                set Error = $($R0)
        Endif
        Shell $(SubroutineInf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
                goto InfError
        Endif
        IfStr(i) $($R1) == "OK"
                return STATUS_USERCANCEL
        Else
                return STATUS_USERCANCEL
        Endif

InfError = +
        IfInt $($ShellCode) == $(!SHELL_CODE_NO_SUCH_INF)
                Debug-Output "$(InfFile) : InfError - SHELL_CODE_NO_SUCH_INF"
        Else-IfInt $($ShellCode) == $(!SHELL_CODE_NO_SUCH_SECTION)
            Debug-Output "$(InfFile) : InfError - SHELL_CODE_NO_SUCH_SECTION"
        Else
            Debug-Output "$(InfFile) : InfError - SHELL_CODE_ERROR"
        Endif
;       endif
        set DlgType = "MessageBox"
        set STF_MB_TITLE = $(ShellCodeErrorTitle)
        set STF_MB_TEXT = $(ShellCodeErrorText)
        set STF_MB_TYPE = 1
        set STF_MB_ICON = 3
        set STF_MB_DEF = 1
        ui start "Error Message"

        set CommonStatus = STATUS_FAILED
        Return $(CommonStatus)

; Adapter/Driver detection end.

;***********************************************************************
; Install the PROSet files.
;***********************************************************************
[Install-PROSet]
        Set STF_VITAL = 1
        Set STF_OVERWRITE        = "VERIFYSOURCEOLDER"

        ; Determine the OS language for selecting localized files
        Set AppLangID = "LangId.dll"
        Set FileToCheck = $(SrcDir)$(AppLangID)
        LibraryProcedure FilePresent, $(!LIBHANDLE), CheckFileExistance $(FileToCheck)
        IfStr(i) $(FilePresent) == "NO"
            Set LangID = "ENU"
        Else
            LoadLibrary "" $(FileToCheck) hLib
            LibraryProcedure DllExitStr $(hLib) GetOSLanguage
            Set LangID = $(DllExitStr)
            FreeLibrary $(hLib)
        Endif

        set FileToCheck = $(SrcDir)$(NMSDir)\$(LangID)\$(NMSSvcSrc)
        LibraryProcedure CompressedFiles, $(!LIBHANDLE), CheckFileExistance $(FileToCheck)

        IfStr(i) $(CompressedFiles) == "NO"
                AddSectionFilesToCopyList Files-NMSService-Drivers-NC $(SrcDir) +
                        $(!STF_WINDOWSSYSPATH)\drivers
                AddSectionFilesToCopyList Files-NMSService-System-NC $(SrcDir) +
                        $(!STF_WINDOWSSYSPATH)
                AddSectionFilesToCopyList Files-PROSet-System-NC $(SrcDir) +
                        $(!STF_WINDOWSSYSPATH)
        Else
                AddSectionFilesToCopyList Files-NMSService-Drivers $(SrcDir) +
                        $(!STF_WINDOWSSYSPATH)\drivers
                AddSectionFilesToCopyList Files-NMSService-System $(SrcDir) +
                        $(!STF_WINDOWSSYSPATH)
                AddSectionFilesToCopyList Files-PROSet-System $(SrcDir) +
                        $(!STF_WINDOWSSYSPATH)
        Endif

        Set !STF_NCPA_FLUSH_COPYLIST = 1
        CopyFilesInCopyList

        Exit

[Files-NMSService-Drivers]
        1, $(NMSDir)\$(NMSCfgSrc),     SIZE=15000, RENAME=$(NMSCfg)
        1, $(NMSDir)\$(NMSDDSrc),      SIZE=25000, RENAME=$(NMSDD)

[Files-NMSService-System]
        1, $(NMSDir)\$(LangID)\$(NMSSvcSrc),     SIZE=600000, RENAME=$(NMSSvc)
        1, $(NMSDir)\$(NMSSvcPSSrc),   SIZE=15000, RENAME=$(NMSSvcPS)
        1, $(NMSDir)\$(NMSMsgSrc),     SIZE=10000, RENAME=$(NMSMsg)
        1, $(NMSDir)\$(NMSAPISrc),     SIZE=60000, RENAME=$(NMSAPI)
        1, $(NMSDir)\$(RegSvr32Src),   SIZE=20000, RENAME=$(RegSvr32), OVERWRITE=NEVER

[Files-PROSet-System]
        1, $(PROSetDir)\$(LangID)\$(PROMonSrc),     SIZE=20000, RENAME=$(PROMon)
        1, $(PROSetDir)\$(LangID)\$(PROSetHelpSrc), SIZE=100000, RENAME=$(PROSetHelp)
        1, $(PROSetDir)\$(LangID)\$(PROSetCntSrc),  SIZE=5000, RENAME=$(PROSetCnt)
        1, $(PROSetDir)\$(ROBOEX32Src),   SIZE=160000, RENAME=$(ROBOEX32)
        1, $(PROSetDir)\$(INETWH32Src),   SIZE=30000, RENAME=$(INETWH32)
        2, $(PROSetDir)\$(LangID)\$(PROSetSrc),     SIZE=350000, RENAME=$(PROSet)

[Files-NMSService-Drivers-NC]
        1, $(NMSDir)\$(NMSCfgSrcNC),     SIZE=15000, RENAME=$(NMSCfg)
        1, $(NMSDir)\$(NMSDDSrcNC),      SIZE=25000, RENAME=$(NMSDD)

[Files-NMSService-System-NC]
        1, $(NMSDir)\$(LangID)\$(NMSSvcSrcNC),     SIZE=600000, RENAME=$(NMSSvc)
        1, $(NMSDir)\$(NMSSvcPSSrcNC),   SIZE=15000, RENAME=$(NMSSvcPS)
        1, $(NMSDir)\$(NMSMsgSrcNC),     SIZE=10000, RENAME=$(NMSMsg)
        1, $(NMSDir)\$(NMSAPISrcNC),     SIZE=60000, RENAME=$(NMSAPI)
        1, $(NMSDir)\$(RegSvr32SrcNC),   SIZE=20000, RENAME=$(RegSvr32), OVERWRITE=NEVER

[Files-PROSet-System-NC]
        1, $(PROSetDir)\$(LangID)\$(PROMonSrcNC),     SIZE=20000, RENAME=$(PROMon)
        1, $(PROSetDir)\$(LangID)\$(PROSetHelpSrcNC), SIZE=100000, RENAME=$(PROSetHelp)
        1, $(PROSetDir)\$(LangID)\$(PROSetCntSrcNC),  SIZE=5000, RENAME=$(PROSetCnt)
        1, $(PROSetDir)\$(ROBOEX32SrcNC),   SIZE=160000, RENAME=$(ROBOEX32)
        1, $(PROSetDir)\$(INETWH32SrcNC),   SIZE=30000, RENAME=$(INETWH32)
        2, $(PROSetDir)\$(LangID)\$(PROSetSrcNC),     SIZE=350000, RENAME=$(PROSet)

;***********************************************************************
; Finish up the install of PROSet
;***********************************************************************
[Install-PROSet-More]

        IfStr(i) $(NewInfName) != ""
                AddSectionFilesToCopyList Files-Option-Inf $(SrcDir) +
                        $(!STF_WINDOWSSYSPATH)

        EndIf

        Set !STF_NCPA_FLUSH_COPYLIST = 1
        CopyFilesInCopyList

        ; Install PROMon to run each time NT 4 starts
        IfStr(i) $(OSName) == "NT4"
                OpenRegKey $(!REG_H_LOCAL) "" +
                        "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" +
                        $(!REG_KEY_SET_VALUE) KeyWinRun
                SetRegValue $(KeyWinRun) {$(PROMon), 0, $(!REG_VT_SZ), $(PROMon)}
                CloseRegKey $(KeyWinRun)
        EndIf

        ; Remove Old PROSet
        AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\$(PROSetOld)

        Exit

;***********************************************************************
; Remove PROMon hook
;***********************************************************************
[Install-PROMon-Cleanup]

        OpenRegKey $(!REG_H_LOCAL) "" +
                "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" +
                $(!REG_KEY_SET_VALUE) KeyWinRun
        DeleteRegValue $(KeyWinRun) $(PROMon)
        CloseRegKey $(KeyWinRun)

        Exit

;***********************************************************************
; Install the Option files.
;***********************************************************************
[Install-Option]
        Set STF_VITAL = 1
        Set STF_OVERWRITE = "VERIFYSOURCEOLDER"

        ; Prior to installing the drivers, lets see if the install media has the ANS driver

        IfStr(i) $(ProsetOption) == "E1000"
                set FileToCheck = $(SrcDir)$(DriverDirGiga)\$(NDIS4GigSrcNC)
                LibraryProcedure UnCompressedFiles, $(!LIBHANDLE), CheckFileExistance $(FileToCheck)
        Else
                set FileToCheck = $(SrcDir)$(DriverDir)\$(NDIS4SrcNC)
                LibraryProcedure UnCompressedFiles, $(!LIBHANDLE), CheckFileExistance $(FileToCheck)
        Endif

        IfStr(i) $(OSName) == "NT4"
                Ifstr(i) $(UnCompressedFiles) == "YES"
                        set FileToCheck = $(SrcDir)$(DriverDir)\$(IANSSrcNC)
                        LibraryProcedure AnsFilePresent,$(!LIBHANDLE), CheckFileExistance $(FileToCheck)

                        set FileToCheck = $(SrcDir)$(DriverDir)\$(IANSESrcNC)
                        LibraryProcedure AnsEFilePresent,$(!LIBHANDLE), CheckFileExistance $(FileToCheck)

                        set FileToCheck = $(SrcDir)$(DriverDir)\$(IANSNSrcNC)
                        LibraryProcedure AnsNFilePresent,$(!LIBHANDLE), CheckFileExistance $(FileToCheck)

                        IfStr(i) $(ProsetOption) == "E100B"
                                set FileToCheck = $(SrcDir)$(ModemEnablerSrcNC)
                                LibraryProcedure ModemEnablerFilePresent, $(!LIBHANDLE), CheckFileExistance $(FileToCheck)

                                Ifstr(i) $(ModemEnablerFilePresent) == "YES"
                                        AddSectionFilesToCopyList Files-Option-Drivers-NT4-ModemEnabler-NC $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
                                Endif
                        Endif

                        set FileToCheck = $(SrcDir)$(PROSetDir)\$(PROSetRegSrcNC)
                        LibraryProcedure PROSetRegFilePresent,$(!LIBHANDLE), CheckFileExistance $(FileToCheck)

                        set FileToCheck = $(SrcDir)$(NMSDir)\$(NmsMvftSrcNC)
                        LibraryProcedure MFVTRegFilePresent,$(!LIBHANDLE), CheckFileExistance $(FileToCheck)

                        IfStr(i) $(AnsFilePresent) == "YES"
                                AddSectionFilesToCopyList Files-Option-Drivers-NT4-Ans-NC $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
                        Endif

                        IfStr(i) $(AnsEFilePresent) == "YES"
                                AddSectionFilesToCopyList Files-Option-Drivers-NT4-AnsE-NC $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
                        Endif

                        IfStr(i) $(AnsNFilePresent) == "YES"
                                AddSectionFilesToCopyList Files-Option-Drivers-NT4-AnsN-NC $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
                        Endif

                        IfStr(i) $(PROSetRegFilePresent) == "YES"
                                AddSectionFilesToCopyList Files-Option-Reg-NC $(SrcDir) $(!STF_WINDOWSSYSPATH)
                        Endif

                        IfStr(i) $(MFVTRegFilePresent) == "YES"
                                AddSectionFilesToCopyList Files-Option-MVFT-NC $(SrcDir) $(!STF_WINDOWSSYSPATH)
                        Endif
                Else
                        set FileToCheck = $(SrcDir)$(DriverDir)\$(IANSSrc)
                        LibraryProcedure AnsFilePresent,$(!LIBHANDLE), CheckFileExistance $(FileToCheck)

                        set FileToCheck = $(SrcDir)$(DriverDir)\$(IANSESrc)
                        LibraryProcedure AnsEFilePresent,$(!LIBHANDLE), CheckFileExistance $(FileToCheck)

                        set FileToCheck = $(SrcDir)$(DriverDir)\$(IANSNSrc)
                        LibraryProcedure AnsNFilePresent,$(!LIBHANDLE), CheckFileExistance $(FileToCheck)

                        IfStr(i) $(ProsetOption) == "E100B"
                                set FileToCheck = $(SrcDir)$(DriverDir)\$(ModemEnablerSrc)
                                LibraryProcedure ModemEnablerFilePresent,$(!LIBHANDLE), CheckFileExistance $(FileToCheck)

                                IfStr(i) $(ModemEnablerFilePresent) == "YES"
                                        AddSectionFilesToCopyList Files-Option-Drivers-NT4-ModemEnabler $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
                                Endif
                        Endif

                        set FileToCheck = $(SrcDir)$(PROSetDir)\$(PROSetRegSrc)
                        LibraryProcedure PROSetRegFilePresent,$(!LIBHANDLE), CheckFileExistance $(FileToCheck)

                        set FileToCheck = $(SrcDir)$(NMSDir)\$(NmsMvftSrc)
                        LibraryProcedure MFVTRegFilePresent,$(!LIBHANDLE), CheckFileExistance $(FileToCheck)

                        IfStr(i) $(AnsFilePresent) == "YES"
                                AddSectionFilesToCopyList Files-Option-Drivers-NT4-Ans $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
                        Endif

                        IfStr(i) $(AnsEFilePresent) == "YES"
                                AddSectionFilesToCopyList Files-Option-Drivers-NT4-AnsE $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
                        Endif

                        IfStr(i) $(AnsNFilePresent) == "YES"
                                AddSectionFilesToCopyList Files-Option-Drivers-NT4-AnsN $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
                        Endif

                        IfStr(i) $(PROSetRegFilePresent) == "YES"
                                AddSectionFilesToCopyList Files-Option-Reg $(SrcDir) $(!STF_WINDOWSSYSPATH)
                        Endif

                        IfStr(i) $(MFVTRegFilePresent) == "YES"
                                AddSectionFilesToCopyList Files-Option-MVFT $(SrcDir) $(!STF_WINDOWSSYSPATH)
                        Endif
                Endif
        Endif

        IfStr(i) $(ProsetOption) == "E1000"
                IfStr(i) $(UnCompressedFiles) == "YES"
                        AddSectionFilesToCopyList Files-Option-GigDrivers-NC-NT4 $(SrcDir) +
                                $(!STF_WINDOWSSYSPATH)\drivers
                Else
                        AddSectionFilesToCopyList Files-Option-GigDrivers-NT4 $(SrcDir) +
                                $(!STF_WINDOWSSYSPATH)\drivers
                EndIf
        Else
                IfStr(i) $(UnCompressedFiles) == "YES"
                        AddSectionFilesToCopyList Files-Option-Drivers-NC-NT4 $(SrcDir) +
                                $(!STF_WINDOWSSYSPATH)\drivers
                Else
                        AddSectionFilesToCopyList Files-Option-Drivers-NT4 $(SrcDir) +
                                $(!STF_WINDOWSSYSPATH)\drivers
                EndIf
        Endif

        Set !STF_NCPA_FLUSH_COPYLIST = 1
        CopyFilesInCopyList

        IfStr(i) $(PROSetRegFilePresent) == "YES"
                RunProgram ExitCode "" "" $(!STF_WINDOWSPATH)\REGEDIT.EXE /S $(PROSetReg)
                AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\$(PROSetReg)
        EndIf

        IfStr(i) $(MFVTRegFilePresent) == "YES"
                RunProgram ExitCode "" "" $(!STF_WINDOWSPATH)\REGEDIT.EXE /S $(NmsMvft)
                AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\$(NmsMvft)
        EndIf

        Exit

[Files-Option-Drivers-NT4]
        2, $(DriverDir)\$(NDIS4Src), SIZE=35000, RENAME=$(NDIS4)

[Files-Option-GigDrivers-NT4]
        2, $(DriverDirGiga)\$(NDIS4GigSrc), SIZE=50000, RENAME=$(NDIS4Gig)

[Files-Option-Drivers-NT4-ModemEnabler]
        2, $(DriverDir)\$(ModemEnablerSrc), SIZE=50000, RENAME=$(ModemEnabler)

[Files-Option-Drivers-NT4-Ans]
        2, $(DriverDir)\$(IANSSrc),  SIZE=100000, RENAME=$(IANS)

[Files-Option-Drivers-NT4-AnsE]
        2, $(DriverDir)\$(IANSESrc),  SIZE=100000, RENAME=$(IANSE)

[Files-Option-Drivers-NT4-AnsN]
        2, $(DriverDir)\$(IANSNSrc),  SIZE=100000, RENAME=$(IANSN)

[Files-Option-Inf]
        2, OEMSETUP.INF,   SIZE=30000, RENAME=$(NewInfName), +
                OVERWRITE=ALWAYS

[Files-Option-Reg]
        2, $(PROSetDir)\$(PROSetRegSrc),  SIZE=50000, RENAME=$(PROSetReg)

[Files-Option-MVFT]
        2, $(NMSDir)\$(NmsMvftSrc),  SIZE=1000, RENAME=$(NmsMvft)

[Files-Option-Drivers-NC-NT4]
        2, $(DriverDir)\$(NDIS4SrcNC), SIZE=35000, RENAME=$(NDIS4)

[Files-Option-GigDrivers-NC-NT4]
        2, $(DriverDirGiga)\$(NDIS4GigSrcNC), SIZE=50000, RENAME=$(NDIS4Gig)

[Files-Option-Drivers-NT4-ModemEnabler-NC]
        2, $(DriverDir)\$(ModemEnablerSrcNC), SIZE=50000, RENAME=$(ModemEnabler)

[Files-Option-Drivers-NT4-Ans-NC]
        2, $(DriverDir)\$(IANSSrcNC),  SIZE=100000, RENAME=$(IANS)

[Files-Option-Drivers-NT4-AnsE-NC]
        2, $(DriverDir)\$(IANSESrcNC),  SIZE=100000, RENAME=$(IANSE)

[Files-Option-Drivers-NT4-AnsN-NC]
        2, $(DriverDir)\$(IANSNSrcNC),  SIZE=100000, RENAME=$(IANSN)

[Files-Option-Reg-NC]
        2, $(PROSetDir)\$(PROSetRegSrcNC),  SIZE=50000, RENAME=$(PROSetReg)

[Files-Option-MVFT-NC]
        2, $(NMSDir)\$(NmsMvftSrcNC),  SIZE=1000, RENAME=$(NmsMvft)

;***********************************************************************
; Clean system of adapter files.
;***********************************************************************
[Install-Cleanup]

        AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\drivers\$(NDIS3)
        AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\drivers\$(NDIS4)
        AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\drivers\$(NDIS3Gig)
        AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\drivers\$(NDIS4Gig)
        AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\drivers\$(IANS)
        AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\drivers\$(IANSE)
        AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\drivers\$(IANSN)

        AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\$(PROSet)
        AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\$(PROMon)
        AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\$(PROSetHelp)
        AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\$(PROSetCnt)
        AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\$(PROSetReg)
        AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\$(ROBOEX32)

        Exit

;***********************************************************************
; Remove NMS files
;***********************************************************************
[NMS-Cleanup]

        AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\drivers\$(NMSCfg)
        AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\drivers\$(NMSDD)

        AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\$(NMSSvc)
        AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\$(NMSSvcPS)
        AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\$(NMSMsg)
        AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\$(NMSAPI)
        AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\$(NmsMvft)

        Exit

;***********************************************************************
; Remove old PROSet Plus files
;***********************************************************************
[Install-Remove-PROSet-Plus]

        AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\drivers\$(PROKddp)
        AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\drivers\$(PROdd)
        AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\drivers\$(iAFT)
        AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\drivers\$(iVLAN)

        AddFileToDeleteList $(!STF_WINDOWSSYSPATH)\$(PROSetOld)

        Exit
