[Identification] OptionType = NetAdapter [PlatformsSupported] PCI [Options] DEC [FileConstants] GenericInfVersion = " v3.11" GenericSysName = "Ewrk1k.sys" GenericName = "Ewrk1k" UtilityInf = "UTILITY.INF" ParamInf = "NCPARAM.INF" subroutineinf = "SUBROUTN.INF" SoftwareType = "driver" Exit_Code = 0 NetEventDLL = "%SystemRoot%\System32\netevent.dll;%SystemRoot%\System32\Drivers\Ewrk1k.sys" IoLogMsgDLL = "%SystemRoot%\System32\IoLogMsg.dll" Manufacturer = "DEC" ProductMajorVersion = "1" ProductMinorVersion = "8" ProductLastDigit = "12" ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion) ProductSoftwareName = "Ewrk1k" ProductSoftwareImagePath = "\SystemRoot\System32\drivers\"$(GenericSysName) NetRuleSoftwareType = "decSys ndisDriver decDriver" NetRuleSoftwareUse = $(SoftwareType) NetRuleSoftwareBindForm = """decSys"" yes no container" NetRuleSoftwareClass = {"decDriver basic"} NetRuleSoftwareBindable = {"decDriver decAdapter non exclusive 100"} ProductHardwareName = "Ewrk1k" NetRuleHardwareType = "dec decAdapter" NetRuleHardwareBindForm = " yes yes container" NetRuleHardwareClass = {"decAdapter 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 = 1 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 from = $(fatal) Set to = $(fatal) Debug-Output "Select a place to go!" Goto $(StartLabel) installadapter = + Set CheckItemsIn = {"ON"} set Vendor1 = 4782 set Vendor2 = 5555 set CardID = 0001 ; Get first vendor id list Shell $(UtilityInf), GetPCIInformation, $(Vendor1) $(CardID) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set VendorList1 = $($R0) ; Get second vendor id list Shell $(UtilityInf), GetPCIInformation, $(Vendor2) $(CardID) ifint $($ShellCode) != $(!SHELL_CODE_OK) goto ShellCodeError endif set VendorList2 = $($R0) ; if first list is NULL, use the second vendor id list ; else if the second list is NULL, use the first vendor id list ; else append the two together and use both Debug-Output "Vendor list 1 " Debug-Output $(VendorList1) Debug-Output "Vendor list 2 " Debug-Output $(VendorList2) ; Sreehari - next 6 lines are for fixing bug # 932 ifstr(i) $(VendorList1) == {} set Error = $(CANNOT_FIND_ANY_CARD) set CommonStatus = USER_CANCEL set from = end goto nonfatal endif set VL1 = 0 set VL2 = 0 ForListDo $(VendorList1) Debug-Output *($($),2) set VL1 = 1 EndForListDo ForListDo $(VendorList2) Debug-Output *($($),2) set VL2 = 1 EndForListDo Debug-Output "Results" Debug-Output $(VL1) Debug-Output $(VL2) ifint $(VL1) == 0 Debug-Output "No adapters in list #1" set AdapterList = $(VendorList2) ifint $(VL2) == 0 Debug-Output "No adapters in either list. Aborting." goto end endif else ifint $(VL2) == 0 set AdapterList = $(VendorList1) Debug-Output "No adapters in list #2" else ;changed by Ron. , Oct. 29 set AdapterList = $(VendorList1) ; set AdapterList = ($(VendorList1),$(VendorList2)) Debug-Output "Adapters in both lists" ;add by Ron., Oct. 30 set index = 0 ForListDo $(VendorList2) set-add index = $(index),1 set item = *($(VendorList2), $(index)) set AdapterList = >($(AdapterList),$(item)) EndForListDo ;end fix by Ron. endif endif Debug-Output "adapter list" Debug-Output $(AdapterList) set NewAdapterList = {} set NumNew = 0 ForListDo $(AdapterList) set BusNumber = *($($),1) set SlotNum = *($($),2) Debug-Output $(UtilityInf)",IsNetCardAlreadyInstalled,Bus Number="$(BusNumber)",Slot Number="+ $(SlotNum)",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) Debug-Output $($R1) ifstr(i) $($R1) != "YES" set-add NumNew = $(NumNew),1 ifstr(i) $(NewAdapterList) == {} set NewAdapterList = {$($)} else set NewAdapterList = >($(NewAdapterList),$($)) endif Debug-Output $(NumNew) endif EndForListDo 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) ;here begin to add debug code Debug-Output "Ready to load config dll" LoadLibrary "x" $(SrcDir)$(ParamDllName) hLib Debug-Output "Ready to call the dll procedure:"$(hLib) LibraryProcedure retstr $(hLib) ShowConfigDialog $(SoftwareName) FreeLibrary $(hLib) ;here end of the debug code goto successful 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) ;here begin to add debug code Debug-Output "Ready to load config dll" LoadLibrary "x" $(SrcDir)$(ParamDllName) hLib Debug-Output "Ready to call the dll procedure:"$(hLib) LibraryProcedure retstr $(hLib) ShowConfigDialog $(SoftwareName) FreeLibrary $(hLib) ;here end of the debug code goto successful 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)},+ {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" ForListDo $(AdapterList) set BusNumber = *($($),1) set DeviceNum = *($($),2) set FunctionNum = *($($),3) 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) set HardwareDescription = $(SoftwareName) set HardwareTitle = $(GenericAdapterName) 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 writeparameters writeparameters = + 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)},+ {BusNumber, $(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+ {link, $(NoTitle),$(!REG_VT_DWORD),$(link)},+ {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 ; Debug-Output "Ready to call the Deletedll procedure:"$(hLib) ; LibraryProcedure retstr $(hLib) DeleteInstalledFiles $(SoftwareName) ; FreeLibrary $(hLib) 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)} ; 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 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 = "DEC 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-dec] 1,Ewrk1k.sys , SIZE=999 [Files-Dll] 1,Ewrk1k.dll , SIZE=999 [LanguagesSupported] ENG [OptionsTextENG] DEC = "Digital EtherWORKS 1000SX PCI Gigabit 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 = "Digital EtherWORKS 1000SX PCI Gigabit Adapter" SoftwareName = "Digital EtherWORKS 1000SX PCI Gigabit Adapter" GenericAdapterName = $(AdapterName)$(ProductVersion)"."$(ProductLastDigit) GenericDriverName = $(SoftwareName)$(ProductVersion)"."$(ProductLastDigit) ProductSoftwareDescription = $(SoftwareName) ProductHardwareDescription = $(GenericAdapterName) ProductHardwaredecDescription=$(GenericAdapterName) ProductSoftwareTitle = $(GenericDriverName) ProductHardwaredecTitle = $(GenericAdapterName) NetworkDrvName = "Ewrk1k.sys" ParamDllName = "Ewrk1k.DLL" CANNOT_FIND_ANY_CARD = "Network Card is not present in the system." [DialogConstantsENG] Help = "&Help" Exit = "Cance&l" OK = "&OK" HelpContext = "" Continue = "C&ontinue" Cancel = "&Cancel" [FileDependentDlgPCIENG] FunctionTitle = "Digital EtherWORKS 1000SX PCI Gigabit Adapter" DlgText = "Please select values for the following fields:" CheckBox123 = "Link Negotiation &Enabled" Radio1 = "&Enable" DlgType = "RadioCombination" DlgTemplate = "dec" 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.