WinNT/oemsetup.inf Driver File Contents (GM1650_1660_DRV_v1.0.zip)

Driver Package File Name: GM1650_1660_DRV_v1.0.zip
File Size: 1.6 MB

; Setup script for 10/100/1000 Mbps 32-bit PCI Network Adapter
[Identification]
	OptionType = NetAdapter
[PlatformsSupported]
	PCI
[Options]
	GEV2COPPER
[CardIds]
	PCIID_1		= "0x11AB4320", {"", 4523, 17184}
[PreferredPort_Choices]
	PREFERREDPORT_1		= 1, "A"
	PREFERREDPORT_2		= 2, "B"
[RlmtMode_Choices]
	RLMTMODE_1		= 1, "CLS"
	RLMTMODE_3		= 3, "CLP"
	RLMTMODE_7		= 7, "CLPSS"
[SpeedMode_Choices]
	SPEEDMODE_1		= 1, "AUTO"
	SPEEDMODE_2		= 2, "10"
	SPEEDMODE_3		= 3, "100"
	SPEEDMODE_4 		= 4, "1000"
[DuplexCapabilities]
	DUPCAP_1		= 1, "Half Duplex"
	DUPCAP_2		= 2, "Full Duplex"
	DUPCAP_3		= 3, "Half and Full Duplex"
[AutoNegotiationCapabilities]
	AUTONEG_1		= 0, "Off"
	AUTONEG_2		= 1, "On"
	AUTONEG_3		= 2, "Auto-Sense"
[RoleCapabilities]
	ROLCAP_1		= 0, "Auto"
	ROLCAP_2		= 2, "Master"
	ROLCAP_3		= 3, "Slave"
