; COPYRIGHT NOTICE
; Copyright (c) Asante Inc. 2000
; All rights reserved
;
[Identification]
OptionType = NetAdapter
[PlatformsSupported]
PCI
[Options]
Asante
[FileConstants]
GenericInfVersion = " v3.11"
GenericSysName = "asandis.sys"
GenericName = "ASANDIS"
UtilityInf = "UTILITY.INF"
ParamInf = "NCPARAM.INF"
subroutineinf = "SUBROUTN.INF"
SoftwareType = "driver"
Exit_Code = 0
NetEventDLL = "%SystemRoot%\System32\netevent.dll;%SystemRoot%\System32\Drivers\asandis.sys"
IoLogMsgDLL = "%SystemRoot%\System32\IoLogMsg.dll"
Manufacturer = "Asante"
ProductMajorVersion = "1"
ProductMinorVersion = "14"
ProductLastDigit = "23"
ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)"."$(ProductLastDigit)
ProductSoftwareName = "ASANDIS"
ProductSoftwareImagePath = "\SystemRoot\System32\drivers\"$(GenericSysName)
NetRuleSoftwareType = "asanteSys ndisDriver asanteDriver"
NetRuleSoftwareUse = $(SoftwareType)
NetRuleSoftwareBindForm = """asanteSys"" yes no container"
NetRuleSoftwareClass = {"asanteDriver basic"}
NetRuleSoftwareBindable = {"asanteDriver asanteAdapter non exclusive 100"}
ProductHardwareName = "ASANDIS"
NetRuleHardwareType = "asante asanteAdapter"
NetRuleHardwareBindForm = " yes yes container"
NetRuleHardwareClass = {"asanteAdapter basic"}
ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
ParamKeyName = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
ServiceKeyName = $(!NTN_ServiceBase)"\"$(ProductHardwareName)
[GeneralConstants]
from = ""
to = ""
ExitCodeOk = 0
ExitCodeCancel = 1
ExitCodeFatal = 2
KeyNull = ""
MAXIMUM_ALLOWED = 33554432
RegistryErrorIndex = NO_ERROR
KeyProduct = ""
KeyParameters = ""
KeyService = ""
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 !G:DebugOutputControl = 0
set Status = STATUS_FAILED
set Option = $($1)
set SrcDir = $($2)
set AddCopy = $($3)
set DoCopy = $($4)
set DoConfig = $($5)
set dbgstr = "Status:"$(Status)
Debug-Output $(dbgstr)
set dbgstr = "Option:"$(Option)
Debug-Output $(dbgstr)
set dbgstr = "SrcDir:"$(SrcDir)
Debug-Output $(dbgstr)
set dbgstr = "AddCopy:"$(AddCopy)
Debug-Output $(dbgstr)
set dbgstr = "DoCopy:"$(DoCopy)
Debug-Output $(dbgstr)
set dbgstr = "DoConfig:"$(DoConfig)
Debug-Output $(dbgstr)
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 FileConstants$(!STF_LANGUAGE)
read-syms DialogConstants$(!STF_LANGUAGE)
ifstr(i) $(!NTN_Origination) == "NCPA"
set Continue = $(OK)
endif
detect date
set-title $(FunctionTitle)
set to = Begin
set from = Begin
set CommonStatus = STATUS_SUCCESSFUL
EndWait
Begin = +
Set ActivateDetection = FALSE
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 StartLabel = configureadapter
Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
Debug-Output "Cannot configure the driver software."
Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "ShellCode error: cannot get an error string."
goto ShellCodeError
endif
set Error = $($R0)
set from = end
set to = end
goto nonfatalinfo
endif
else
set StartLabel = installadapter
set OEM_ABANDON_OPTIONS = {}
set OEM_ABANDON_SOFTWARE = FALSE
set OEM_ABANDON_ON = TRUE
endif
set link = 1
set jumbos = 0
set rx_flow = 1
set tx_flow = 0
set fullduplex = 1
set linkspeed = 1000
Set from = $(fatal)
Set to = $(fatal)
Debug-Output "Select a place to go!"
Goto $(StartLabel)
installadapter = +
; Check Service Pack Number
Set RegKey = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion"
OpenRegKey $(!REG_H_LOCAL) "" $(RegKey) $(MAXIMUM_ALLOWED) NTVersionKey
GetRegValue $(NTVersionKey) "CSDVersion" NTBuildRec
Set NTBuild = *($(NTBuildRec),4)
CloseRegKey $(NTVersionKey)
Debug-Output $(NTBuild)
ifstr(i) $(NTBuild) == "Service Pack 4"
else-ifstr(i) $(NTBuild) == "Service Pack 5"
else-ifstr(i) $(NTBuild) == "Service Pack 6"
else
set Error = $(NO_SP4)
set CommonStatus = USER_CANCEL
set from = end
goto nonfatal
endif
Set CheckItemsIn = {"ON"}
set Vendor1 = 4782
set CardID = 0001
set BaseTCID = 0002
; Look for SX adapter
Shell $(UtilityInf), GetPCIInformation, $(Vendor1) $(CardID)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
set VendorList1 = $($R0)
; Look for BaseT adapter
Shell $(UtilityInf), GetPCIInformation, $(Vendor1) $(BaseTCID)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
set VendorList2 = $($R0)
; Sreehari - next 6 lines are for fixing bug # 932
ifstr(i) $(VendorList1) == {}
ifstr(i) $(VendorList2) == {}
set Error = $(CANNOT_FIND_ANY_CARD)
set CommonStatus = USER_CANCEL
set from = end
goto nonfatal
endif
endif
; form the vendor id list
Debug-Output "Vendor list 1 "
Debug-Output $(VendorList1)
Debug-Output "Vendor list 2 "
Debug-Output $(VendorList2)
set VL1 = 0
ForListDo $(VendorList1)
Debug-Output *($($),2)
set VL1 = 1
EndForListDo
Debug-Output "Results"
Debug-Output $(VL1)
set VL2 = 0
ForListDo $(VendorList2)
Debug-Output *($($),2)
set VL2 = 1
EndForListDo
Debug-Output "Results"
Debug-Output $(VL2)
;set AdapterList = $(VendorList1)
ifint $(VL1) == 0
ifint $(VL2) == 0
Debug-Output "No adapters in list. Aborting."
goto end
endif
endif
;Debug-Output "adapter list"
;Debug-Output $(AdapterList)
set NewAdapterList1 = {}
set NumNew1 = 0
; Now go through both the list
ForListDo $(VendorList1)
set BusNumber = *($($),1)
set SlotNum = *($($),2)
set DevID = 1
set SkipDescriptionCheck = "YES"
Debug-Output $(UtilityInf)",IsNetCardAlreadyInstalled,Bus Number="$(BusNumber)",Slot Number="+
$(SlotNum)",DevID="$(DevID)",Softname="$(SoftwareName)",ProductName="$(ProductHardwareName)
; Changed 11:36PM 5/10/97 By DLT
; Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNumber), +
; $(SlotNum), $(GenericAdapterName), $(ProductHardwareName)
Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNumber), +
$(SlotNum), $(SoftwareName), $(ProductHardwareName), $(SkipDescriptionCheck)
Debug-Output $($R1)
ifstr(i) $($R1) != "YES"
set-add NumNew1 = $(NumNew1),1
ifstr(i) $(NewAdapterList1) == {}
set NewAdapterList1 = {$($)}
else
set NewAdapterList1 = >($(NewAdapterList1),$($))
endif
Debug-Output $(NumNew1)
endif
EndForListDo
; Now reset the VendorList with only the new adapters that we found
set AdapterList1 = $(NewAdapterList1)
Debug-Output "Final AdapterList1 = "
Debug-Output $(AdapterList1)
set NewAdapterList2 = {}
set NumNew2 = 0
; Now go through 2nd list
ForListDo $(VendorList2)
set BusNumber = *($($),1)
set SlotNum = *($($),2)
set DevID = 2
set SkipDescriptionCheck = "YES"
Debug-Output $(UtilityInf)",IsNetCardAlreadyInstalled,Bus Number="$(BusNumber)",Slot Number="+
$(SlotNum)",DevID="$(DevID)",Softname="$(SoftwareName)",ProductName="$(ProductHardwareName)
; Changed 11:36PM 5/10/97 By DLT
; Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNumber), +
; $(SlotNum), $(GenericAdapterName), $(ProductHardwareName)
Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNumber), +
$(SlotNum), $(SoftwareName), $(ProductHardwareName), $(SkipDescriptionCheck)
Debug-Output $($R1)
ifstr(i) $($R1) != "YES"
set-add NumNew2 = $(NumNew2),1
ifstr(i) $(NewAdapterList2) == {}
set NewAdapterList2 = {$($)}
else
set NewAdapterList2 = >($(NewAdapterList2),$($))
endif
Debug-Output $(NumNew2)
endif
EndForListDo
; Now reset the AdapterList with only the new adapters that we found
set AdapterList2 = $(NewAdapterList2)
Debug-Output "Final AdapterList2 = "
Debug-Output $(AdapterList2)
; Now make the decision based on whether we found any supported adapters
ifint $(NumNew1) == 0
;set AdapterList1 = {{0,0,0}}
ifint $(NumNew2) == 0
;set AdapterList2 = {{0,0,0}}
goto end
endif
endif
;set AdapterList = $(NewAdapterList)
;Debug-Output "Final adapter list = "
;Debug-Output $(AdapterList)
;ifint $(NumNew) == 0
; set AdapterList = {{0,0,0}}
; goto end
;endif
Debug-Output "Check old version"
Debug-Output "Regname:"$(!REG_H_LOCAL)"/"$(ProductKeyName)"/"$(MAXIMUM_ALLOWED)"/"KeyProduct
OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
Debug-Output "KeyProduct"$(KeyProduct)
Ifstr $(KeyProduct) != $(KeyNull)
CloseRegKey $(KeyProduct)
Debug-Output "NTN_RegBase"$(!NTN_RegBase)
Debug-Output "ProductKeyName"$(ProductKeyName)
ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
Debug-Output "Show VerExist Dlg"
Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
$(ProductVersion)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "ShellCode error: cannot get an error string."
goto ShellCodeError
endif
goto end
else
Shell $(UtilityInf), CardExistedDlg
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "ShellCode error: cannot get an error string."
goto ShellCodeError
endif
Debug-Output "Return From Dialog"$($R1)
ifstr(i) $($R1) != "OK"
goto end
endif
set OldVersionExisted = $(TRUE)
endif
endif
ifint $(OldVersionExisted) == $(FALSE)
ifstr(i) $(!NTN_InstallMode) == "install"
Ifstr(i) $(DoCopy) == "YES"
Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) NO
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
endif
endif
Debug-Output DoAskSource
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)
Debug-Output $(SrcDir)
Debug-Output Start-Install
install "Install-Dll"
Debug-Output "Ready to config"
;
; goto adaptersetup
;comment upper line by DLT
;Oct. 9, 19:24 Because I hope do not setup adapter now
;so it will directly go to skipoptions,
;I will call setup adapter while write all into registry
;
goto skipoptions
configureadapter = +
Debug-Output "Adapter Setup"
Set from = adapteroptions
set OldVersionExisted = $(TRUE)
set ValueName = ""
set ValueData = ""
set ValueStr = ""
set ValueList = {}
Set CheckItemsIn = {"ON"}
set SrcDir = $(!STF_CWDDIR)
adapteroptions = +
Debug-Output "Now, Enter adapter options:"
read-syms FileDependentDlgPCI$(!STF_LANGUAGE)
; do the dialog box from the dll
Debug-Output "Ready to load config dll"
;LoadLibrary "x" $(SrcDir)$(ParamDllName) hLib
LoadLibrary "Setup Disk: #1" .\$(ParamDllName) hLib
Debug-Output "Ready to call the dll procedure:"$(hLib)
LibraryProcedure retstr $(hLib) ShowConfigDialog $(SoftwareName)
FreeLibrary $(hLib)
Ifstr(i) $(retstr) == "OK"
goto successful
Else-Ifstr(i) $(retstr) == "CANCEL"
Set Severity = STATUS
Set CommonStatus = STATUS_USERCANCEL
goto successful
Else
goto fatal
installconfigure = +
Debug-Output "Adapter Setup"
Set from = installadapteroptions
set OldVersionExisted = $(TRUE)
set ValueName = ""
set ValueData = ""
set ValueStr = ""
set ValueList = {}
Set CheckItemsIn = {"ON"}
installadapteroptions = +
Debug-Output "Now, Enter adapter options:"
read-syms FileDependentDlgPCI$(!STF_LANGUAGE)
; do the dialog box from the dll
Debug-Output "Ready to load config dll"
;LoadLibrary "x" $(SrcDir)$(ParamDllName) hLib
LoadLibrary "Setup Disk: #1" .\$(ParamDllName) hLib
Debug-Output "Ready to call the dll procedure:"$(hLib)
LibraryProcedure retstr $(hLib) ShowConfigDialog $(SoftwareName)
FreeLibrary $(hLib)
Ifstr(i) $(retstr) == "OK"
goto successful
Else-Ifstr(i) $(retstr) == "CANCEL"
Set Severity = STATUS
Set CommonStatus = STATUS_USERCANCEL
goto successful
Else
goto fatal
skipoptions =+
Debug-Output "Skip options: Continue"
Debug-Output "Exist Old Version="$(OldVersionExisted)
ifint $(OldVersionExisted) == $(TRUE)
Debug-Output "Here exist old version"
ifstr(i) $(!NTN_InstallMode) == configure
Shell $(UtilityInf), GetBusTypeNum
set BusTypeNum = $($R1)
set BusNumberValue = 0
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "ShellCode error."
goto ShellCodeError
endif
set NewValueList = {{link, $(NoTitle),$(!REG_VT_DWORD),$(link)} }
Debug-Output "AddValueList:"$(UtilityInf)", "AddValueList", "$(KeyParameters)", "$(NewValueList)
Shell $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
CloseRegKey $(KeyParameters)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "ShellCode error."
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
Debug-Output "Registry error: Add value list"
goto fatalregistry
endif
EndWait
goto successful
endif
endif
StartWait
ifint $(OldVersionExisted) == $(FALSE)
Debug-Output "Here do not exist old version"
Debug-Output "The install mode:"$(!NTN_InstallMode)
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
Debug-Output "AddSoftwareComponent"
Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
$(ProductSoftwareName), +
$(ProductSoftwareName), +
$(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
$(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
$(NetEventDLL)
Set OEM_ABANDON_SOFTWARE = TRUE
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "ShellCode error"
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
set KeyProduct = $($R1)
Set SoftNetRulesKey = $($R2)
CloseRegKey $($R3)
CloseRegKey $($R4)
CloseRegKey $($R5)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
EndWait
Debug-Output "Registry error: add software components"
CloseRegKey $(KeyProduct)
CloseRegKey $(SoftNetRulesKey)
goto fatalregistry
endif
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),$(ProductSoftwareTitle)},+
{Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
{ReleaseDate,$(NoTitle),$(!REG_VT_SZ),$(ReleaseDate)},+
{SoftwareVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductVersion)},+
{MiniportVersion,$(NoTitle),$(!REG_VT_SZ),$(MiniportVersion)},+
{ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
{InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
; Debug-Output "AddvalueList:"$(KeyProduct)", "$(NewValueList)
Shell $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "ShellCode error."
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
EndWait
Debug-Output "Registry error: add value list."
CloseRegKey $(KeyProduct)
CloseRegKey $(SoftNetRulesKey)
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),$(Option)}}
; Debug-Output "AddValueList, "$(SoftNetRulesKey)", "$(NewValueList)
Shell $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "ShellCode error."
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
CloseRegKey $(KeyProduct)
CloseRegKey $(SoftNetRulesKey)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
EndWait
Debug-Output "Resgitry error: add value list."
goto fatalregistry
endif
endif
Debug-Output "Add adapter (hardware )list"
Debug-Output $(AdapterList1)
ForListDo $(AdapterList1)
set BusNumber = *($($),1)
set DeviceNum = *($($),2)
set FunctionNum = *($($),3)
set DevID = 1
;Debug-Output "AddHardwareComponent, "$(ProductHardwareName)","$(STF_CONTEXTINFNAME)","$(ProductKeyName)
Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
ifint $($R4) != -1
Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrenVersion\NetworkCards\"$($R4))
endif
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "Cannot add hardware component"
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
EndWait
Debug-Output "Registry error: add hardware component"
CloseRegKey $($R1)
CloseRegKey $($R2)
CloseRegKey $($R3)
goto fatalregistry
endif
set KeyParameters = $($R3)
set KeyAdapterRules = $($R2)
set AdapterNumber = $($R4)
ifint $(DevID) == 1
set HardwareDescription = $(SoftwareName)
set HardwareTitle = $(GenericAdapterName)
set DeviceID = 1
else
set HardwareDescription = $(SoftwareName)
set HardwareTitle = $(GenericBaseTAdapter)
set DeviceID = 2
endif
set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
{Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(HardwareTitle)},+
{Description,$(NoTitle),$(!REG_VT_SZ),$(HardwareDescription)},+
{ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
{ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
{InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
Debug-Output "Network card:AddValueList, "$($R1)", "$(NewValueList)
Shell $(UtilityInf), AddValueList, $($R1), $(NewValueList)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "ShellCode error"
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),$(Option)}}
Debug-Output "Network card rules,AddValueList, "$(KeyAdapterRules)", "$(NewValueList)
Shell $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "ShellCode error."
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
EndWait
Debug-Output "Resgitry error: add value list."
CloseRegKey $(KeyParameters)
CloseRegKey $(KeyAdapterRules)
goto fatalregistry
endif
CloseRegKey $(KeyAdapterRules)
goto writeparameters1
writeparameters1 = +
Debug-Output "Now write the parameters"
Shell $(UtilityInf), GetBusTypeNum
set BusTypeNum = $($R1)
set BusNumberValue = 0
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "ShellCode error."
goto ShellCodeError
endif
set NewValueList = {{BusType,$(NoTitle),$(!REG_VT_DWORD),5},+
{MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
{SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(DeviceNum)},+
{DeviceID,$(NoTitle),$(!REG_VT_DWORD),$(DeviceID)},+
{BusNumber, $(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
{LinkNegotiation, $(NoTitle),$(!REG_VT_DWORD),$(link)},+
{JumboFrames, $(NoTitle),$(!REG_VT_DWORD),$(jumbos)},+
{RxFlowControl, $(NoTitle),$(!REG_VT_DWORD),$(rx_flow)},+
{TxFlowControl, $(NoTitle),$(!REG_VT_DWORD),$(tx_flow)},+
{LinkSpeed, $(NoTitle),$(!REG_VT_DWORD),$(linkspeed)},+
{FullDuplex, $(NoTitle),$(!REG_VT_DWORD),$(fullduplex)},+
{Instance, $(NoTitle),$(!REG_VT_DWORD),$(AdapterNumber)},+
; {AdapterType,$(NoTitle),$(!REG_VT_DWORD),0},+
{FdrEnable,$(NoTitle),$(!REG_VT_DWORD),1}}
Debug-Output "Services, AddValueList, "$(KeyParameters)", "$(NewValueList)
Shell $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
CloseRegKey $(KeyParameters)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "ShellCode error."
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
Debug-Output "Registry error: Add value list"
goto fatalregistry
endif
EndForListDo
; Now go through 2nd list
Debug-Output $(AdapterList2)
ForListDo $(AdapterList2)
set BusNumber = *($($),1)
set DeviceNum = *($($),2)
set FunctionNum = *($($),3)
set DevID = 2
;Debug-Output "AddHardwareComponent, "$(ProductHardwareName)","$(STF_CONTEXTINFNAME)","$(ProductKeyName)
Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
ifint $($R4) != -1
Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrenVersion\NetworkCards\"$($R4))
endif
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "Cannot add hardware component"
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
EndWait
Debug-Output "Registry error: add hardware component"
CloseRegKey $($R1)
CloseRegKey $($R2)
CloseRegKey $($R3)
goto fatalregistry
endif
set KeyParameters = $($R3)
set KeyAdapterRules = $($R2)
set AdapterNumber = $($R4)
ifint $(DevID) == 1
set HardwareDescription = $(SoftwareName)
set HardwareTitle = $(GenericAdapterName)
set DeviceID = 1
else
set HardwareDescription = $(SoftwareName)
set HardwareTitle = $(GenericBaseTAdapter)
set DeviceID = 2
endif
set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
{Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(HardwareTitle)},+
{Description,$(NoTitle),$(!REG_VT_SZ),$(HardwareDescription)},+
{ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
{ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
{InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
Debug-Output "Network card:AddValueList, "$($R1)", "$(NewValueList)
Shell $(UtilityInf), AddValueList, $($R1), $(NewValueList)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "ShellCode error"
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),$(Option)}}
Debug-Output "Network card rules,AddValueList, "$(KeyAdapterRules)", "$(NewValueList)
Shell $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "ShellCode error."
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
EndWait
Debug-Output "Resgitry error: add value list."
CloseRegKey $(KeyParameters)
CloseRegKey $(KeyAdapterRules)
goto fatalregistry
endif
CloseRegKey $(KeyAdapterRules)
goto writeparameters2
writeparameters2 = +
Debug-Output "Now write the parameters"
Shell $(UtilityInf), GetBusTypeNum
set BusTypeNum = $($R1)
set BusNumberValue = 0
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "ShellCode error."
goto ShellCodeError
endif
set NewValueList = {{BusType,$(NoTitle),$(!REG_VT_DWORD),5},+
{MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
{SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(DeviceNum)},+
{DeviceID,$(NoTitle),$(!REG_VT_DWORD),$(DeviceID)},+
{BusNumber, $(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
{LinkNegotiation, $(NoTitle),$(!REG_VT_DWORD),$(link)},+
{JumboFrames, $(NoTitle),$(!REG_VT_DWORD),$(jumbos)},+
{RxFlowControl, $(NoTitle),$(!REG_VT_DWORD),$(rx_flow)},+
{TxFlowControl, $(NoTitle),$(!REG_VT_DWORD),$(tx_flow)},+
{LinkSpeed, $(NoTitle),$(!REG_VT_DWORD),$(linkspeed)},+
{FullDuplex, $(NoTitle),$(!REG_VT_DWORD),$(fullduplex)},+
{Instance, $(NoTitle),$(!REG_VT_DWORD),$(AdapterNumber)},+
; {AdapterType,$(NoTitle),$(!REG_VT_DWORD),0},+
{FdrEnable,$(NoTitle),$(!REG_VT_DWORD),1}}
Debug-Output "Services, AddValueList, "$(KeyParameters)", "$(NewValueList)
Shell $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
CloseRegKey $(KeyParameters)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "ShellCode error."
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
Debug-Output "Registry error: Add value list"
goto fatalregistry
endif
EndForListDo
EndWait
;
;now after write all to registry, it should go to configure the adapter
;we should deside it is the primer install mode or configure mode
;
Debug-Output "Now should go to config."
goto installconfigure
bindingadapter =+
set !G:DebugOutputControl = 1
set Error = "Binding: Sorry, not yet implemented."
Debug-Output "Error: Do not Binding."
goto fatal
removeadapter = +
Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
$(ProductSoftwareName)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "ShellCode error"
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
goto fatalregistry
endif
else
Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
$(ProductSoftwareName), $(!NTN_RegBase)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "ShellCode error"
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
goto fatalregistry
endif
endif
Debug-Output "Remove the files"
set SrcDir = $(!STF_CWDDIR)
Debug-Output "Ready to load DeleteDLL dll"
;LoadLibrary "x" $(SrcDir)$(ParamDllName) hLib
LoadLibrary "Setup Disk: #1" .\$(ParamDllName) hLib
Debug-Output "Ready to call the Deletedll procedure:"$(hLib)
LibraryProcedure retstr $(hLib) DeleteInstalledFiles $(SoftwareName)
FreeLibrary $(hLib)
ifstr(i) $(retstr) == "DELETE"
Debug-Output "Deleting"$(SrcDir)$(ParamDllName)
AddfileToDeleteList $(SrcDir)$(ParamDllName)
endif
goto end
UpgradeSoftware = +
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)}
SetRegValue $(KeyProduct) {ReleaseDate,$(NoTitle),$(!REG_VT_SZ),$(ReleaseDate)}
SetRegValue $(KeyProduct) {SoftwareVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductVersion)}
SetRegValue $(KeyProduct) {MiniportVersion,$(NoTitle),$(!REG_VT_SZ),$(MiniportVersion)}
; sreehari - next line is for fixing bug # 1110
SetRegValue $(KeyProduct) {Title,$(NoTitle),$(!REG_VT_SZ),$(GenericDriverName)}
CloseRegKey $(KeyProduct)
else
goto fatalregistry
endif
; sreehari - next 7 lines are for fixing bug # 1110
OpenRegKey $(!REG_H_LOCAL) "" $(ServiceKeyName) $(MAXIMUM_ALLOWED) ServiceKey
Ifstr $(ServiceKey) != $(KeyNull)
SetRegValue $(ServiceKey) {DisplayName,$(NoTitle),$(!REG_VT_SZ), $(GenericDriverName)}
CloseRegKey $(ServiceKey)
else
goto fatalregistry
endif
; do the dialog box from the dll
Debug-Output "Ready to load config dll"
;LoadLibrary "x" $(SrcDir)$(ParamDllName) hLib
LoadLibrary "Setup Disk: #1" .\$(ParamDllName) hLib
Debug-Output "Ready to call the dll procedure:"$(hLib)
LibraryProcedure retstr $(hLib) ShowConfigDialog $(SoftwareName)
FreeLibrary $(hLib)
Ifstr(i) $(retstr) == "OK"
goto successful
Else-Ifstr(i) $(retstr) == "CANCEL"
Set Severity = STATUS
Set CommonStatus = STATUS_USERCANCEL
goto successful
Else
goto fatal
goto end
successful = +
goto end
abandon = +
ForListDo $(OEM_ABANDON_OPTIONS)
Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
$(ProductSoftwareName), $($)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "ShellCode error"
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)
Debug-Output "ShellCode error"
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 Severity = STATUS
Set CommonStatus = STATUS_USERCANCEL
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
;sreehari
; goto "end"
goto "RemoveAdapter"
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)
Debug-Output "ShellCode error: cannot get an error string."
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 = +
goto term
term = +
Return $(CommonStatus)
[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-Dll $(SrcDir) $(!STF_WINDOWSSYSPATH)
CopyFilesInCopyList
exit
[Install-Dll]
set STF_VITAL = ""
ifstr(i) $(AddCopy) == "YES"
AddSectionFilesToCopyList Files-Dll $(SrcDir) $(!STF_WINDOWSSYSPATH)
endif
ifstr(i) $(DoCopy) == "YES"
set !STF_NCPA_FLUSH_COPYLIST = TRUE
CopyFilesInCopyList
endif
exit
[Source Media Descriptions]
1 = "Asante Setup Disk"
[Signature]
FileType = MICROSOFT_FILE
[GetSignature]
read-syms Signature
return $(FileType)
[ProductType]
STF_PRODUCT = Winnt
STF_PLATFORM = I386
[Files-Inf]
1, oemsetup.inf, SIZE=1000, RENAME=$(!UG_Filename)
[Files-asante]
1,NT40\asandis.sys , SIZE=999, RENAME=asandis.sys
[Files-Dll]
1,NT40\asadlg.dll , SIZE=999, RENAME=asadlg.dll
[LanguagesSupported]
ENG
[OptionsTextENG]
Asante = "Asante GigaNIX1000T Gigabit Ethernet 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:"
AdapterName = "Asante PCI 1000BASE-SX"
BaseTAdapter = "Asante GigaNIX1000T Gigabit Ethernet Adapter"
SoftwareName = "AceNIC Adapter Software Release "
GenericAdapterName = $(AdapterName)$(ProductVersion)
GenericBaseTAdapter = $(BaseTAdapter)$(ProductVersion)
GenericDriverName = $(SoftwareName)$(ProductVersion)
ProductSoftwareDescription = $(SoftwareName)
ProductHardwareDescription = $(GenericAdapterName)
ProductHardwareasanteDescription=$(GenericAdapterName)
ProductSoftwareTitle = $(GenericDriverName)
ProductHardwareasanteTitle = $(GenericAdapterName)
NetworkDrvName = "asandis.sys"
ParamDllName = "ASADLG.DLL"
CANNOT_FIND_ANY_CARD = "Network Card is not present in the system."
NO_SP4 = "The driver for this Network Adapter requires Service Pack 4 or higher. Please exit installation and update your system."
[DialogConstantsENG]
Help = "&Help"
Exit = "Cance&l"
OK = "&OK"
HelpContext = ""
Continue = "C&ontinue"
Cancel = "&Cancel"
[FileDependentDlgPCIENG]
FunctionTitle = "Asante GigaNIX1000T Gigabit Ethernet Adapter setup"
DlgText = "Please select values for the following fields:"
CheckBox123 = "Link Negotiation &Enabled"
Radio1 = "&Enable"
DlgType = "RadioCombination"
DlgTemplate = "alt"
Caption = $(FunctionTitle)
CBOptionsGreyed = {}
NotifyFields = {NO, NO}
HelpContext = 1
ComboListItemsIn = {}
ComboListItemsOut = {}
EditTextIn = ""
EditTextLim = ""
Download Driver Pack
After your driver has been downloaded, follow these simple steps to install it.
Expand the archive file (if the download file is in zip or rar format).
If the expanded file has an .exe extension, double click it and follow the installation instructions.
Otherwise, open Device Manager by right-clicking the Start menu and selecting Device Manager.
Find the device and model you want to update in the device list.
Double-click on it to open the Properties dialog box.
From the Properties dialog box, select the Driver tab.
Click the Update Driver button, then follow the instructions.
Very important: You must reboot your system to ensure that any driver updates have taken effect.
For more help, visit our Driver Support section for step-by-step videos on how to install drivers for every file type.