home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows NT Super Tune-Up Kit
/
PIE-WindowsNTSuperTuneUpKit-1997.iso
/
RESRCKIT
/
NT31
/
ALPHA
/
RESKIT.EXE
/
OEMNSVKT.INF
< prev
next >
Wrap
INI File
|
1993-09-03
|
39KB
|
1,282 lines
;------------------------------------------------------------------------
; Copyright(c) 1992-93 Microsoft Corporation
;
; Services for Macintosh Admin Tools Kit
;
; Author: KrishG
;
;------------------------------------------------------------------------
[Identification]
OptionType = NetService
[Options]
SFMADM
ATALK
[GeneralConstants]
UtilInf = "UTILITY.INF"
SubInf = "SUBROUTN.INF"
!KeyNull = ""
!ACCESS = 33554432
RegistryErrorIndex = NO_ERROR
KeyProduct = ""
KeyParameters = ""
TRUE = 1
FALSE = 0
NoTitle = 0
!DebugOutputControl = 1
ProductInfName = "oemnsvkt.inf"
[FileConstants]
Manufacturer = "Microsoft"
ProductMajorVersion = "3"
ProductMinorVersion = "1"
ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)
ProductSFMName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\SFM\CurrentVersion"
!ProductKeyLinkage = $(!NTN_ServiceBase)"\"$(ProductATALKName)"\Linkage"
;------------------------------------------------------------------------
; Dll And File Names
;---------------------------------------------------------------------
UtilDll = "sfmutil.dll"
ResDll = "sfmres.dll"
NtNetIniFileName = "ntnet.ini"
WinFileIniFileName = "winfile.ini"
AfpMgrCplFile = "sfmmgr.dll"
SrvMgrIniSection = "SMAddons"
WinFileIniSection = "Addons"
AtWinSockDll = "sfmwshat.dll"
[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)
[date]
Now = {} ? $(!LIBHANDLE) GetSystemDate
[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
detect date
set-subst LF = "\n"
set-subst CR = "\r"
read-syms GeneralConstants
read-syms FileConstants
read-syms DialogConstants$(!STF_LANGUAGE)
read-syms FileConstants$(!STF_LANGUAGE)
set-title $(FunctionTitle)
set CommonStatus = STATUS_SUCCESSFUL
Begin = +
IfStr(i) $(!NTN_InstallMode) == deinstall
Set StartLabel = RemoveAdmin
Set REMOVE_SOFTWARE = {}
Set REMOVE_SOFTWARE = >($(REMOVE_SOFTWARE), $(Product$(Option)Name))
else-Ifstr(i) $(!NTN_InstallMode) == Update
set StartLabel = UpgradeAdmin
else-Ifstr(i) $(!NTN_InstallMode) == configure
goto configureadmin
else-Ifstr(i) $(!NTN_InstallMode) == bind
goto BindingsSfm
else-Ifstr(i) $(!NTN_InstallMode) == install
set StartLabel = InstallAdmin
else
Set StartLabel = end
endif
goto $(StartLabel)
;------------------------------------------------------------------
; Install the product
;------------------------------------------------------------------
InstallAdmin = +
Set FLibraryErrCtl = 1
; Detect if SFM is already installed
Set ProductTextName = $(Product$(Option)Name)
OpenRegKey $(!REG_H_LOCAL) "" $(ProductSFMName) $(!ACCESS) 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 SfmAlreadyInstalled$(!STF_LANGUAGE)
Set Text = $(Version)$(ProductVersion)
Shell $(SubInf), SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(Text)$(ErrorString)
goto end
EndIf
EndIf
; Detect if res kit is already installed. If installed, ask the user to
; use the update option. Otherwise ask the user to input the
; location of the SFM files
Set !ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(Product$(Option)Name)"\CurrentVersion"
OpenRegKey $(!REG_H_LOCAL) "" $(!ProductKeyName) $(!ACCESS) 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)$(OF)$(ProductTextName)
Shell $(SubInf), SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(Text)$(ErrorString)
goto end
EndIf
EndIf
ifstr(i) $(!NTN_InstallMode) == "install"
Ifstr(i) $(!DoCopy) == "YES"
Shell $(UtilInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
Ifint $($ShellCode) != $(!SHELL_CODE_OK)
Goto ShellCodeError
Else-Ifstr(i) $($R0) == STATUS_FAILED
Shell $(UtilInf) RegistryErrorString "ASK_SOURCE_FAIL"
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
set Error = $($R0)
Goto end
Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
Goto end
Endif
Set SrcDir = $($R1)
Endif
Endif
CopyAdminFiles = +
install "Install-Initial"
ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
Shell "" RemoveAdminFiles "INSTALL"
goto usercancel
endif
StartInstall = +
Set REMOVE_FLAG = TRUE
Set REMOVE_SOFTWARE = {}
Ifstr(i) $(Option) == "SFMADM"
Set REMOVE_SOFTWARE = >($(REMOVE_SOFTWARE),$(Product$(Option)Name))
Shell $(UtilInf), InstallSoftwareProduct, $(Manufacturer),$(Product$(Option)Name), $(ProductInfName)
ifint $(ShellCode) != 0
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
CloseRegKey $($R1)
CloseRegKey $($R2)
goto fatalregistry
Endif
Set AdminProductKey = $($R1)
Set AdminNetRuleKey = $($R2)
; set product key information in the registry
set NewValueList = +
{{Infname,0,$(!REG_VT_SZ),$(ProductInfName)},+
{Title,0,$(!REG_VT_SZ), $(Product$(Option)Title)},+
{Description,$(NoTitle),$(!REG_VT_SZ),$(Product$(Option)Description)},+
{MajorVersion,0,$(!REG_VT_DWORD),$(ProductMajorVersion)},+
{MinorVersion,0,$(!REG_VT_DWORD),$(ProductMinorVersion)},+
{InstallDate,0,$(!REG_VT_DWORD),*($(Now),1)}}
Shell $(UtilInf), AddValueList, $(AdminProductKey), $(NewValueList)
ifint $(ShellCode) != 0
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
CloseRegKey $(AdminProductKey)
CloseRegKey $(AdminNetRuleKey)
goto fatalregistry
endif
Set NewValueList = {{InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}, +
{Infname,$(NoTitle),$(!REG_VT_SZ),$(ProductInfName)}}
Shell $(UtilInf), AddValueList, $(AdminNetRuleKey), $(NewValueList)
ifint $(ShellCode) != 0
goto ShellCodeError
endif
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
CloseRegKey $(AdminProductKey)
CloseRegKey $(AdminNetRuleKey)
goto fatalregistry
Endif
CloseRegKey $(AdminProductKey)
CloseRegKey $(AdminRuleKey)
LoadLibrary "x" $(!STF_CWDDIR)sfmutil.dll !UTILHANDLE
Debug-Output "Load Util Library"
; WRITE Private Profile String in NTNET.INI
Set IniFile = $(!STF_NTPATH)"\"$(NtNetIniFileName)
Set IniString = $(!STF_WINDOWSSYSPATH)"\"$(AfpMgrCplFile)
Set IniSection = $(SrvMgrIniSection)
Debug-Output "Ini File = "$(IniFile)
Debug-Output "Ini String = "$(IniString)
Debug-Output "Ini Section = "$(IniSection)
Set FLibraryErrCtl = 1
LibraryProcedure IniStatus $(!UTILHANDLE) WriteAfpMgrIniStrings, $(IniSection), $(IniString), $(IniFile)
Set FLibraryErrCtl = 0
ifstr(i) $(IniStatus) == "FAILED"
read-syms AFPString3$(!STF_LANGUAGE)
shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorString)
EndIf
; Do the same thing for File Manager
Set IniFile = $(!STF_NTPATH)"\"$(WinFileIniFileName)
Set IniString = $(!STF_WINDOWSSYSPATH)"\"$(AfpMgrCplFile)
Set IniSection = $(WinFileIniSection)
Set FLibraryErrCtl = 1
LibraryProcedure IniStatus $(!UTILHANDLE) WriteAfpMgrIniStrings, $(IniSection), $(IniString), $(IniFile)
Set FLibraryErrCtl = 0
ifstr(i) $(IniStatus) == "FAILED"
read-syms AFPString2$(!STF_LANGUAGE)
shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorString)
EndIf
FreeLibrary $(!UTILHANDLE)
EndIf
Ifstr(i) $(Option) == "ATALK"
Set ThisOption = ATALK
Set REMOVE_SOFTWARE = >($(REMOVE_SOFTWARE), $(Product$(ThisOption)Name))
LoadLibrary "x" $(!STF_CWDDIR)sfmutil.dll !UTILHANDLE
Set Atalk_DependList = {"+NDIS"}
Set FLibraryErrCtl = 1
Shell $(UtilInf), AddSoftwareComponent,+
$(Manufacturer), +
$(Product$(ThisOption)Name),+
$(Product$(ThisOption)Name), +
$(Product$(ThisOption)DisplayName), +
$(ProductInfName),+
$(Product$(ThisOption)ImagePath),+
"kernelautostart", "",+
$(Atalk_DependList), "",+
$(Product$(ThisOption)EventDll)
Set FLibraryErrCtl = 0
Set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
CloseRegKey $($R1)
CloseRegKey $($R2)
CloseRegKey $($R3)
CloseRegKey $($R4)
CloseRegKey $($R5)
goto fatalregistry
EndIf
; At this point:
; $R1 contains the product version key handle;
; $R2 contains the NetRules subkey handle;
; $R3 contains the new Services key handle; and
; $R4 contains the Parameters key
; $R5 contains the Linkage Key
;
Set AtkVersKey = $($R1)
Set AtkNetRuleKey = $($R2)
Set AtkSvcKey = $($R3)
Set AtalkParameters = $($R4)
Set AtkLinkageKey = $($R5)
set NewValueList = +
{{SoftwareType,0,$(!REG_VT_SZ),$(Product$(ThisOption)Type)},+
{Title,0,$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
{Description,0,$(!REG_VT_SZ),$(Product$(ThisOption)Description)},+
{PathName,0,$(!REG_VT_SZ),$(!STF_WINDOWSSYSPATH)},+
{ServiceName,0,$(!REG_VT_SZ),$(Product$(ThisOption)Name)},+
{MajorVesion, 0, $(!REG_VT_DWORD),$(ProductMajorVersion)},+
{MinorVesion, 0, $(!REG_VT_DWORD),$(ProductMinorVersion)},+
{Review,0,$(!REG_VT_DWORD),1},+
{InstallDate,0,$(!REG_VT_DWORD),*($(Now),1)}}
Shell $(UtilInf), AddValueList, $(AtkVersKey), $(NewValueList)
set RegistryErrorIndex = $($R0)
Ifstr $(RegistryErrorIndex) != NO_ERROR
CloseRegKey $(AtkVersKey)
CloseRegKey $(AtkNetRuleKey)
CloseRegKey $(AtkSvcKey)
CloseRegKey $(AtkLinkageKey)
CloseRegKey $(AtalkParameters)
goto fatalregistry
EndIf
set NewValueList = +
{{type,0,$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)}, +
{use,0,$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)}, +
{bindform,0,$(!REG_VT_SZ),$(NetRule$(ThisOption)BindForm)}, +
{class,0, $(!REG_VT_MULTI_SZ),$(NetRule$(ThisOption)Class)}, +
{bindable,0, $(!REG_VT_MULTI_SZ), $(NetRule$(ThisOption)BindList)},+
{InfOption,0,$(!REG_VT_SZ),$(Option)}, +
{Infname,0,$(!REG_VT_SZ),$(ProductInfName)} }
Shell $(UtilInf), AddValueList, $(AtkNetRuleKey), $(NewValueList)
set RegistryErrorIndex = $($R0)
Ifstr $(RegistryErrorIndex) != NO_ERROR
CloseRegKey $(AtkVersKey)
CloseRegKey $(AtkNetRuleKey)
CloseRegKey $(AtkSvcKey)
CloseRegKey $(AtkLinkageKey)
CloseRegKey $(AtalkParameters)
goto fatalregistry
EndIf
set NewValueList = {{OtherDependencies,0,$(!REG_VT_MULTI_SZ),{"+NDIS"}}}
shell $(UtilInf), AddValueList, $(AtkLinkageKey), $(NewValueList)
set RegistryErrorIndex = $($R0)
Ifstr $(RegistryErrorIndex) != NO_ERROR
CloseRegKey $(AtkVersKey)
CloseRegKey $(AtkNetRuleKey)
CloseRegKey $(AtkSvcKey)
CloseRegKey $(AtkLinkageKey)
CloseRegKey $(AtalkParameters)
goto fatalregistry
EndIf
;
; Create the Adapters Key
; CODEWORK - Localize ?
;
CreateRegKey $(AtkSvcKey), {"Adapters",0,GenericClass},+
"", $(!ACCESS), "" , KeyAdapters
; write global parameters
Set DesiredZone = ""
set NewValueList = +
{{EnableRouter,0,$(!REG_VT_DWORD),0},+
{InitialInstall,0, $(!REG_VT_DWORD),1},+
{DesiredZone,0,$(!REG_VT_SZ),$(DesiredZone)}}
Shell $(UtilInf), AddValueList, $(AtalkParameters), $(NewValueList)
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
CloseRegKey $(KeyAdapters)
goto fatalregistry
EndIf
; Add WinSock Support to AppleTalk
Set WinAtalkDll = $(!STF_WINDOWSSYSPATH)"\"$(AtWinSockDll)
Set MaxSockAddrLen = 8
Set MinSockAddrLen = 6
Shell $(UtilInf) AddWinsockInfo $(Product$(ThisOption)Name), +
$(WinAtalkDll), +
$(MaxSockAddrLen),+
$(MinSockAddrLen)
ifstr(i) $($R0) != NO_ERROR
read-syms AtalkString1$(!STF_LANGUAGE)
Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorString)
Endif
; close all open keys
CloseRegKey $(AtkVersKey)
CloseRegKey $(AtkNetRuleKey)
CloseRegKey $(AtkSvcKey)
CloseRegKey $(AtkLinkageKey)
CloseRegKey $(AtalkParameters)
CloseRegKey $(KeyAdapters)
EndIf
goto successful
Bindingssfm = +
Set DefaultPortRemoved = FALSE
OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\AppleTalk\Linkage" $(!ACCESS) LinkageKey
Ifstr(i) $(LinkageKey) == $(!KeyNull)
Set RegistryErrorIndex = UNABLE_ACCESS_CONFIGURE_SERVICE
Goto fatalregistry
Endif
OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\AppleTalk\Parameters" $(!ACCESS) BindParmKey
Ifstr(i) $(BindParmKey) == $(!KeyNull)
Set RegistryErrorIndex = UNABLE_ACCESS_CONFIGURE_SERVICE
Goto fatalregistry
Endif
Set BindList = {}
Set ExportList = {}
Set RouteList = {}
GetRegValue $(LinkageKey) "Bind" BindList
GetRegValue $(LinkageKey) "Export" ExportList
GetRegValue $(LinkageKey) "Route" RouteList
GetRegValue $(LinkageKey) "Exclude" ExcludeList
QueryListSize BindCount $(BindList)
IfInt $(BindCount) == 0
Goto endbinding
Endif
set NewBindList = {}
set NewExportList = {}
set NewRouteList = {}
ForListDo *($(BindList),4)
Split-String $($), "\", BindInfo
set NewBindList = >($(NewBindList), *($(BindInfo),4))
EndForListDo
ForListDo *($(ExportList),4)
set NewExportList = >($(NewExportList), $($))
EndForListDo
ForListDo *($(RouteList),4)
set NewRouteList = >($(NewRouteList), $($))
EndForListDo
ForListDo *($(ExcludeList),4)
set NewExcludeList = >($(NewExcludeList), $($))
EndForListDo
OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\AppleTalk\Adapters" $(!ACCESS) AdapterKey
Ifstr(i) $(AdapterKey) == $(!KeyNull)
Set RegistryErrorIndex = UNABLE_ACCESS_CONFIGURE_SERVICE
Goto fatalregistry
Endif
set AdapterList = ""
EnumRegKey $(AdapterKey) AdapterList
Set AtalkAdapterList = {}
ForListDo $(AdapterList)
Set AtalkAdapterList = >($(AtalkAdapterList), *($($),1))
EndForListDo
QueryListSize AdapterCount $(AtalkAdapterList)
Set fAddingFirstAdapter = FALSE
ifint $(AdapterCount) == 0
Set fAddingFirstAdapter = TRUE
EndIf
Set NewBindings = ""
Set TobeUsedBindList = {}
Set TobeUsedExportList = {}
Set TobeUsedRouteList = {}
ForListDo $(NewBindList)
IfContains(i) $($) not-in $(AtalkAdapterList)
Set NewBindings = TRUE
Set TobeUsedBindList = >($(TobeUsedBindList),"\Device\"$($))
Set TobeUsedExportList = >($(TobeUsedExportList),*($(NewExportList),$(#)))
Set TobeUsedRouteList = >($(TobeUsedRouteList),*($(NewRouteList),$(#)))
Shell "" CreateAtalkConfig $($) $(AdapterKey)
Ifstr(i) $($R0) != STATUS_SUCCESSFUL
CloseRegKey $(AdapterKey)
Set RegistryErrorIndex = $($R1)
goto fatalregistry
EndIf
Else
Set TobeUsedBindList = >($(TobeUsedBindList),"\Device\"$($))
Set TobeUsedExportList = >($(TobeUsedExportList),*($(NewExportList),$(#)))
Set TobeUsedRouteList = >($(TobeUsedRouteList),*($(NewRouteList),$(#)))
Endif
EndForListDo
set NewValueList = {{Bind,0,$(!REG_VT_MULTI_SZ),$(TobeUsedBindList)}, +
{Export,0,$(!REG_VT_MULTI_SZ),$(TobeUsedExportList)}, +
{Route,0,$(!REG_VT_MULTI_SZ),$(TobeUsedRouteList)}}
Ifstr(i) $(NewBindings) == TRUE
Shell $(UtilInf), AddValueList, $(LinkageKey), $(NewValueList)
set RegistryErrorIndex = $($R0)
CloseRegKey $(LinkageKey)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
goto fatalregistry
EndIf
EndIf
; Add the Default Port
Set DefaultPort = {}
Set MediaTypeList = {}
GetRegValue $(BindParmKey) "DefaultPort" DefaultPort
Ifstr(i) $(DefaultPort) != {}
goto removeadapters
EndIf
finddefaultport = +
ForListDo $(TobeUsedBindList)
Split-String $($) "\" PortName
Shell "" FindMediaType *($(PortName),4)
Ifstr(i) $($R0) == STATUS_SUCCESSFUL
Set MediaTypeList = >($(MediaTypeList), $($R1))
EndIf
EndForListDo
Ifcontains(i) "1" in $(MediaTypeList)
ForListDo $(MediaTypeList)
Ifint $($) == 1
Set DefaultPort = *($(TobeUsedBindList),$(#))
goto defportdone
EndIf
EndForListDo
else-ifcontains(i) "4" in $(MediaTypeList)
ForListDo $(MediaTypeList)
Ifint $($) == 4
Set DefaultPort = *($(TobeUsedBindList),$(#))
goto defportdone
EndIf
EndForListDo
else-ifcontains(i) "2" in $(MediaTypeList)
ForListDo $(MediaTypeList)
Ifint $($) == 2
Set DefaultPort = *($(TobeUsedBindList),$(#))
goto defportdone
EndIf
EndForListDo
else-ifcontains(i) "3" in $(MediaTypeList)
Set DefaultPort = *($(TobeUsedBindList),1)
else
read-syms NoAdaptersFound$(!STF_LANGUAGE)
Shell $(SubInf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(ErrorString)
goto endbinding
Endif
defportdone = +
Set NewValueList = {{DefaultPort,0,$(!REG_VT_SZ),$(DefaultPort)}}
Shell $(UtilInf), AddValueList, $(BindParmKey), $(NewValueList)
set RegistryErrorIndex = $($R0)
Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
goto fatalregistry
EndIf
goto startconfig
removeadapters = +
Split-String *($(DefaultPort),4) "\" PortName
ForListDo $(AtalkAdapterList)
Ifcontains(i) $($) not-in $(NewBindList)
DeleteRegKey $(AdapterKey) $($)
Ifstr(i) $($) == *($(PortName),4)
read-syms RemoveDefaultPort$(!STF_LANGUAGE)
Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "FATAL" $(ErrorString)
Set DefaultPortRemoved = TRUE
goto finddefaultport
Endif
EndIf
EndForListDo
; if this is the first time configuration start appletalk and launch config
; if the default port has been removed and other adapters are available
; start appletalk
startconfig = +
Set DoConfig = 0
GetRegValue $(BindParmKey) "InitialInstall" DoConfig
Set IsInitialInstall = *($(DoConfig),4)
Debug-Output "Config State = "$(DoConfig)
ifint $(IsInitialInstall) == 1
goto startsvc
EndIf
ifstr(i) $(DefaultPortRemoved) == TRUE
goto startsvc
endif
ifstr(i) $(fAddingFirstAdapter) == TRUE
goto startsvc
endif
goto endbinding
startsvc = +
Set FLibraryErrCtl = 1
read-syms StatusStartingAppleTalk$(!STF_LANGUAGE)
Shell $(SubInf) PushBillBoard NETSTATUSDLG $(Status)
StartWait
Set WaitStarted = 1
LibraryProcedure START_RESULT $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), STARTSVC, AppleTalk
Shell $(SubInf) PopBillBoard
Set START_STATUS = *($(START_RESULT),1)
Debug-Output "OEMNXPSM.INF: Start AppleTalk; result was: "$(START_STATUS)
Ifint $(START_STATUS) != 0
EndWait
Set WaitStarted = 0
LibraryProcedure START_RESULT $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), ERRORMSG, $(START_STATUS)
Set ATALK_ERROR_MESSAGE = *($(START_RESULT),2)
read-syms CannotStartAtalk$(!STF_LANGUAGE)
Set ErrorString = $(ATALK_ERROR_MESSAGE)$(ErrorSuffix)
Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "FATAL" $(ErrorString)
Else
; start the afd driver
LibraryProcedure START_RESULT $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), STARTSVC, Afd
Set START_STATUS = *($(START_RESULT),1)
Debug-Output "OEMNXPSM.INF: Start Afd result was: "$(START_STATUS)
Ifint $(START_STATUS) != 0
EndWait
Set WaitStarted = 0
LibraryProcedure START_RESULT $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), ERRORMSG, $(START_STATUS)
Set ATALK_ERROR_MESSAGE = *($(START_RESULT),2)
read-syms CannotStartAfd$(!STF_LANGUAGE)
Set ErrorString = $(ATALK_ERROR_MESSAGE)$(ErrorSuffix)
Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "FATAL" $(ErrorString)
goto endbinding
EndIf
; Launch the AppleTalk Transport Configuration
LoadLibrary "x" $(!STF_CWDDIR)sfmatcfg.dll ATHANDLE
Set FLibraryErrCtl = 1
Set atcfgresult = ""
LibraryProcedure atcfgresult, $(ATHANDLE),EnterAtalkConfigDLL $(!STF_HWND)
FreeLibrary $(ATHANDLE)
SetRegValue $(BindParmKey) {InitialInstall,0,$(!REG_VT_DWORD),0}
ifint $(IsInitialInstall) == 1
read-syms SetupSuccess$(!STF_LANGUAGE)
Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "STATUS" $(Status)
EndIf
EndWait
EndIf
endbinding = +
CloseRegKey $(BindParmKey)
goto end
ConfigureAdmin = +
Ifstr(i) $(Option) == "SFMADM"
read-syms CantConfigureADM$(!STF_LANGUAGE)
Shell $(SubInf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL",$(ErrorString)
goto successful
EndIf
OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\AppleTalk\Linkage" $(!ACCESS) LinkageKey
ifstr(i) $(LinkageKey) != $(!KeyNull)
GetRegValue $(LinkageKey) "Bind" BindList
ifstr(i) $(BindList) == ""
read-syms AtalkString3$(!STF_LANGUAGE)
Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(ErrorString)
goto endconfigui
endif
else
Set RegistryErrorIndex = $($R0)
goto fatalregistry
EndIf
LoadLibrary "x" $(!STF_CWDDIR)sfmatcfg.dll ATHANDLE
Set FLibraryErrCtl = 1
Set atcfgresult = ""
LibraryProcedure atcfgresult, $(ATHANDLE),EnterAtalkConfigDLL $(!STF_HWND)
FreeLibrary $(ATHANDLE)
endconfigui = +
Set CommonStatus = STATUS_USERCANCEL
goto usercancel
RemoveAdmin = +
; Remove the SMAddons String in regnet.ini. This is done first, because
; we remove the util dll in "SfmRemoveFiles". If RemoveFiles failed,
; the SMAddons section will be restored to it's former shape.
Debug-Output "OEMNSVKT.INF: Entering Remove"
Ifstr(i) $(!NTN_InstallMode) == deinstall
LoadLibrary "x" $(!STF_CWDDIR)sfmutil.dll !UTILHANDLE
EndIf
Ifstr(i) $(Option) == "SFMADM"
Set FLibraryErrCtl = 1
Set IniFile = $(!STF_NTPATH)"\"$(NtNetIniFileName)
Set IniSection = $(SrvMgrIniSection)
Set Result = ""
Set FLibraryErrCtl = 1
LibraryProcedure Result, $(!UTILHANDLE), WriteAfpMgrIniStrings, $(IniSection), NULL, $(IniFile)
Set FLibraryErrCtl = 0
; Remove the file manager addons also
Set IniFile = $(!STF_NTPATH)"\"$(WinFileIniFileName)
Set IniSection = $(WinFileIniSection)
Set FLibraryErrCtl = 1
LibraryProcedure Result, $(!UTILHANDLE), WriteAfpMgrIniStrings, $(IniSection), NULL, $(IniFile)
Set FLibraryErrCtl = 0
EndIf
Shell "" RemoveAdminFiles "REMOVE"
ForListDo $(REMOVE_SOFTWARE)
debug-output "Removing component: "$($)
Shell $(UtilInf), RemoveSoftwareComponent, $(Manufacturer), $($)
EndForListDo
FreeLibrary $(!UTILHANDLE)
; LibraryProcedure Status, $(!LIBHANDLE), DelFile $(!STF_CWDDIR)$(UtilDll)
goto end
UpgradeAdmin = +
ifstr(i) $(!ProductKeyName) == $(!NTN_RegBase)
OpenRegKey $(!REG_H_LOCAL) "" $(!ProductKeyName) $(!ACCESS) 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
FreeLibrary $(!UTILHANDLE)
Ifint $($ShellCode) != $(!SHELL_CODE_OK)
Goto ShellCodeError
EndIf
SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
CloseRegKey $(KeyProduct)
else
Set RegistryErrorIndex = $($R0)
goto fatalregistry
endif
endif
goto end
successful = +
Set Status = STATUS_SUCCESSFUL
goto end
ShellCodeError = +
read-syms ShellingError$(!STF_LANGUAGE)
Shell $(SubInf) SetupMessage $(!STF_LANGUAGE) "FATAL" $(ErrorString)
fatalregistry = +
EndWait
Shell $(UtilInf) RegistryErrorString $(RegistryErrorIndex)
IfInt $(ShellCode) != 0
goto ShellCodeError
Endif
set Error = $($R0)
goto fatal
fatal = +
Ifint $(BillboardVisible) != 0
Shell $(SubInf) PopBillboard
Set BillboardVisible = 0
Endif
read-syms MiscErrorString3$(!STF_LANGUAGE)
Shell $(SubInf) SetupMessage, $(!STF_LANGUAGE), "FATAL",$(ErrorString)$(Error)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
goto failed
failed = +
set CommonStatus = STATUS_FAILED
ifstr(i) $(REMOVE_FLAG) == TRUE
set REMOVE_FLAG = FALSE
goto RemoveAdmin
endif
goto end
usercancel = +
Set CommonStatus = STATUS_USERCANCEL
end = +
Return $(CommonStatus)
;-------------------------------------------------------------
; ROUTINE : Find MediaType
; DESCRIPTION : Gets the media type of the card
; RETURNS : R0: STATUS_SUCCESSFUL | STATUS_FAILED
; : R1: RegistryErrorIndex, if error, else media type
;
;------------------------------------------------------------
[FindMediaType]
Set Status = STATUS_FAILED
Set CardName = $(!NTN_ServiceBase)"\"$($0)"\Parameters"
OpenRegKey $(!REG_H_LOCAL) "" $(CardName) $(!ACCESS) CardKey
Ifstr(i) $(CardKey) == $(!KeyNull)
Set RegistryErrorIndex = $($R0)
Return $(Status) $(RegistryErrorIndex)
EndIf
GetRegValue $(CardKey) "MediaType" MediaTypeList
Set MediaType = *($(MediaTypeList),4)
Set Status = STATUS_SUCCESSFUL
Return $(Status) $(MediaType)
;-------------------------------------------------------------
; ROUTINE : CreateAtalkConfig
; DESCRIPTION : Creates the registry entries for AppleTalk
; RETURNS : R0: STATUS_SUCCESSFUL | STATUS_FAILED
; : R1: RegistryErrorIndex
;
;------------------------------------------------------------
[CreateAtalkConfig]
Set AdapterName = $($0)
Set KeyAdapters = $($1)
Set RetStatus = STATUS_SUCCESSFUL
read-syms GeneralConstants
CreateRegKey $(KeyAdapters) {$(AdapterName), 0, GenericClass} "" $(!ACCESS) "", TempKeyAdapters
Shell "" FindMediaType $($0)
Ifstr(i) $($R0) == STATUS_SUCCESSFUL
Set MediaType = $($R1)
else
Set RegistryErrorIndex = $($R1)
Set RetStatus = $($R0)
goto return
EndIf
set PortName = $($0)"@"$(!STF_COMPUTERNAME)
set ZoneList = {""}
set AarpRetries = 10
set DefaultZone = ""
set NewValueList = +
{{"AarpRetries",0,$(!REG_VT_DWORD),$(AarpRetries)}, +
{"DefaultZone", 0,$(!REG_VT_SZ),$(DefaultZone)},+
{"NetworkRangeUpperEnd",0,$(!REG_VT_DWORD),0 },+
{"NetworkRangeLowerEnd",0,$(!REG_VT_DWORD),0 },+
{"ZoneList",0,$(!REG_VT_MULTI_SZ),$(ZoneList)},+
{"SeedingNetwork", 0,$(!REG_VT_DWORD),0},+
{"DdpCheckSums", 0,$(!REG_VT_DWORD),0},+
{"PortName",0,$(!REG_VT_SZ),$(PortName)}}
Shell $(UtilInf),AddValueList, $(TempKeyAdapters), $(NewValueList)
set RegistryErrorIndex = $($R0)
Ifstr $(RegistryErrorIndex) != NO_ERROR
CloseRegKey $(TmpKeyAdapters)
Set RetStatus = STATUS_FAILED
EndIf
return = +
Return $(RetStatus) $(RegistryErrorIndex)
[RemoveAdminFiles]
Set Status = STATUS_SUCCESSFUL
Set RemoveList = {}
Set Mode = $($0)
ifstr(i) $(Option) == "SFMADM"
Set RemoveList = >($(RemoveList), #(Files-RemoveList, AFPSVCAPI, 1))
Set RemoveList = >($(RemoveList), #(Files-RemoveList, AFPSVCMGR, 1))
Set RemoveList = >($(RemoveList), #(Files-RemoveList, SFMHELP, 1))
EndIf
ifstr(i) $(Option) == "ATALK"
Set RemoveList = >($(RemoveList), #(Files-RemoveList, ATCONFIG, 1))
Set RemoveList = >($(RemoveList), #(Files-RemoveList, ATMSG, 1))
Set RemoveList = >($(RemoveList), #(Files-RemoveList, ATWSOCK, 1))
Set RemoveList = >($(RemoveList), #(Files-RemoveList, ATDRIVER, 1))
EndIf
ForListDo $(RemoveList)
Set DelStatus = ""
Debug-Output "Deleting File "$($)
Set FLibraryErrCtl = 1
Ifstr(i) $(Mode) == "REMOVE"
LibraryProcedure DelStatus $(!UTILHANDLE), DelFile $($)
ifstr(i) $(DelStatus) == "FAILED"
Set DelOnRebootList = >($(DelOnRebootList), $($))
EndIf
else
LibraryProcedure DelStatus $(!LIBHANDLE), DelFile $($)
EndIf
Set FLibraryErrCtl = 0
EndForListDo
ForListDo $(DelOnRebootList)
Ifstr(i) $(Mode) == "REMOVE"
Debug-Output "File to remove on reboot = "$($)
AddFileToDeleteList $($)
else
Set FLibraryErrCtl = 1
LibraryProcedure DelStatus $(!LIBHANDLE), DelFile $($)
Set FLibraryErrCtl = 0
EndIf
EndForListDo
Return $(Status)
[Install-Update]
set STF_VITAL = ""
CopyFilesInCopyList
Exit
[Install-Initial]
set STF_VITAL = ""
AddSectionFilesToCopyList Files-MISC $(SrcDir) $(!STF_WINDOWSSYSPATH)
Ifstr(i) $(Option) == "ATALK"
AddSectionFilesToCopyList Files-ATALK $(SrcDir) $(!STF_WINDOWSSYSPATH)
AddSectionFilesToCopyList Files-ATALKDRIVER $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
EndIf
Ifstr(i) $(Option) == "SFMADM"
AddSectionFilesToCopyList Files-ADMTOOLS $(SrcDir) $(!STF_WINDOWSSYSPATH)
EndIf
CopyFilesInCopyList
Exit
[Files-RemoveList]
AFPSVCAPI = $(!STF_WINDOWSSYSPATH)\sfmapi.dll
AFPSVCMGR = $(!STF_WINDOWSSYSPATH)\sfmmgr.dll
SFMHELP = $(!STF_WINDOWSSYSPATH)\sfmmgr.hlp
ATCONFIG = $(!STF_WINDOWSSYSPATH)\sfmatcfg.dll
ATMSG = $(!STF_WINDOWSSYSPATH)\sfmatmsg.dll
ATWSOCK = $(!STF_WINDOWSSYSPATH)\sfmwhsat.dll
ATDRIVER = $(!STF_WINDOWSSYSPATH)\drivers\sfmatalk.sys
[LanguagesSupported]
ENG
[OptionsTextENG]
SFMADMTOOLS = "Services for Macintosh Administrator Tools"
ATALK = "AppleTalk Protocol"
[FileConstantsENG]
ProductSFMADMTitle = "Services for Macintosh Administrator Tools"
ProductSFMADMDescription = "Services for Macintosh Administrator Tools"
ProductATALKTitle = "AppleTalk Protocol"
ProductSFMADMName = "SFMADM"
FunctionTitle = "Services for Macintosh Resource Kit Setup"
ProductATALKDescription = "AppleTalk Protocol"
; AppleTalk Transport Product Descriptions /Net Rules
ProductATALKName = "AppleTalk"
ProductATALKImagePath = "%SystemRoot%\system32\drivers\sfmatalk.sys"
ProductATALKSvcType = "kernel"
ProductATALKType = "transport"
ProductATALKEventDll = "%SystemRoot%\system32\sfmatmsg.dll"
NetRuleATALKType = "appletalk appletalktransport"
NetRuleATALKUse = transport " yes yes"
NetRuleATALKBindForm = """appletalk"" yes yes container"
NetRuleATALKClass = {"appletalktransport basic "}
NetRuleATALKBindList = {"appletalktransport ndisDriver non non 100", +
"appletalktransport ltkndisDriver non exclusive 100" }
ProCaption = $(FunctionTitle)
ProCancel = "Cancel"
ProCancelMsg = "Services for Macintosh Resource Kit is not correctly installed. "+
"Are you sure you want to cancel copying files ?"
ProCancelCap = "Services for Macintosh Resource Kit Setup"
ProText1 = "Copying:"
ProText2 = "To:"
Error = "User has cancelled copying files. Copied files will be removed."
MajorVersion = "MajorVersion"
MinorVersion = "MinorVersion"
Version = "Version "
OF = " of "
AskLocationText = "Please enter the full path of the Services for "+
"Macintosh distribution files. If you want to install "+
"files from the original Setup floppy disks, type a drive "+
"letter (such as A:) and Setup will prompt you for the correct "+
"disk. Then choose continue."
[DialogConstantsENG]
Help = "&Help"
Exit = "Cancel"
OK = "OK"
HelpContext = ""
Continue = "Continue"
Cancel = "Cancel"
[ExitWarningDlgENG]
STF_MB_TITLE = "Services for Macintosh Resource Kit Setup"
STF_MB_TEXT = "Services for Macintosh Resource Kit is not correctly installed. Are you "+
"sure you want to exit Setup?"
;no translation needed after this
DlgType = "MessageBox"
STF_MB_TYPE = 3
STF_MB_ICON = 5
STF_MB_DEF = 2
;------------------------------------------------------------------
; Error Strings
;------------------------------------------------------------------
;------------------------------------------------------------------
; Miscellaneous Errors
;------------------------------------------------------------------
[MiscErrorString1ENG]
ErrorString = +
" is already installed on your system. "+
"Use [Update] to update to newer versions."
[SfmAlreadyInstalledENG]
ErrorString = +
" of Services for Macintosh is already installed on your system. "+
"You have to remove Services for Macintosh before installing the "+
"Reource Kit."
[MiscErrorString3ENG]
ErrorString = +
"Setup encountered the following error during installation. Try installing "+
"after rebooting your system. "$(LF)
[ShellingErrorENG]
ErrorString = +
"An internal error occurred. Contact Technical Support."
[CannotStartAtalkENG]
ErrorSuffix = +
"Setup was unable to start the AppleTalk Protocol. You will be unable to choose "+
"a desired zone at this time."
[CannotStartAfdENG]
ErrorSuffix = +
"Setup was unable to start the AFD Driver. You will be unable to choose "+
"a desired zone at this time."
[StatusStartingAppleTalkENG]
Status = "Starting AppleTalk Protocol..."
;------------------------------------------------------------------
; AppleTalk Transport Error Strings
;------------------------------------------------------------------
[AtalkString1ENG]
ErrorString = +
"Setup cannot add Windows sockets support for the AppleTalk protocol. "+
"Windows sockets applications will be unable to use the AppleTalk Protocol. "+
"Remove Services for Macintosh after installation and re-install. If the problem "+
"persists, contact Microsoft support."
[AtalkString2ENG]
ErrorString = +
"Setup cannot remove Windows Sockets support for the AppleTalk protocol."
[AtalkString3ENG]
ErrorString = +
"Services for Macintosh has just been installed. Services will be "+
"available to Macintosh workstations in the default network. If you would like "+
"the services to appear in a different zone or to configure routing, close "+
"the Control Panel, reboot, start AppleTalk and use the Control Panel "+
"to configure Services for Macintosh."
[AFPString2ENG]
ErrorString = +
"Setup cannot add the Macintosh File Server to the File Manager. "+
"You will be unable to work with Macintosh accessible volumes from "+
"File Manager."
[AFPString3ENG]
ErrorString = +
"Setup cannot add the Macintosh File Server to the Server Manager. "+
"You will be unable to work with Services for Macintosh servers from "+
"Server Manager."
[NoAdaptersFoundENG]
ErrorString = +
"Setup cannot find any network adapter for the AppleTalk Protocol. You will "+
"be unable to use AppleTalk Protocol. Try adding a network adapter or "+
"enable the bindings for AppleTalk Protocol."
[RemoveDefaultPortENG]
ErrorString = +
"Setup has detected that the default network adapter used by AppleTalk "+
"Protocol has been removed. Setup will change the default network, if "+
"one is available."
[CantConfigureADMENG]
ErrorString = +
"You cannot configure this software component."
[SetupSuccessENG]
Status = +
"AppleTalk Protocol installation is complete. "+
"AppleTalk will start automatically when you reboot."
[Files-Inf]
2, oemsetup.inf, SIZE=1000, RENAME=$(!UG_Filename)
[Files-ATALK]
2,SFMATCFG.DLL , SIZE=88888
2,SFMATMSG.DLL , SIZE=88888
2,SFMWSHAT.DLL , SIZE=88888
[Files-ATALKDRIVER]
2,SFMATALK.SYS , SIZE=88888
[Files-MISC]
2,SFMUTIL.DLL , SIZE=88888
[Files-ADMTOOLS]
2,SFMAPI.DLL , SIZE=88888
2,SFMMGR.HLP , SIZE=88888
2,SFMMGR.CPL , SIZE=88888 RENAME=sfmmgr.dll
;***********************************************************************
; SOURCE MEDIA DESCRIPTION
; ------------------------
;***********************************************************************
[Source Media Descriptions]
1= "Windows NT Resource Kit CD-ROM" , TAGFILE = disk1
2 = "Windows NT Resource Kit CD-ROM" , TAGFILE = disk2
3= "Windows NT Resource Kit CD-ROM" , TAGFILE = disk3
[ProductType]
STF_PRODUCT = WinNT
STF_PLATFORM = Alpha