[FileConstants]
	ParamInf		= "NCPARAM.INF"
	UtilityInf		= "UTILITY.INF"
	subroutineinf		= "SUBROUTN.INF"
	SoftwareType		= "driver"
	Exit_Code		= 0
	NetEventDLL		= "%SystemRoot%\System32\Drivers\gnicnt.sys"
	IoLogMsgDLL		= "%SystemRoot%\System32\IoLogMsg.dll"
        EthCards		= {GEV2COPPER}
	Manufacturer		= "PLANET"
	Card_IDs		= ^(CardIds, 2)
	MaxFrameSizeDefault	= 1514
	MaxFrameSizeJum         = 9014
	MinFrameSize		= 14
	MediaTypeDefault	= 1
	PreferredPortValList	= ^(PreferredPort_Choices, 1)
	PreferredPortStrList	= ^(PreferredPort_Choices, 2)
	PreferredPortDefault	= *($(PreferredPortValList), 1)
	RlmtModeValList		= ^(RlmtMode_Choices, 1)
	RlmtModeStrList		= ^(RlmtMode_Choices, 2)
	RlmtModeDefault		= *($(RlmtModeValList), 1)
	MaxMulticastDefault	= 128
	DupCapBDefault		= 3
	AutoNegBDefault		= 1
	FlowControlADefault	= 3
	FlowControlBDefault	= 3
	RoleBDefault		= 0
	SpeedModeValList	= ^(SpeedMode_Choices, 1)
	SpeedModeStrList	= ^(SpeedMode_Choices, 2)
	SpeedADefault		= *($(SpeedModeValList), 1)
        DupCapValList		= ^(DuplexCapabilities, 1)
	DupCapStrList		= ^(DuplexCapabilities, 2)
	DupCapADefault		= *($(DupCapValList), 3)
        AutoNegValList		= ^(AutoNegotiationCapabilities, 1)
	AutoNegStrList		= ^(AutoNegotiationCapabilities, 2)
        AutoNegADefault		= *($(AutoNegValList), 2)
        RoleValList		= ^(RoleCapabilities, 1)
	RoleStrList	        = ^(RoleCapabilities, 2)
	RoleADefault		= *($(RoleValList), 1)
	ProductMajorVersion	= "6"
	ProductMinorVersion	= "13"
	ProductSoftwareName	= "YUKONWNT"
	ProductSoftwareImagePath= "\SystemRoot\System32\Drivers\gnicnt.sys"
	NetRuleSoftwareType	= "yukonwntSys ndisDriver yukonwntDriver"
	NetRuleSoftwareBindForm = """yukonwntSys"" yes no container"
	NetRuleSoftwareClass	= {"yukonwntDriver basic"}
	NetRuleSoftwareBindable = {"yukonwntDriver yukonwntAdapter non exclusive 100"}
	ProductHardwareName	= "yukonwnt"
	NetRuleHardwareType	= "yukonwnt yukonwntAdapter"
	NetRuleHardwareClass	= {"yukonwntAdapter basic"}
	ProductVersion		= $(ProductMajorVersion)"."$(ProductMinorVersion)
	NetRuleHardwareBindForm = " yes yes container"
	ProductKeyName		= $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"+
				  $(ProductSoftwareName)"\CurrentVersion"
	ParamKeyName		= $(!NTN_ServiceBase)$(ProductHardwareName)"\Parameters"
	NetRuleSoftwareUse	= $(SoftwareType)
[GeneralConstants]
	from			= ""
	to			= ""
	ExitCodeOk		= 0
	ExitCodeCancel		= 1
	ExitCodeFatal		= 2
	KeyNull 		= ""
	MAXIMUM_ALLOWED 	= 33554432
	RegistryErrorIndex	= NO_ERROR
	KeyProduct		= ""
	KeyParameters		= ""
	TRUE			= 1
	FALSE			= 0
	NoTitle 		= 0
	ExitState		= "Active"
	OldVersionExisted	= $(FALSE)
	DriverPath		= $(!STF_NTPATH)\drivers
[date]
	Now = {} ? $(!LIBHANDLE) GetSystemDate
[Identify]
	read-syms Identification
	Set Status	= STATUS_SUCCESSFUL
	Set Identifier	= $(OptionType)
	Set Media	= #("Source Media Descriptions", 1, 1)
	Return $(Status) $(Identifier) $(Media)
[ReturnOptions]
	Set Status		= STATUS_FAILED
	Set OptionList		= {}
	Set OptionTextList	= {}
	Set LanguageList	= ^(LanguagesSupported, 1)
	IfContains(i) $($0) in $(LanguageList)
		IfStr(i) $($1) == ""
			goto returnoptions
		EndIf
		Set PlatformList = ^(PlatformsSupported, 1)
		IfContains(i) $($1) in $(PlatformList)
			goto returnoptions
		Else
			Set Status = STATUS_NOTSUPPORTED
			goto finish_ReturnOptions
		EndIf
	Else
		Set Status = STATUS_NOLANGUAGE
		goto finish_ReturnOptions
	EndIf
returnoptions = +
	Set OptionList		= ^(Options, 1)
	Set OptionTextList	= ^(OptionsText$($0), 1)
	Set Status		= STATUS_SUCCESSFUL
finish_ReturnOptions = +
	Return $(Status) $(OptionList) $(OptionTextList)
[InstallOption]
	Set InfOption		= $($1)
	Set Option		= $($1)
	Set SrcDir		= $($2)
	Set AddCopy		= $($3)
	Set DoCopy		= $($4)
	Set DoConfig		= $($5)
	Set LanguageList	= ^(LanguagesSupported, 1)
	IfContains(i) $($0) NOT-IN $(LanguageList)
		Return STATUS_NOLANGUAGE
	EndIf
	Set-subst LF = "\n"
	read-syms GeneralConstants
	read-syms FileConstants
	read-syms DialogConstants$(!STF_LANGUAGE)
	IfStr(i) $(!NTN_Origination) == "NCPA"
		Set Continue = $(OK)
	EndIf
	read-syms FileConstants$(!STF_LANGUAGE)
	detect date
	Set-title  $(Function$(Option)Title)
	Set to			= Begin
	Set from		= Begin
	Set CommonStatus	= STATUS_SUCCESSFUL
	EndWait
Begin = +
	Set ActivateDetection = FALSE
	Set BusNumList = {}
	Set Combo1List = {}
	IfStr(i) $(!NTN_InstallMode) == deinstall
		Goto checkmode
	Else-IfStr(i) $(!NTN_InstallMode) == update
		Goto checkmode
	Else-IfStr(i) $(!NTN_InstallMode) == bind
		Goto checkmode
	EndIf
	Set BusNumber		= 0
	Set BusInterfaceType	= 5
	Set BusTypeStr		= "Pci"
	Set AdaptersFoundFlag	= FALSE
	IfStr(i) *($(!STF_BUSTYPELIST),1) == ""
		Shell $(UtilityInf), GetBusTypeNum
		Set BusTypeNum = $($R1)
	Else
		Set BusTypeNum = 5
	EndIf
	Set OptionList = ^(Options, 1)
	ForListDo $(Card_IDs)
		Set PCIVendorID = *($($), 2)
		Set PCIDeviceID = *($($), 3)
		Shell $(UtilityInf), GetPCIInformation, $(PCIVendorID), $(PCIDeviceID)
		IfInt $($ShellCode) != $(!SHELL_CODE_OK)
			Goto ShellCodeError
		EndIf
		IfStr(i) $($R0) != {}
			ForListDo $($R0)
				Set BusNum	= *($($),1)
				Set SlotNum	= *($($),2)
				Set AdaptersFoundFlag	= TRUE
				Set NicAlreadyInstalled = FALSE
				ForListDo $(OptionList)
					Shell $(UtilityInf), +
						IsNetCardAlreadyInstalled, +
						$(BusNum), $(SlotNum), +
						$(ProductHardware$($)Description), +
						$(ProductHardwareName)
					IfInt $($ShellCode) != $(!SHELL_CODE_OK)
						goto ShellCodeError
					Endif
					Ifstr $($R0) != "NO_ERROR"
						set Error = $($R0)
						goto fatal
					Endif
					IfStr(i) $($R1) != "NO"
						Set NicAlreadyInstalled = TRUE
					EndIf
				EndForListDo
				IfStr(i) $(NicAlreadyInstalled) == FALSE
					Set Combo1List	= >($(Combo1List),$(BusNum)" / "$(SlotNum))
				EndIf
			EndForListDo
		EndIf
	EndForListDo
	IfStr(i) $(Combo1List) == {}
		IfStr(i) $(AdaptersFoundFlag) == FALSE
			Set Error = "Error: No "+
				  $(ProductHardware$(InfOption)Title)+
				  " installed."
			Goto fatal
		Endif
		IfStr(i) $(!NTN_InstallMode) == install
			Set Error	= "Error: No further "+
				  $(ProductHardware$(InfOption)Title)+
				  " installed."
			Goto fatal
		EndIf
	EndIf
checkmode = +
	IfStr(i) $(!NTN_InstallMode) == deinstall
		Set StartLabel = removeadapter
	Else-IfStr(i) $(!NTN_InstallMode) == update
		Set StartLabel = UpgradeSoftware
	Else-IfStr(i) $(!NTN_InstallMode) == bind
		Set StartLabel = bindingadapter
	Else-IfStr(i) $(!NTN_InstallMode) == configure
		Set CommonStatus = STATUS_REBOOT
		Set StartLabel = configureadapter
		IfStr(i) $(ProductKeyName) == $(!NTN_RegBase)
			Shell $(UtilityInf), RegistryErrorString, CANNOT_CONFIGURE_SOFTWARE
			IfInt $($ShellCode) != $(!SHELL_CODE_OK)
				goto ShellCodeError
			EndIf
			Set Error	= $($R0)
			Set from	= end
			Set to		= end
			goto nonfatalinfo
		EndIf
	Else
		Set AddCopy                     = "YES"
		Set DoCopy                      = "YES"
		Set !STF_SRCDIR_OVERRIDE        = $(SrcDir)
		IfStr(i) $(DoCopy) == "YES"
			IfStr(i) $(!STF_SRCDIR_OVERRIDE) != ""
				Install Install-Helpfile
			EndIf
		EndIf
		Set StartLabel			= installadapter
		Set OEM_ABANDON_OPTIONS 	= {}
		Set OEM_ABANDON_SOFTWARE	= FALSE
		Set OEM_ABANDON_ON		= TRUE
	EndIf
	Set MaxFrameSize	= $(MaxFrameSizeDefault)
	Set CardMediaType	= $(MediaTypeDefault)
	Set MaxMulticast	= $(MaxMulticastDefault)
	Set DupCapA		= $(DupCapADefault)
	Set AutoNegA		= $(AutoNegADefault)
	Set FlowControlA	= $(FlowControlADefault)
	Set RoleA		= $(RoleADefault)
	IfStr(i) $(Option) == "GEV2COPPER"
		Set SpeedModeValue	= $(SpeedADefault)
	EndIf
	Set DetectedCard = FALSE
	IfStr(i) $(ActivateDetection) != TRUE
		Goto skipdetection
	EndIf

	Shell $(ParamInf), Param_BuildTypeLists, YUKONWNT, $(TypeList)
	Set Status = $($R0)
	IfStr(i) $(Status) != STATUS_SUCCESSFUL
		Goto fatal
	EndIf
	Shell $(ParamInf), Param_SetDefaults, {}
	IfStr(i) $(!STF_NCDETECT) == YES
		IfStr(i) $(!STF_NCOPTION) == $(Option)
			Set DetectedCard = TRUE
		EndIf
	EndIf
skipdetection = +
	Set from	= $(fatal)
	Set to		= $(fatal)
	goto $(StartLabel)
installadapter = +
	OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
	IfStr $(KeyProduct) != $(KeyNull)
		CloseRegKey $(KeyProduct)
		IfStr(i) !(NTN_RegBase) == $(ProductKeyName)
			Shell $(UtilityInf), VerExistedDlg, $(ProductSoftware$(Option)Title),+
			  $(ProductVersion)
			IfInt $($ShellCode) != $(!SHELL_CODE_OK)
				goto ShellCodeError
			EndIf
			goto end
		Else
			Shell $(UtilityInf), CardExistedDlg
			IfInt $($ShellCode) != $(!SHELL_CODE_OK)
				goto ShellCodeError
			EndIf
			IfStr(i) $($R1) != "OK"
				Set CommonStatus = STATUS_USERCANCEL
				goto end
			EndIf
			Set OldVersionExisted = $(TRUE)
		EndIf
	EndIf
	IfStr(i) $(DetectedCard) != TRUE
		Goto adaptersetup
	EndIf
	StartWait
	Shell $(ParamInf), Param_QueryCard, $(!STF_NCDETCARD)
	EndWait
	IfStr(i) $($R0) != STATUS_SUCCESSFUL
		Goto adaptersetup
	EndIf
	Set DetectedParams = $($R1)
	Shell $(ParamInf), Param_SetDefaults, $(DetectedParams)
	goto adapteroptions
configureadapter = +
	IfStr $(KeyProduct) == $(KeyNull)
		OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
		IfStr $(KeyProduct) == $(KeyNull)
			Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
			goto fatalregistry
		EndIf
	EndIf
	Shell $(UtilityInf), FindService, $(KeyProduct)
	IfInt $($ShellCode) != $(!SHELL_CODE_OK)
		Goto ShellCodeError
	EndIf
	IfStr(i) $($R0) != NO_ERROR
		Goto fatalregistry
	EndIf
	Set KeyParameters = $($R2)
	CloseRegKey $($R1)
	IfStr $(KeyParameters) == $(KeyNull)
		Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
		goto fatalregistry
	EndIf
	Set OldVersionExisted	= $(TRUE)
	Set ValueName		= ""
	Set ValueData		= ""
	Set ValueStr		= ""
	Set ValueList		= {}
	EnumRegValue $(KeyParameters) ValueList
	ForListDo $(ValueList)
		Set ValueItem	= $($)
		Set ValueName	= *($(ValueItem),1)
		Set ValueData	= *($(ValueItem),4)
		IfStr(i) $(ValueName) == "SlotNumber"
			Set SlotNumber		= $(ValueData)
                Else-IfStr(i) $(ValueName) == "MediaType"
                        Set CardMediaType       = $(ValueData)
		Else-IfStr(i) $(ValueName) == "NetworkAddress"
			Set NetworkAddress	= $(ValueData)
		Else-IfStr(i) $(ValueName) == "MaxFrameSize"
			Set MaxFrameSize	= $(ValueData)
		Else-IfStr(i) $(ValueName) == "MaxMulticast"
			Set MaxMulticast	= $(ValueData)
		Else-IfStr(i) $(ValueName) == "DuplexCapabilities_A"
			Set DupCapA		= $(ValueData)
		Else-IfStr(i) $(ValueName) == "AutoNegotiation_A"
			Set AutoNegA		= $(ValueData)
		Else-IfStr(i) $(ValueName) == "FlowControl_A"
			Set FlowControlA	= $(ValueData)
		Else-IfStr(i) $(ValueName) == "Role_A"
			Set RoleA		= $(ValueData)
		Else-IfStr(i) $(ValueName) == "Speed_A"
			Set SpeedModeValue	= $(ValueData)
		Else-IfStr(i) $(ValueName) == "PreferredPort"
			Set PreferredPortValue	= $(ValueData)
		Else-IfStr(i) $(ValueName) == "RlmtMode"
			Set RlmtModeValue	= $(ValueData)
		Else-IfStr(i) $(ValueName) == "DuplexCapabilities_B"
			Set DupCapB		= $(ValueData)
		Else-IfStr(i) $(ValueName) == "AutoNegotiation_B"
			Set AutoNegB		= $(ValueData)
		Else-IfStr(i) $(ValueName) == "FlowControl_B"
			Set FlowControlB	= $(ValueData)
		Else-IfStr(i) $(ValueName) == "Role_B"
			Set RoleB		= $(ValueData)
		EndIf
		IfStr(i) $(BusTypeStr) == "Pci"
			IfStr(i) $(ValueName) == "BusNumber"
				Set BusNumber		= $(ValueData)
			EndIf
		EndIf
	EndForListDo
	Set Combo1List	= >($(Combo1List),$(BusNumber)" / "$(SlotNumber))
adaptersetup = +
	IfStr(i) $(DetectedCard) == TRUE
		IfStr(i) $(!STF_INSTALL_MODE) != CUSTOM
			Goto adapterverify
		EndIf
	EndIf
	goto adapteroptions
adapteroptions = +
	IfStr(i) $(!STF_GUI_UNATTENDED) == "YES"
		IfStr(i) $(!AutoNetInterfaceType) != ""
			set BusInterfaceType = $(!AutoNetInterfaceType)
		EndIf
		IfStr(i) $(!AutoNetBusNumber) != ""
			set BusNumber = $(!AutoNetBusNumber)
		EndIf
		goto adapteroptions2
	EndIf
	Set from = adapteroptions
	Set SlotNumber = $(BusNumber)" / "$(SlotNumber)
	Goto adapteroptions2
adapteroptions2 = +
	IfStr(i) $(!STF_GUI_UNATTENDED) == "YES"
		Split-String *($(Combo1List),1) " " Combo1Elements
		Set BusNumber   = *($(Combo1Elements),1)
		Set SlotNumber  = *($(Combo1Elements),5)
		goto adapterverify
	EndIf
	IfStr(i) $(Option) == "GEV2COPPER"
		Set SpeedModeStr = *($(SpeedModeStrList), ~($(SpeedModeValList), $(SpeedModeValue)))
		Set DupCapStr = *($(DupCapStrList), ~($(DupCapValList), $(DupCapA)))
                Set AutoNegStr   = *($(AutoNegStrList),   ~($(AutoNegValList),   $(AutoNegA)))
                Set RoleStr      = *($(RoleStrList),      ~($(RoleValList),      $(RoleA)))
	EndIf
	read-syms FileDependentDlg$(Option)$(!STF_LANGUAGE)
	LoadLibrary "disk3" $(HelpFile).dll hLib
	SetHelpFile $(HelpFile).hlp $(MinID) $(MaxID)
	ui start "InputDlg" $(hLib)
	FreeLibrary $(hLib)
	IfStr(i) $(DLGEVENT) == "CONTINUE"
		Set NetworkAddress = *($(EditTextOut),1)
		Split-String $(Combo1Out) " " Combo1Elements
		Set BusNumber   = *($(Combo1Elements),1)
		Set SlotNumber  = *($(Combo1Elements),5)
		IfStr(i) $(Option) == "GEV2COPPER"
			Set SpeedModeStr	= $(Combo2Out)
			Set SpeedModeValue = *($(SpeedModeValList),+
				~($(SpeedModeStrList), $(SpeedModeStr)))
			Set DupCapStr	= $(Combo3Out)
			Set DupCapA = *($(DupCapValList),+~($(DupCapStrList), $(DupCapStr)))
            Set AutoNegStr	= $(Combo4Out)
			Set AutoNegA = *($(AutoNegValList),+~($(AutoNegStrList), $(AutoNegStr)))

            Set RoleStr	= $(Combo5Out)
			Set RoleA = *($(RoleValList),+~($(RoleStrList), $(RoleStr)))
		EndIf
		Set MaxFrameSize = *($(EditTextOut),2)
                IfInt $(MaxFrameSize) > $(MaxFrameSizeJum)
			Shell $(subroutineinf), SetupMessage,+
			   $(!STF_LANGUAGE), "NONFATAL", $(FrameInfo)
			Set MaxFrameSize = $(MaxFrameSizeJum)
		EndIf
		IfInt $(MaxFrameSize) < $(MinFrameSize)
			Shell $(subroutineinf), SetupMessage,+
			   $(!STF_LANGUAGE), "NONFATAL", $(FrameSmallInfo)
			Set MaxFrameSize = $(MinFrameSize)
		EndIf
		ui pop 1
	Else-IfStr(i) $(DLGEVENT) == "BACK"
		Set CommonStatus = STATUS_USERCANCEL
		ui pop 1
		goto end
	Else
		ui pop 1
		goto end
	EndIf
adapterverify = +
	IfStr(i) $(DetectedCard) != TRUE
		Goto skipoptions
	EndIf
	Shell $(ParamInf), Param_VerifyCard, $(!STF_NCDETCARD)
	IfStr(i) $($R0) == STATUS_SUCCESSFUL
		Goto skipoptions
	EndIf
	Set from	= adapteroptions
	Set to		= skipoptions
	Shell $(UtilityInf), RegistryErrorString, VERIFY_WARNING
	IfInt $($ShellCode) != $(!SHELL_CODE_OK)
		goto ShellCodeError
	EndIf
	Set Error = $($R0)
	Goto Warning
skipoptions = +
	IfInt $(OldVersionExisted) == $(TRUE)
		IfStr(i) $(!NTN_InstallMode) == configure
			goto writeparameters
		EndIf
	EndIf
	StartWait
	IfInt $(OldVersionExisted) == $(FALSE)
		IfStr(i) $(!NTN_InstallMode) == "install"
			IfStr(i) $(DoCopy) == "YES"
				Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir), YES
				IfInt $($ShellCode) != $(!SHELL_CODE_OK)
					Goto ShellCodeError
				Else-IfStr(i) $($R0) == STATUS_FAILED
					Shell $(UtilityInf),+
					  RegistryErrorString, "ASK_SOURCE_FAIL"
					IfInt $($ShellCode) != $(!SHELL_CODE_OK)
						goto ShellCodeError
					EndIf
					Set Error = $($R0)
					Goto fatal
				Else-IfStr(i) $($R0) == STATUS_USERCANCEL
					Goto successful
				EndIf
				Set SrcDir = $($R1)
			EndIf
			install "Install-Option"
			IfStr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
				Shell $(UtilityInf), RegistryErrorString, "UNABLE_COPY_FILE"
				IfInt $($ShellCode) != $(!SHELL_CODE_OK)
					goto ShellCodeError
				EndIf
				Set Error = $($R0)
				goto fatal
			EndIf
		EndIf
		Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer),+
		  $(ProductSoftwareName), $(ProductSoftwareName),+
		  $(ProductSoftware$(Option)Title), $(STF_CONTEXTINFNAME),+
		  $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
		  $(NetEventDLL)
		Set OEM_ABANDON_SOFTWARE = TRUE
		IfInt $($ShellCode) != $(!SHELL_CODE_OK)
			goto ShellCodeError
		EndIf
		Set RegistryErrorIndex = $($R0)
		IfStr(i) $(RegistryErrorIndex) != NO_ERROR
			EndWait
			CloseRegKey $($R1)
			CloseRegKey $($R2)
			CloseRegKey $($R3)
			CloseRegKey $($R4)
			CloseRegKey $($R5)
			goto fatalregistry
		EndIf
		Set SoftProductKey	= $($R1)
		Set SoftNetRuleKey	= $($R2)
		Set SoftServiceKey	= $($R3)
		Set SoftParameterKey	= $($R4)
		Set SoftLinkageKey	= $($R5)
		Set NewValueList	= {+
		  {SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
		  {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
		  {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
		  {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftware$(Option)Title)},+
		  {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftware$(InfOption)Description)},+
		  {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
		  {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}+
		}
		Shell $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
		IfInt $($ShellCode) != $(!SHELL_CODE_OK)
			goto ShellCodeError
		EndIf
		Set RegistryErrorIndex = $($R0)
		IfStr(i) $(RegistryErrorIndex) != NO_ERROR
			EndWait
			CloseRegKey $(SoftProductKey)
			CloseRegKey $(SoftNetRuleKey)
			CloseRegKey $(SoftServiceKey)
			CloseRegKey $(SoftParameterKey)
			CloseRegKey $(SoftLinkageKey)
			goto fatalregistry
		EndIf
		Set NewValueList	= {+
		  {type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
		  {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)},+
		  {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)},+
		  {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)},+
		  {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)},+
		  {InfOption,$(NoTitle),$(!REG_VT_SZ),$(InfOption)}+
		}
		Shell $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
		IfInt $($ShellCode) != $(!SHELL_CODE_OK)
			goto ShellCodeError
		EndIf
		Set RegistryErrorIndex = $($R0)
		CloseRegKey $(SoftProductKey)
		CloseRegKey $(SoftNetRuleKey)
		CloseRegKey $(SoftServiceKey)
		CloseRegKey $(SoftParameterKey)
		CloseRegKey $(SoftLinkageKey)
		IfStr(i) $(RegistryErrorIndex) != NO_ERROR
			EndWait
			goto fatalregistry
		EndIf
	EndIf
	Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),+
	  $(STF_CONTEXTINFNAME), $(ProductKeyName)
	IfInt $($R4) != -1
		Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS),+
		  $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
	EndIf
	IfInt $($ShellCode) != $(!SHELL_CODE_OK)
		goto ShellCodeError
	EndIf
	Set RegistryErrorIndex = $($R0)
	IfStr(i) $(RegistryErrorIndex) != NO_ERROR
		EndWait
		CloseRegKey $($R1)
		CloseRegKey $($R2)
		CloseRegKey $($R3)
		goto fatalregistry
	EndIf
	Set KeyParameters	= $($R3)
	Set KeyAdapterRules	= $($R2)
	Set AdapterNumber	= $($R4)
	Set NewValueList	= {+
	  {Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
	  {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(InfOption)Title)},+
	  {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(InfOption)Description)},+
	  {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
	  {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
	  {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}+
	}
	Shell $(UtilityInf), AddValueList, $($R1), $(NewValueList)
	IfInt $($ShellCode) != $(!SHELL_CODE_OK)
		goto ShellCodeError
	EndIf
	CloseRegKey $($R1)
	Set TempProdName	= """"$(ProductHardwareName)$(AdapterNumber)""""
	Set TempBindForm	= $(TempProdName)$(NetRuleHardwareBindForm)
	Set NewValueList	= {+
	  {type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
	  {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)},+
	  {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)},+
	  {InfOption,$(NoTitle),$(!REG_VT_SZ),$(InfOption)}+
	}
	Shell $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
	IfInt $($ShellCode) != $(!SHELL_CODE_OK)
		goto ShellCodeError
	EndIf
	Set RegistryErrorIndex = $($R0)
	IfStr(i) $(RegistryErrorIndex) != NO_ERROR
		EndWait
		CloseRegKey $(KeyParameters)
		CloseRegKey $(KeyAdapterRules)
		goto fatalregistry
	EndIf
	CloseRegKey $(KeyAdapterRules)
	goto writeparameters
writeparameters = +
	IfContains $(Option) in $(EthCards)
		Set NewValueList = {+
		  {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
		  {MediaType,$(NoTitle),$(!REG_VT_DWORD),$(CardMediaType)},+
		  {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
		  {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNumber)},+
		  {Moderate,$(NoTitle),$(!REG_VT_DWORD),1},+
		  {FixedIntMod,$(NoTitle),$(!REG_VT_DWORD),5000},+
		  {MaxReceives,$(NoTitle),$(!REG_VT_DWORD),50},+
		  {MaxTransmits,$(NoTitle),$(!REG_VT_DWORD),50},+
		  {WaitForRxResources,$(NoTitle),$(!REG_VT_DWORD),1},+
		  {MessageLog,$(NoTitle),$(!REG_VT_DWORD),1},+
		}
		Set EthParmsList = {+
		  {NetworkAddress,$(NoTitle),$(!REG_VT_SZ),$(NetworkAddress)},+
		  {MaxFrameSize,$(NoTitle),$(!REG_VT_DWORD),$(MaxFrameSize)},+
		  {MaxMulticast,$(NoTitle),$(!REG_VT_DWORD),$(MaxMulticast)},+
		  {DuplexCapabilities_A,$(NoTitle),$(!REG_VT_DWORD),$(DupCapA)},+
		  {AutoNegotiation_A,$(NoTitle),$(!REG_VT_DWORD),$(AutoNegA)},+
		  {FlowControl_A,$(NoTitle),$(!REG_VT_DWORD),$(FlowControlA)},+
		  {Role_A,$(NoTitle),$(!REG_VT_DWORD),$(RoleA)},+
		}
		ForListDo $(EthParmsList)
			Set NewValueList = >($(NewValueList),$($))
		EndForListDo
		IfStr(i) $(Option) == "GEV2COPPER"
			Set CopperV2ParmsList = {+
			  {Speed_A,$(NoTitle),$(!REG_VT_DWORD),$(SpeedModeValue)},+
			  {DuplexCapabilities_A,$(NoTitle),$(!REG_VT_DWORD),$(DupCapA)},+
                          {AutoNegotiation_A,$(NoTitle),$(!REG_VT_DWORD),$(AutoNegA)},+
                          {Role_A,$(NoTitle),$(!REG_VT_DWORD),$(RoleA)},+
			}
			ForListDo $(CopperV2ParmsList)
				Set NewValueList = >($(NewValueList),$($))
			EndForListDo
		EndIf
		Shell $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
		ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
			Shell $(UtilityInf),AddDefaultNetCardParameters,$(KeyParameters)
		endif
		IfInt $($ShellCode) != $(!SHELL_CODE_OK)
			goto ShellCodeError
		EndIf
		Set RegistryErrorIndex = $($R0)
		IfStr(i) $(RegistryErrorIndex) != NO_ERROR
			CloseRegKey $(KeyParameters)
			goto fatalregistry
		EndIf
	EndIf
	CloseRegKey $(KeyParameters)
	EndWait
	goto successful
bindingadapter = +
	Set Error = "Binding: Sorry, not yet implemented."
	goto fatal
removeadapter = +
	IfStr(i) $(ProductKeyName) == $(!NTN_RegBase)
		Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer),+
		  $(ProductSoftwareName)
		IfInt $($ShellCode) != $(!SHELL_CODE_OK)
			goto ShellCodeError
		EndIf
		Set RegistryErrorIndex = $($R0)
		IfStr(i) $(RegistryErrorIndex) != NO_ERROR
			goto fatalregistry
		EndIf
	Else
		Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer),+
		  $(ProductHardwareName), $(!NTN_RegBase)
		IfInt $($ShellCode) != $(!SHELL_CODE_OK)
			goto ShellCodeError
		EndIf
		Set RegistryErrorIndex = $($R0)
		IfStr(i) $(RegistryErrorIndex) != NO_ERROR
			goto fatalregistry
		EndIf
	EndIf
	goto end
UpgradeSoftware = +
	OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase)\NetRules +
		$(MAXIMUM_ALLOWED) KeyProduct
	IfStr $(KeyProduct) != $(KeyNull)
		GetRegValue $(KeyProduct), "InfName", InfName
		QueryListSize ListSize $(InfName)
		Set !UG_Filename = *($(InfName), $(ListSize))
		CloseRegKey $(KeyProduct)
	Else
		goto fatalregistry
	EndIf

	OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) +
		$(MAXIMUM_ALLOWED) KeyProduct
	IfStr $(KeyProduct) != $(KeyNull)
		Install "Install-Update"
		IfStr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
			goto fatal
		EndIf
		SetRegValue $(KeyProduct) {MajorVersion, $(NoTitle),+
			$(!REG_VT_SZ), $(ProductMajorVersion)}
		SetRegValue $(KeyProduct) {MinorVersion, $(NoTitle),+
			$(!REG_VT_SZ), $(ProductMinorVersion)}
		CloseRegKey $(KeyProduct)
	Else
		goto fatalregistry
	EndIf
	goto end
successful = +
	goto end
abandon = +
	ForListDo $(OEM_ABANDON_OPTIONS)
		Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer),+
		  $(ProductSoftwareName), $($)
		IfInt $($ShellCode) != $(!SHELL_CODE_OK)
			goto ShellCodeError
		EndIf
		Set RegistryErrorIndex = $($R0)
		IfStr(i) $(RegistryErrorIndex) != NO_ERROR
			goto fatalregistry
		EndIf
	EndForListDo
	IfStr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
		Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer),+
		  $(ProductSoftwareName), FALSE
		IfInt $($ShellCode) != $(!SHELL_CODE_OK)
			goto ShellCodeError
		EndIf
		Set RegistryErrorIndex = $($R0)
		IfStr(i) $(RegistryErrorIndex) != NO_ERROR
			goto fatalregistry
		EndIf
	EndIf
	goto end
warning = +
	Shell $(subroutineinf), SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
	IfInt $($ShellCode) != $(!SHELL_CODE_OK)
		goto ShellCodeError
	EndIf
	IfStr(i) $($R1) == "OK"
		goto $(to)
	Else-IfStr(i) $($R1) == "CANCEL"
		goto $(from)
	Else
		goto "end"
	EndIf
nonfatalinfo = +
	Set CommonStatus	= STATUS_USERCANCEL
	Set Severity		= STATUS
	goto nonfatalmsg
nonfatal = +
	Set Severity		= NONFATAL
	goto nonfatalmsg
nonfatalmsg = +
	IfStr(i) $(Error) == ""
		Set Severity = NONFATAL
		Shell $(UtilityInf), RegistryErrorString, "SETUP_FAIL"
		IfInt $($ShellCode) != $(!SHELL_CODE_OK)
			goto ShellCodeError
		EndIf
		Set Error = $($R0)
	EndIf
	Shell $(subroutineinf), SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
	IfInt $($ShellCode) != $(!SHELL_CODE_OK)
		goto ShellCodeError
	EndIf
	IfStr(i) $($R1) == "OK"
		goto $(from)
	Else
		goto "end"
	EndIf
fatalregistry = +
	Shell $(UtilityInf), RegistryErrorString, $(RegistryErrorIndex)
	IfInt $($ShellCode) != $(!SHELL_CODE_OK)
		goto ShellCodeError
	EndIf
	Set Error = $($R0)
	goto fatal
fataldetect = +
	Shell $(UtilityInf), RegistryErrorString, CANNOT_DETECT
	IfInt $($ShellCode) != $(!SHELL_CODE_OK)
		goto ShellCodeError
	EndIf
	Set Error = $($R0)
	Goto fatal
fatal = +
	IfStr(i) $(Error) == ""
		Shell $(UtilityInf), RegistryErrorString, "SETUP_FAIL"
		IfInt $($ShellCode) != $(!SHELL_CODE_OK)
			goto ShellCodeError
		EndIf
		Set Error = $($R0)
	EndIf
	Shell $(subroutineinf), SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
	IfInt $($ShellCode) != $(!SHELL_CODE_OK)
		goto ShellCodeError
	EndIf
	goto setfailed
ShellCodeError = +
	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"
	goto setfailed
setfailed = +
	Set CommonStatus = STATUS_FAILED
	IfStr(i) $(OEM_ABANDON_ON) == TRUE
		Set OEM_ABANDON_ON = FALSE
		goto abandon
	EndIf
	goto end
end = +
	Return $(CommonStatus)
[Install-HelpFile]
	Set STF_VITAL		= ""
	Set STF_OVERWRITE	= "VERIFYSOURCEOLDER"
	AddSectionFilesToCopyList Files-Hlp $(SrcDir) $(!STF_WINDOWSSYSPATH)
	AddSectionFilesToCopyList Files-Dll $(SrcDir) $(!STF_WINDOWSSYSPATH)
	Set !STF_NCPA_FLUSH_COPYLIST = TRUE
	CopyFilesInCopyList
	exit
[Install-Option]
	Set STF_VITAL = ""
	IfStr(i) $(AddCopy) == "YES"
		AddSectionFilesToCopyList Files-$(Option) $(SrcDir) +
		  $(!STF_WINDOWSSYSPATH)\drivers
	EndIf
	IfStr(i) $(DoCopy) == "YES"
		Set !STF_NCPA_FLUSH_COPYLIST = TRUE
		CopyFilesInCopyList
	EndIf
	Exit
[Install-Update]
	Set STF_VITAL	= ""
	Set STF_OVERWRITE	= "VERIFYSOURCEOLDER"
	AddSectionFilesToCopyList Files-$(Option) $(SrcDir) +
	  $(!STF_WINDOWSSYSPATH)\drivers
	AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
	AddSectionFilesToCopyList Files-Hlp $(SrcDir) $(!STF_WINDOWSSYSPATH)
	AddSectionFilesToCopyList Files-Dll $(SrcDir) $(!STF_WINDOWSSYSPATH)
	Set !STF_NCPA_FLUSH_COPYLIST = TRUE
	CopyFilesInCopyList
	Exit
[Source Media Descriptions]
	1  = "Windows NT Setup Disk #1"
	2  = "Windows NT Setup CD-ROM Disk"
	3  = "Driver CD"
[ProductType]
	STF_PRODUCT  = Winnt
	STF_PLATFORM = I386
[Files-Inf]
	3,	OemSetup.inf,	SIZE=32000,	RENAME=$(!UG_Filename)
[Files-Hlp]
	3,	gedialog.hlp,	SIZE=38000
[Files-Dll]
	3, 	gedialog.dll,	SIZE=17000
[Files-GEV2COPPER]
	3,  gnicnt.sys, 	SIZE=80000
[LanguagesSupported]
	ENG
[OptionsTextENG]
	GEV2COPPER = "10/100/1000 Mbps 32-bit/64-bit PCI Network Adapter"

[FileConstantsENG]
	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:"
	FunctionGEV2COPPERTitle 		= "10/100/1000 Mbps 32-bit/64-bit PCI Network Adapter Setup"
	ProductSoftwareGEV2COPPERDescription = "10/100/1000 Mbps 32-bit/64-bit PCI Network Adapter Driver"
	ProductHardwareGEV2COPPERDescription = "10/100/1000 Mbps 32-bit/64-bit PCI Network Adapter"
	ProductSoftwareGEV2COPPERTitle	= "10/100/1000 Mbps 32-bit/64-bit PCI Network Adapter Driver"
	ProductHardwareGEV2COPPERTitle	= "10/100/1000 Mbps 32-bit/64-bit PCI Network Adapter"	
	
	ShellCodeErrorTitle		 = "Error: "$(Function$(Option)Title)
	ShellCodeErrorText		 = "Shell Code Error."
[DialogConstantsENG]
	Help		= "&Help"
	Exit		= "Cancel"
	OK		= "OK"
	Defaults	= "&Defaults"
	HelpContext	= ""
	Continue	= "Continue"
	Cancel		= "Cancel"
[FileDependentDlgGEV2COPPERENG]
	HelpFile		= gedialog
	IDH_DB_OEM_GEV2_INS	= 9152
	HelpContext		= $(IDH_DB_OEM_GEV2_INS)
	MinID			= 9000
	MaxID			= 9999
	Caption 		= $(Function$(Option)Title)
	DlgType 		= "RadioCombination"
	DlgTemplate		= "GE_V2COPPER"
	Combo1Label		= "Bus / &Slot:"
	Combo1Out		= $(SlotNumber)
        Combo2Label		= "&Link Speed:"
	Combo2List		= $(SpeedModeStrList)
	Combo2Out		= $(SpeedModeStr)

	Combo3Label		= "&Duplex Capabilities:"
	Combo3List		= $(DupCapStrList)
	Combo3Out		= $(DupCapStr)
        Combo4Label		= "&Autonegotiation:"
	Combo4List		= $(AutoNegStrList)
	Combo4Out		= $(AutoNegStr)

        Combo5Label		= "&Role:"
	Combo5List		= $(RoleStrList)
	Combo5Out		= $(RoleStr)
        ComboListItemsIn	= {Combo1List, Combo2List, Combo3List, Combo4List, Combo5List}
        ComboListItemsOut	= {Combo1Out, Combo2Out, Combo3Out, Combo4Out, Combo5Out}
	Edit1Label		= "Network &Address:"
	Edit2Label		= "MaxFrameSi&ze:"
	FrameInfo		= "MaxFrameSize too large - adjusted to 9014."
	FrameSmallInfo		= "MaxFrameSize too small - adjusted to 14."
	NotifyFields		= {NO}
	EditTextIn		= {$(NetworkAddress), $(MaxFrameSize)}
	EditTextLim		= {17, 12}
	EditTextOut		= {}


;
; OemSetup.inf version 2.07
server: web4, load: 0.46