Windows NT 4.0 source code leak
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

679 lines
18 KiB

;-----------------------------------------------------------------
; Copyright(c) 1992-93 Microsoft Corporation
;
; SETUP INF FILE for the LT200 LocalTalk Adapter
;
; Author: KrishG
;
;
;-----------------------------------------------------------------
[Identification]
OptionType = NetAdapter
[PlatformsSupported]
ISA
EISA
"Jazz-Internal Bus"
[LanguagesSupported]
ENG
[Options]
LT200
[OptionsTextENG]
LT200 = "DayStar Digital LocalTalk Adapter"
[IRQChoices]
IRQ_0 = "0",0
IRQ_1 = "2",2
IRQ_2 = "3",3
IRQ_3 = "4",4
IRQ_4 = "5",5
[IOBaseAddrChoices]
IOBase_1 = "0x200",512
IOBase_2 = "0x240",576
IOBase_3 = "0x260",608
IOBase_4 = "0x2A0",672
IOBase_5 = "0x300",768
IOBase_6 = "0x320",800
IOBase_7 = "0x330",816
IOBase_8 = "0x340",832
IOBase_9 = "0x350",848
[FileConstants]
UtilInf = "UTILITY.INF"
SubInf = "SUBROUTN.INF"
SoftwareType = "driver"
Manufacturer = "Microsoft"
ProductMajorVersion = "3"
ProductMinorVersion = "1"
ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)
ProductSoftwareName = "lt200"
ProductSoftwareTitle = "Daystar Digital LocalTalk Adapter Driver"
ProductSoftwareImagePath = "%SystemRoot%\System32\drivers\lt200.sys"
NetRuleSoftwareType = "Lt200Sys ltkndisDriver lt200Driver"
NetRuleSoftwareUse = $(SoftwareType)
NetRuleSoftwareBindForm = """Lt200Sys"" yes no container"
NetRuleSoftwareClass = {"lt200Driver basic","ltkndisDriver basic yes"}
NetRuleSoftwareBindable = {"lt200Driver lt200Adapter non exclusive 100",+
"ltkndisDriver lt200Driver non non 100"}
ProductEventDll = "%SystemRoot%\System32\lt200msg.dll"
ProductHardwareName = "lt200"
ProductHardwareTitle = "DayStar Digital LocalTalk Adapter"
NetRuleHardwareType = "lt200 lt200Adapter"
NetRuleHardwareBindForm = " yes yes container"
NetRuleHardwareClass = {"lt200Adapter basic"}
ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
ParamKeyName = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
CardKey = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards"
ProductInfName = $(!STF_CWDDIR)"oemnadlt.inf"
[GeneralConstants]
KeyNull = ""
MAXIMUM_ALLOWED = 33554432
RegistryErrorIndex = NO_ERROR
KeyProduct = ""
KeyParameters = ""
TRUE = 1
FALSE = 0
NoTitle = 0
!DebugOutputControl = 1
[FileConstantsENG]
ProCaption = "LocalTalk Adapter Setup"
ProCancel = "Cancel"
ProCancelMsg = "LT200 LocalTalk Adapter is not correctly installed. "+
"Are you sure you want to cancel copying files ?"
ProCancelCap = "Network Setup Message"
ProText1 = "Copying:"
ProText2 = "To:"
Error = "User has cancelled copying files. Copied files will be removed."
FunctionTitle = "DayStar Digital LocalTalk Adapter Card Setup"
ProductSoftwareDescription = "DayStar Digital LocalTalk Adapter Driver"
ProductHardwareDescription = "DayStar Digital LocalTalk Adapter"
AskLocationText = "Please enter the full path of the LocalTalk Adapter "+
"distribution files. Then choose continue."
MajorVersion = "MajorVersion"
MinorVersion = "MinorVersion"
IRQList = ^(IRQChoices, 1)
IRQValues = ^(IRQChoices, 2)
IOBaseAddrList = ^(IOBaseAddrChoices, 1)
IOBaseAddrValues = ^(IOBaseAddrChoices, 2)
[DialogConstantsENG]
Help = "&Help"
Exit = "Cancel"
OK = "OK"
HelpContext = ""
Continue = "Continue"
Cancel = "Cancel"
[date]
Now = {} ? $(!LIBHANDLE) GetSystemDate
[FileDependentDlgENG]
DlgType = "RadioCombination"
DlgTemplate = "NE2000"
Caption = $(FunctionTitle)
DlgText = "Please select values for the follwing fields:"
Label1 = "&IRQ Level:"
Label2 = "I/O Base &Addr:"
Combo1List = $(IRQList)
Combo1Out = $(IRQValue)
Combo2List = $(IOBaseAddrList)
Combo2Out = $(IOBaseAddrValue)
ComboListItemsIn = {Combo1List, Combo2List}
ComboListItemsOut = {Combo1Out, Combo2Out}
EditTextIn = ""
EditTextLim = ""
CBOptionsGreyed = {}
NotifyFields = {NO, NO}
HelpContext = $(!IDH_DB_OEMNADLT_INS)
[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)
goto returnoptions
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 Status = STATUS_FAILED
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
StartWait
set-subst LF = "\n"
set-subst CR = "\r"
read-syms GeneralConstants
read-syms FileConstants
read-syms DialogConstants$(!STF_LANGUAGE)
read-syms FileConstants$(!STF_LANGUAGE)
; read-syms SfmSetupHelpIds
; SetHelpFile $(!STF_CWDDIR)sfmsetup.hlp $(MinHelpID) $(MaxHelpID)
detect date
set-title $(FunctionTitle)
set CommonStatus = STATUS_SUCCESSFUL
EndWait
Begin = +
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
else
set StartLabel = installadapter
set REMOVE_SOFTWARE = TRUE
set REMOVE_HARDWARE = {}
endif
goto $(StartLabel)
;------------------------------------------------------------------------------
installadapter = +
OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
Ifstr $(KeyProduct) != $(KeyNull)
GetRegValue $(KeyProduct) $(MajorVersion) VersionInfo
set VersionMajor = *($(VersionInfo), 4)
GetRegValue $(KeyProduct) $(MinorVersion) VersionInfo
set VersionMinor = *($(VersionInfo), 4)
set InstalledVersion = $(VersionMajor)"."$(VersionMinor)
ifstr(i) $(ProductVersion) == $(InstalledVersion)
read-syms MiscErrorString1$(!STF_LANGUAGE)
Set Text = "Version "$(ProductVersion)
Shell $(SubInf), SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(Text)$(ErrorString)
goto end
EndIf
Else
set Text = $(AskLocationText)
ifstr(i) $(!NTN_InstallPhase) == "secondary"
Shell $(SubInf), DoAskSourceEx, $(SrcDir) $(Text)
Ifint $($ShellCode) != 0
Goto ShellCodeError
Else-Ifstr(i) $($R0) == STATUS_FAILED
Shell $(UtilInf) RegistryErrorString "ASK_SOURCE_FAIL"
ifint $($ShellCode) != 0
goto ShellCodeError
endif
set Error = $($R0)
Goto fatal
Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
Goto usercancel
Endif
Set SrcDir = $($R1)
EndIf
EndIf
install "Install-Update"
ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
goto usercancel
Endif
adapteroptions = +
set IRQValue = *($(IRQList), 4)
set IOBaseAddrValue = *($(IOBaseAddrList), 8)
read-syms FileDependentDlg$(!STF_LANGUAGE)
ui start "InputDlg"
ifstr(i) $(DLGEVENT) == "CONTINUE"
set IRQValueIndex = $(Combo1Out)
set IOBaseAddrIndex = $(Combo2Out)
ui pop 1
else-ifstr(i) $(DLGEVENT) == "EXIT"
set CommonStatus = STATUS_USERCANCEL
Debug-Output "Action: exit. Bye."
ui pop 1
goto end
else
ui pop 1
goto end
endif
installproduct = +
Set FLibraryErrCtl = 1
Shell $(UtilInf), AddSoftwareComponent, +
$(Manufacturer),+
$(ProductSoftwareName), +
$(ProductSoftwareName), +
$(ProductSoftwareName), +
$(ProductInfName), +
$(ProductSoftwareImagePath),+
"kernel", "NDIS", {}, "", $(ProductEventDll)
ifint $($ShellCode) != 0
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
set KeyProduct = $($R1)
Set SoftNetRulesKey = $($R2)
CloseRegKey $($R3)
CloseRegKey $($R4)
CloseRegKey $($R5)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
CloseRegKey $(KeyProduct)
CloseRegKey $(SoftNetRulesKey)
goto fatalregistry
endif
set NewValueList = {{SoftwareType,0,$(!REG_VT_SZ),$(SoftwareType)},+
{MajorVersion,0,$(!REG_VT_DWORD),$(ProductMajorVersion)},+
{MinorVersion,0,$(!REG_VT_DWORD),$(ProductMinorVersion)},+
{Title,0,$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
{Description,0,$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
{PathName,0,$(!REG_VT_SZ),$(!STF_WINDOWSSYSPATH)},+
{ServiceName,0,$(!REG_VT_SZ),$(ProductSoftwareName)},+
{InstallDate,0,$(!REG_VT_DWORD),*($(Now),1)}}
Shell $(UtilInf), AddValueList, $(KeyProduct), $(NewValueList)
ifint $($ShellCode) != 0
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
CloseRegKey $(KeyProduct)
CloseRegKey $(SoftNetRulesKey)
goto fatalregistry
endif
set NewValueList = {{type,0,$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
{use,0,$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
{bindform,0,$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
{class,0,$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
{bindable,0,$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
{InfOption,0,$(!REG_VT_SZ),$(Option)}, +
{Infname ,0,$(!REG_VT_SZ),$(ProductInfName)} }
Shell $(UtilInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
ifint $($ShellCode) != 0
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
CloseRegKey $(KeyProduct)
CloseRegKey $(SoftNetRulesKey)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
Debug-Output "Resgitry error: add value list."
goto fatalregistry
endif
Shell $(UtilInf), AddHardwareComponent, $(ProductHardwareName),$(ProductInfName),$(ProductKeyName)
ifint $($R4) != -1
Set REMOVE_HARDWARE = >($(REMOVE_HARDWARE), $(CardKey)"\"$($R4))
endif
ifint $($ShellCode) != 0
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,0,$(!REG_VT_SZ),$(Manufacturer)},+
{Title,0,$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitle)},+
{Description,0,$(!REG_VT_SZ),$(ProductHardwareDescription)},+
{ProductName,0,$(!REG_VT_SZ),$(ProductHardwareName)},+
{ServiceName,0,$(!REG_VT_SZ),$($R5)},+
{InstallDate,0,$(!REG_VT_DWORD),*($(Now),1)}}
Shell $(UtilInf), AddValueList, $($R1), $(NewValueList)
ifint $($ShellCode) != 0
goto ShellCodeError
endif
CloseRegKey $($R1)
set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
set NewValueList = {{type,0,$(!REG_VT_SZ),$(NetRuleHardwareType)},+
{bindform,0,$(!REG_VT_SZ),$(TempBindForm)}, +
{class,0,$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
{InfOption,0,$(!REG_VT_SZ),$(Option)}, +
{Infname ,0,$(!REG_VT_SZ),$(ProductInfName)}}
Shell $(UtilInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
ifint $($ShellCode) != 0
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
CloseRegKey $(KeyParameters)
CloseRegKey $(KeyAdapterRules)
goto fatalregistry
endif
CloseRegKey $(KeyAdapterRules)
goto writeparameters
configureadapter = +
OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
Ifstr $(KeyProduct) == $(KeyNull)
set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
goto fatalregistry
Endif
Shell $(UtilInf) FindService, $(KeyProduct)
Ifint $($ShellCode) != 0
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 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) == "InterruptNumber"
set IRQValueIndex = $(ValueData)
else-ifstr(i) $(ValueName) == "IOBaseAddress"
set IOBaseAddrIndex = $(ValueData)
endif
EndForListDo
set IRQValue = *($(IRQList), ~($(IRQValues),$(IRQValueIndex)))
ifstr(i) $(IRQValue) == ""
set IRQValue = *($(IRQList), 2)
endif
set IOBaseAddrValue = *($(IOBaseAddrList), ~($(IOBaseAddrValues),$(IOBaseAddrIndex)))
ifstr(i) $(IOBaseAddrValue) == ""
set IOBaseAddrValue = *($(IOBaseAddrList), 1)
endif
cfgoptions = +
read-syms FileDependentDlg$(!STF_LANGUAGE)
ui start "InputDlg"
ifstr(i) $(DLGEVENT) == "CONTINUE"
set IRQValueIndex = $(Combo1Out)
set IOBaseAddrIndex = $(Combo2Out)
ui pop 1
else-ifstr(i) $(DLGEVENT) == "EXIT"
set CommonStatus = STATUS_USERCANCEL
ui pop 1
goto end
else
ui pop 1
goto end
endif
;------------------------------------------------------------------
writeparameters = +
set IRQValue = *($(IRQValues), ~($(IRQList),$(IRQValueIndex)))
set IOBaseAddrValue = *($(IOBaseAddrValues), +
~($(IOBaseAddrList),$(IOBaseAddrIndex)))
set NewValueList = {{MediaType,0,$(!REG_VT_DWORD),3},+
{InterruptNumber,0,$(!REG_VT_DWORD),$(IRQValue)},+
{Server,0,$(!REG_VT_DWORD),1)},+
{IOBaseAddress,0,$(!REG_VT_DWORD),$(IOBaseAddrValue)}}
Shell $(UtilInf), AddValueList, $(KeyParameters), $(NewValueList)
CloseRegKey $(KeyParameters)
ifint $($ShellCode) != 0
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
goto end
removeadapter = +
Set FLibraryErrCtl = 1
Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
Shell $(UtilInf), RemoveSoftwareComponent, $(Manufacturer),$(ProductSoftwareName)
ifint $($ShellCode) != 0
Debug-Output "ShellCode error"
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
goto fatalregistry
endif
else
Shell $(UtilInf), RemoveHardwareComponent, $(Manufacturer),$(ProductSoftwareName), $(!NTN_RegBase)
ifint $($ShellCode) != 0
Debug-Output "ShellCode error"
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
goto fatalregistry
endif
endif
goto end
UpgradeSoftware = +
ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
Ifstr $(KeyProduct) != $(KeyNull)
GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
set Version = *($(VersionInfo), 4)
Split-String $(!NTN_Infname), "\", FilenameList
QueryListSize ListSize $(FilenameList)
set !UG_Filename = *($(FilenameList), $(ListSize))
install "Install-Update"
ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
goto fatal
endif
SetRegValue $(KeyProduct) {MajorVersion,0,$(!REG_VT_SZ),$(ProductMajorVersion)}
SetRegValue $(KeyProduct) {MinorVersion,0,$(!REG_VT_SZ),$(ProductMinorVersion)}
endif
else
OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) NetworkCardKey
Ifstr(i) $(NetworkCardKey) != $(KeyNull)
GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
set ServiceName = *($(ServiceNameInfo), 4)
OpenRegKey $(NetworkCardKey) "" "NetRules" $(MAXIMUM_ALLOWED) NetRuleKey
Ifstr(i) $(NetRuleKey) == $(KeyNull)
goto fatalregistry
endif
CloseRegKey $(NetRules)
CloseRegKey $(NetworkCardKey)
else
goto fatalregistry
endif
OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ServiceName)$(MAXIMUM_ALLOWED) ServiceKey
Ifstr(i) $(ServiceKey) != $(KeyNull)
CloseRegKey $(ServiceKey)
else
goto fatalregistry
endif
EndIf
successful = +
goto end
installstep1 = +
goto end
abandon = +
ForListDo $(REMOVE_HARDWARE)
Shell $(UtilInf), RemoveHardwareComponent, $(Manufacturer), +
$(ProductSoftwareName), $($)
ifint $($ShellCode) != 0
Debug-Output "ShellCode error"
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
goto fatalregistry
endif
EndForListDo
Ifstr(i) $(REMOVE_SOFTWARE) == TRUE
Shell $(UtilInf), RemoveSoftwareComponent, $(Manufacturer), +
$(ProductSoftwareName), FALSE
ifint $($ShellCode) != 0
Debug-Output "ShellCode error"
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
goto fatalregistry
endif
endif
goto end
fatalregistry = +
Shell $(UtilInf) RegistryErrorString $(RegistryErrorIndex)
ifint $($ShellCode) != 0
goto ShellCodeError
endif
set Error = $($R0)
goto fatal
fatal = +
Shell $(SubInf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
ifint $($ShellCode) != 0
goto ShellCodeError
endif
goto setfailed
ShellCodeError = +
set DlgType = "MessageBox"
set STF_MB_TITLE = $(FunctionTitle)
set STF_MB_TEXT = "An internal error occurred. Contact MS Support."
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
goto abandon
endif
goto end
end = +
Return $(CommonStatus)
[Install-Update]
set STF_VITAL = ""
AddSectionFilesToCopyList Files-LT200 $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
AddSectionFilesToCopyList Files-LT200MSG $(SrcDir) $(!STF_WINDOWSSYSPATH)
AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
CopyFilesInCopyList
Exit
[Source Media Descriptions]
1 = "Windows NT Advanced Server Setup Disk #1" , TAGFILE = lt200.sys
2 = "Windows NT Advanced Server Setup CD-ROM Disk" , TAGFILE = lt200.sys
[ProductType]
STF_PRODUCT = LanmanNT
STF_PLATFORM = I386
[Files-Inf]
2, oemsetup.inf, SIZE=1000,RENAME=oemnadlm.inf
[Files-LT200MSG]
2, lt200msg.dll, SIZE=34562
[Files-LT200]
2, lt200.sys , SIZE=37888