oemsetup.inf Driver File Contents (pdisdn.zip)

;//***********************************************************************
;// !!!!!!!!!!!!!! Dont change the next 15 lines !!!!!!!!!!!!! 
;// ISDN for NT
;//
;// Acotec ISDN RasCapi software setup
;//
;//	Copyright (C) Acotec GmbH, Berlin 2kY
;//
;//   Version 3.3 for Windows NT 3.51 or higher
;//
;//***********************************************************************

[Version]
;	3.3	 Old Version
	3.4	; 9.8.1999	

[PrintParms]
	FALSE
;	TRUE

[Source Media Descriptions]
	1 = "Acotec WAN Miniport for CAPI driver diskette" ;, TAGFILE = RasDisk1.TAG

[Identification]
    OptionType = NetAdapter

[PlatformsSupported]
  ANY

[LanguagesSupported]
	ENG
	GER

[PreferredLanguage]
	Language = GER

[Options]
	AcoRas		0

[OptionsTextGER]
	AcoRas		= "Acotec WAN Miniport for CAPI Treiber"

[OptionsTextENG]
	AcoRas		= "Acotec WAN Miniport for CAPI driver"

[FileConstantsGER]
	SoftwareDescription	= *(^(OptionsTextGER, 1),1)
	SoftwareTitle		= $(SoftwareDescription)
	FunctionTitle		= $(SoftwareTitle)"einrichtung"
	ShellCodeErrorTitle	= "Fehler: "$(FunctionTitle)
	ShellCodeErrorText	= "Shell-Codefehler"
	HardwareTitle    	= $(SoftwareTitle)
	HardwareDescription	= $(SoftwareDescription)

   ProCaption   = $(SoftwareTitle)" Setup"
    ProCancel    = "Abbrechen"
    ProCancelMsg = "Sind Sie sicher, daß Sie das Kopieren der Dateien abbrechen möchten? "+
	 "Wenn Sie jetzt abbrechen, wurde der "$(SoftwareTitle)" unvollständig installiert. "+
	 "Bereits installierte Komponenten werden wieder entfernt."
   ProCancelCap = "Meldung zum "$(SoftwareDescription)" Setup"
    ProText1     = "Kopiert:"
    ProText2     = "Nach:"

[FileConstantsENG]

	SoftwareDescription	= *(^(OptionsTextENG, 1),1)
	SoftwareTitle		= $(SoftwareDescription)
	FunctionTitle		= $(SoftwareTitle)" Setup"
	ShellCodeErrorTitle	= "Error: "$(FunctionTitle)
	ShellCodeErrorText	= "Shell-Code Error"
	HardwareTitle    	= $(SoftwareTitle)
	HardwareDescription	= $(SoftwareDescription)

    ProCaption   = $(SoftwareTitle)" setup"
    ProCancel    = "Cancel"
    ProCancelMsg = "Are you sure cancel do copying files? "+
				   "If you do this than installed software components will remove."
    ProCancelCap = "Message "$(SoftwareDescription)" setup"
    ProText1     = "copied:"
    ProText2     = "to:"

[GeneralConstants]

;// File Names

	UtilInf	= "UTILITY.INF"
	ParmInf	= "NCPARAM.INF"
	SubrInf	= "SUBROUTN.INF"
	LocalName = "ACO-MP: "

;// Registry access

	MAXPERM			= 33554432
	KeyNull         = ""
	NoTitle			= 0

;// Product Info

	Product			= "AcoRas"
	Manufacturer	= "acotec"
	Logo			= $(Product)" software (c) "$(Manufacturer)

;// Setup.dll file; Data files

	ProductDirectory = "acotec"
	ProductPath		 = $(!STF_WINDOWSSYSPATH)"\"$(ProductDirectory)
	SetupDLL		 = "RasSuDLL.DLL"
	SetupPath 		 = $(ProductPath)"\"$(SetupDLL)
	InCallFileName   = $(ProductPath)"\caller.dat"

;// Software

	SoftwareName			= $(Product)
	SoftwareType			= "driver"
	SoftwareServiceName		= $(SoftwareName)
	SoftwareServiceGroup	= "NDIS"
	SoftwareImagePath		= "\SystemRoot\system32\drivers\"$(Product)".sys"
	SoftwareBase			= $(!NTN_SoftwareBase)"\"$(Manufacturer)
	SoftwareKeyName			= $(SoftwareBase)"\"$(Product)"\CurrentVersion"
	NetRuleSoftwareType     = $(Product)"Sys RasCapiDriver"
	NetRuleSoftwareUse      = $(SoftwareType)
	NetRuleSoftwareBindForm = """"$(Product)"Driver"" yes no container"
	NetRuleSoftwareClass    = {"RasCapiDriver basic"}
	NetRuleSoftwareBindable = {"RasCapiDriver RasCapiAdapter non exclusive 100"}

;// Hardware

	HardwareName    		= $(Product)
	NetRuleHardwareType     = $(Product)" RasCapiAdapter"
	NetRuleHardwareBindForm = " yes yes container"
	NetRuleHardwareClass    = {$(Product)"Adapter basic"}

;// Service

	CurrentControlSet		= "SYSTEM\CurrentControlSet"
	ServiceBase				= $(CurrentControlSet)"\Services"
	ServicePath				= $(ServiceBase)"\"$(SoftwareServiceName)
	ServiceParameters		= $(ServicePath)"\Parameters"
	OldServiceParameters	= $(ServiceBase)"\RasCapi\Parameters"
	ControlBase				= $(CurrentControlSet)"\Control"
	ServiceGroupOrder		= $(ControlBase)"\ServiceGroupOrder"
	TapiDevicesPath			= "HARDWARE\DEVICEMAP\TAPI DEVICES"
	CapiDevicesPath			= "SOFTWARE\CAPI20"
	WinNTSystem32Path		= $(!STF_WINDOWSSYSPATH)"\drivers"

;// Traceservice
	TrcServiceName			= "AcoRasTraceSV"
	TrcServiceTitle			= "acotec RasCapi Trace Service"
	TrcServicePath			= $(ServiceBase)"\"$(TrcServiceName)
	TrcServiceParmPath		= $(TrcServicePath)"\Parameters"
	TrcServiceImagePath		= "%SystemRoot%\system32\"$(ProductDirectory)"\RasTrcSv.EXE"
	TrcServiceStartTypeMan	= "service"
	TrcServiceStartTypeAuto	= "serviceauto"
	TrcServiceGroup			= "Network"

;// Setup pathes
	AcoSetupIconsPath		= $(ProductPath)"\AcoIcons.inf"
	SetupRegKeyName			= $(SoftwareBase)"\AcoSetup"
	TRCServiceInfName		= $(ProductPath)"\AcoMprTrc.inf"
	Reg_NetworkCard			= $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards"
	Reg_CAPI				= $(!NTN_SoftwareBase)"\CAPI20"

[date]
;// Now is a list which contains:
;//	Sec from 1-1-1970, Year, Month, Day, Hour, Minute, Second
	Now = {} ? $(!LIBHANDLE) GetSystemDate

[Identify]

    read-syms Identification

    set Identifier = $(OptionType)
    set Media      = #("Source Media Descriptions", 1, 1)

	ifstr(i) *(^(PrintParms, 1), 1) == TRUE
		set parms = "Identify: Id="$(Identifier)" Media="$(Media)
		Shell "SUBROUTN.INF" SetupMessage,$(!STF_LANGUAGE),"STATUS",$(parms)
	endif

    return STATUS_SUCCESSFUL $(Identifier) $(Media)

[ReturnOptions]

	Shell "" GetLanguage
	set Language = $($R0)

	set OptionList     = ^(Options, 1)
	set OptionTextList = ^(OptionsText$(!Language), 1)

	ifstr(i) *(^(PrintParms, 1), 1) == TRUE
		set parms = "ReturnOptions: Lang="$($0)" Platform="$($1)""$(!LF)+
					$(OptionList)$(!LF)$(OptionTextList)
		Shell "SUBROUTN.INF" SetupMessage,$(!STF_LANGUAGE),"STATUS",$(parms)
	endif

	return STATUS_SUCCESSFUL $(OptionList) $(OptionTextList)

[InstallOption]

;// append a "\ " to SrcDir if necessary (nice bug, depends on user input)
    set !DebugOutputControl = 1
	
	Shell "" SetCorrectlySrcPath $($2)
	set SrcDir = $($R0)

	Shell "" GetLanguage	
	Shell "" DetectProductType

	set-subst !LF = \n
	set !Product = "AcoRas"
	set !SetupHandle = ""
	read-syms GeneralConstants

	Debug-Output $(LocalName)"Start InstallOption: "$(SrcDir)";"$(!Language)";"$(!STF_PRODUCT)
;// caseswitch for install modes
	set-title "Acotec WAN Miniport for CAPI Setup"

    ifstr(i) 		$(!NTN_InstallMode) == deinstall
		Shell "" 	RemoveRequest
    else-ifstr(i) 	$(!NTN_InstallMode) == update
		Shell "" 	UpdateRequest $(SrcDir)  
    else-ifstr(i) 	$(!NTN_InstallMode) == bind
        Shell ""	BindRequest
	else-ifstr(i) 	$(!NTN_InstallMode) == configure 
		Shell ""	ConfigureRequest
	else-ifstr(i)	$(!NTN_InstallMode) == install
		Shell "" 	InstallRequest $(SrcDir)
	endif

	return $($R0)

[RemoveRequest]

	Shell "" GetLanguage
	read-syms GeneralConstants
	read-syms FileConstants$(!Language)

;// set the libraryhandle
	LoadLibrary "" $(SetupPath) !SetupHandle

	set !ExitCondition = "REBOOT"
	set !MakeBindings = YES

;// for a Realibility maybe remove old software

	OpenRegKey $(!REG_H_LOCAL) "" $(OldServiceParameters)"\" $(MAXPERM) Key
	ifstr $(Key) != $(KeyNull)
		GetRegValue $(Key) "AdapterNumber" Value
		set AdapterNumber = *($(Value),4)		
		CloseRegKey $(Key) 
	endif

	Set AdapterRegBase = $(Reg_NetworkCard)"\"$(AdapterNumber)

	Debug-Output $(LocalName)"Try to remove an old installation ("$(Manufacturer)",RasCapi,"$(AdapterRegBase)

	Shell "UTILITY.INF", RemoveHardwareComponent $(Manufacturer) "RasCapi" $(AdapterRegBase)
	Debug-Output $(LocalName)"RemoveHardwareComponent returned "$($R0)	

	Shell "UTILITY.INF", RemoveSoftwareComponent $(Manufacturer) "RasCapi" FALSE
	Debug-Output $(LocalName)"RemoveSoftwareComponent returned "$($R0)	

;// Remove a new Installation
	OpenRegKey $(!REG_H_LOCAL) "" $(ServiceParameters)"\" $(MAXPERM) Key
	ifstr $(Key) != $(KeyNull)
		GetRegValue $(Key) "AdapterNumber" Value
		set AdapterNumber = *($(Value),4)		
		CloseRegKey $(Key) 
	endif

	Set AdapterRegBase = $(Reg_NetworkCard)"\"$(AdapterNumber)
	Debug-Output $(LocalName)"Try to remove a new installation ("$(Manufacturer)","$(Product)","$(AdapterRegBase)

	Shell "UTILITY.INF", RemoveHardwareComponent $(Manufacturer) $(Product) $(AdapterRegBase)
	Debug-Output $(LocalName)"RemoveHardwareComponent returned "$($R0)	

	Shell "UTILITY.INF", RemoveSoftwareComponent $(Manufacturer) $(Product) FALSE
	Debug-Output $(LocalName)"RemoveSoftwareComponent returned "$($R0)	
	
;// Remove old Traceservices
	Debug-Output $(LocalName)"Try to remove the old trace tools"
	Shell "UTILITY.INF" RemoveService $(TrcServiceName) YES

	Debug-Output $(LocalName)"Try to remove the new trace tools"
	Shell $(TRCServiceInfName) AcoMprTraceRemoveRequest

	Debug-Output $(LocalName)"Remove the Icons"
	Shell $(AcoSetupIconsPath) "RemoveRasIcons" 

	Sleep 1000
	LibraryProcedure Result $(!SetupHandle) AcoRasSortFolderIcons $(HWND)
	Sleep 1000
	Shell "" CheckRemovingCommonIcons

	Debug-Output $(LocalName)"CALL RemoveFiles"
	Shell "" RemoveFiles

	Debug-Output $(LocalName)"CALL RasCleanUp"
	LibraryProcedure Result $(!SetupHandle) AcoRasCleanUp $(HWND)

	ifstr(i) $($R0) == "GER"
		set parms = "Die Deinstallation des "$(SoftwareDescription)+
					" ist erfolgreich beendet."
	else
		set parms = "The removing from the "$(SoftwareDescription)+
					" has been finished succesfully."
	endif

	ifstr(i) $(!ExeCalled) == TRUE
		set !EndText = $(parms)
	else
		Shell "SUBROUTN.INF" SetupMessage,$(!STF_LANGUAGE),"STATUS",$(parms)
	endif

	return STATUS_SUCCESSFUL

[UpdateRequest]

	Shell "" GetLanguage
	read-syms GeneralConstants
	read-syms FileConstants$(!Language)

	set SrcDir = $($0) 
	LoadLibrary "" $(SrcDir)$(SetupDLL) !SetupHandle
	LibraryProcedure Result $(!SetupHandle) SetSrcDir $(!STF_HWND) $(SrcDir)
	LibraryProcedure Result $(!SetupHandle) AcoRasStopProcesses $(!STF_HWND) 

;// Check old Version of RasCapi
	OpenRegKey $(!REG_H_LOCAL) "" $(OldServiceParameters) $(MAXPERM) Key

	ifstr $(Key) != $(KeyNull)
		ifstr(i) Language == "GER"
			set parms = "Der "$(SoftwareDescription)" kann nicht direkt aktualisiert werden. "+
					    "Die auf Ihren Computer installierte Version wird entfernt."
						"Booten Sie Ihren Computer. Installieren sie dann die neue Version des acotec RasCapi Treibers."
		else
			set parms = "The "$(SoftwareDescription)" can't update directly. The setup will remove the old version. "+
						"If You have restarted the computer than install the new version of "$(SoftwareDescription)"."
		endif
		
		Shell "SUBROUTN.INF" SetupMessage,$(!STF_LANGUAGE),"ERROR",$(parms)
		LibraryProcedure Result $(!SetupHandle) AcoRasCleanUp $(HWND)

		return STATUS_OK
	endif

	set !ExitCondition = "REBOOT"

	;// get the old inffilename for the new oemsetup.inf
	Shell "" GetInfFileName
	set !UG_FILENAME = $($R0)

;// remove old trace services
	Shell "UTILITY.INF" RemoveService $(TrcServiceName) YES

;// install new services
	Shell $(SrcDir)"AcoMprTrc.INF" AcoMprTraceInstallRequest $(SrcDir) $(Product) NO
	
;// Copy files here also from traceservice!

	install "install-install"
    ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
		LibraryProcedure Result $(!SetupHandle) AcoRasCleanUp $(HWND)
		return STATUS_SUCCESSFUL
    endif

	Shell "" SetOEMCapture

	LibraryProcedure Result $(!SetupHandle) AcoRasSetSerialNumber $(HWND)

	set Name = $(SrcDir)"IconInst.TAG"
   	LibraryProcedure FilePresent, $(!LIBHANDLE), CheckFileExistance, $(Name)
	ifstr(i) $(FilePresent) == "YES"
		Shell $(SrcDir)"ACOICONS.INF" RemoveRASIcons
		Sleep 500
		Sleep 500
		Sleep 500
		Shell $(SrcDir)"ACOICONS.INF" InstallRASIcons
		Sleep 1000
		LibraryProcedure Result $(!SetupHandle) AcoRasSortFolderIcons $(HWND)
	endif

	LibraryProcedure Result $(!SetupHandle) AcoRasProvideRegistry $(HWND)

	Shell "" MayDisableMiniport

	return STATUS_SUCCESSFUL

[BindRequest]

	return STATUS_FAILED

[ConfigureRequest]

	Shell "" GetLanguage
	read-syms 	GeneralConstants
	read-syms FileConstants$(!Language)
	set changecount = 0

;// set the libraryhandle
	LoadLibrary "" $(SetupPath) !SetupHandle

    OpenRegKey $(!REG_H_LOCAL) "" $(ServiceParameters) $(MAXPERM) Key

    ifstr(i) $(Key) != $(KeyNull)
        GetRegValue $(Key) "CountOfLines" Lines
		set OldLines = *($(Lines),4)
		CloseRegKey $(Key) 
	endif	

	LibraryProcedure Result $(!SetupHandle) AcoWANMiniportConfiguration $(!STF_HWND) "CALL_FROM_INF"

    OpenRegKey $(!REG_H_LOCAL) "" $(ServiceParameters) $(MAXPERM) Key

    ifstr(i) $(Key) != $(KeyNull)
        GetRegValue $(Key) "CountOfLines" Lines
		set NewLines = *($(Lines),4)
		CloseRegKey $(Key) 
	endif	

	Shell "" MayDisableMiniport

	return $(Result)

;// ****************************************************************************
;// Installmode :	Install
;// Input		  : $($0) 	Sourcedirectory

[InstallRequest]

	StartWait
	set SrcDir = $($0)

	Shell "" GetLanguage
	read-syms 	GeneralConstants
	read-syms FileConstants$(!Language)

	LoadLibrary "" $(SrcDir)$(SetupDLL) !SetupHandle
	LibraryProcedure Result $(!SetupHandle) SetSrcDir $(!STF_HWND) $(SrcDir)

;// Check the tagfile for a correctly install directory 
	Shell "" CheckCorrectlyInstallDir $(SrcDir)
	ifstr(i) $($R0) == "ERROR"
		return STATUS_USERCANCEL
	endif

	Shell "" CheckCAPIInstalled
	ifstr(i) $($R0) != STATUS_SUCCESSFUL
		ifstr(i) $(!Language) == "GER"
			set param = "Sie haben keine ISDN-Karte mit einem CAPI 2.0 Treiber installiert."$(!LF)+
						"Für eine erfolgreiche Installation des "$(SoftwareDescription)" müssen Sie vorher eine ISDN-Karte mit einer CAPI 2.0 Schnittstelle installieren."
		else 
			set param = "You have not installed any ISDN-Card with a CAPI 2.0 interface."$(!LF)+
						"You must install an ISDN-Card before you can install the "$(SoftwareDescription)"."
		endif 
		Shell "SUBROUTN.INF" SetupMessage,$(!STF_LANGUAGE),"FATAL",$(param)
						
		return STATUS_USERCANCEL
	endif
	
	Shell "" SetOEMCapture

	Debug-Output $(LocalName)"InstallRequest: Call AcoRasConfigureSerialNumber"
	LibraryProcedure Result $(!SetupHandle) AcoRasConfigureSerialNumber $(!STF_HWND) $(SrcDir)
	ifstr(i) $(Result) != STATUS_SUCCESSFUL
		return $(Result)
	endif

	set !ExitCondition = "REBOOT"
	set !MakeBindings = YES

;// Install various components

	set errorcount = 0
	set errorlist  = {}

;// Install the RasCapiSoftware 
;// Return KeyServiceParameters in $($R0)

	Debug-Output $(LocalName)"InstallRequest: InstallRasSoftware"
	Shell "" InstallRasSoftware
	ifstr(i) $($R0) == "ERROR" 
		set-add  errorcount = $(errorcount) , 1
		set errorlist = >($(errorlist), $($R1))
	endif 

	set KeyServiceParameter = $($R0)

;// Install the RasCapiHardware
	Debug-Output $(LocalName)"InstallRequest: RasCapiHardware"
	Shell "" InstallRasHardware $(KeyServiceParameter)
	ifstr(i) $($R0) == "ERROR" 
		set-add  errorcount = $(errorcount) , 2
		set errorlist = >($(errorlist), $($R1))
	endif 

	Debug-Output $(LocalName)"InstallRequest: AcoMprTraceInstallRequest"
	Shell $(SrcDir)"AcoMprTrc.INF" AcoMprTraceInstallRequest $(SrcDir) $(Product) NO
	ifstr(i) $($R0) == "ERROR" 
		set-add  errorcount = $(errorcount) , 4
		set errorlist = >($(errorlist), $($R1))
	endif 

;//if errorcheck ok finished the Registry Installation else break the installation
	ifint $(errorcount) != 0 
		set list = ""
		ForListDo $(errorlist)
			set list = $(list)$(!LF)$($)
		EndForListDo
		ifstr(i) *(^(PrintParms, 1), 1) == TRUE
			Shell "SUBROUTN.INF" SetupMessage,$(!STF_LANGUAGE),"Fatal","Registry installation error with ("+
									$(errorcount)" errors)"$(!LF)$(list)
		endif
		ifstr(i) $(!Language) == "GER"
			set parms = "Bei der Installation der Registryeinträge für den "+
						 $(SoftwareDescription)+
						" ist ein Fehler aufgetreten.(Nr: "$(errorcount)") Starten Sie Ihren Computer neu "+
						"und führen Sie nochmals die Installation des MPR aus."
		else 
			set parms = "During registry installation of "+
						 $(SoftwareDescription)" has occured an error. (Nb. "$(errorcount)") You must restart the computer and start again the setup program."
		endif
		Shell "SUBROUTN.INF" SetupMessage,$(!STF_LANGUAGE),"Fatal",$(parms)
		LibraryProcedure Result $(!SetupHandle) AcoRasCleanUp $(HWND)
		return STATUS_FAILED
	endif
	
	EndWait

;//copy the files
	install "Install-Install"

    ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
		LibraryProcedure Result $(!SetupHandle) AcoRasCleanUp $(HWND)
		return STATUS_USERCANCEL
    endif

;//configure WAN controller

	LibraryProcedure Result $(!SetupHandle) AcoRasConfigureWanController $(!STF_HWND) $(SrcDir)

	ifstr(i) $(Result) != STATUS_SUCCESSFUL
		LibraryProcedure Result $(!SetupHandle) AcoRasCleanUp $(HWND)
		return STATUS_USERCANCEL
	endif						

	Shell "" MayDisableMiniport
	ifstr(i) $($R0) == STATUS_SUCCESSFUL
		set Name = $(SrcDir)"RasInst.TAG"
	   	LibraryProcedure FilePresent, $(!LIBHANDLE), CheckFileExistance, $(Name)
		ifstr(i) $(FilePresent) == "YES"
			Shell "" InstallNetWork
		endif
	endif	

	set Name = $(SrcDir)"IconInst.TAG"
   	LibraryProcedure FilePresent, $(!LIBHANDLE), CheckFileExistance, $(Name)
	ifstr(i) $(FilePresent) == "YES"
		Shell $(SrcDir)"ACOICONS.INF" RemoveRASIcons
		Sleep 500
		Sleep 500
		Sleep 500
		Shell $(SrcDir)"ACOICONS.INF" InstallRASIcons
		Sleep 1000
		LibraryProcedure Result $(!SetupHandle) AcoRasSortFolderIcons $(HWND)
	endif

	LibraryProcedure Result $(!SetupHandle) AcoRasCheckServicePack $(HWND)
	LibraryProcedure Result $(!SetupHandle) AcoRasProvideRegistry $(HWND)

	return STATUS_SUCCESSFUL

[CheckCAPIInstalled]

	read-syms GeneralConstants

	Debug-Output $(LocalName)"InstallRequest: CheckCAPIInstalled"

    OpenRegKey $(!REG_H_LOCAL) "" $(Reg_CAPI) $(MAXPERM) Key
	ifstr(i) $(Key) == $(KeyNull)
		return STATUS_FAILED
	endif
	
	EnumRegKey $(Key) CAPI
	CloseRegKey $(Key)
	forlistdo $(CAPI)
		set C = *($($),1)
		ifint $(C) >= 1
			ifint $(C) <= 999
				return STATUS_SUCCESSFUL $(CAPI)						
			endif
		endif
	endforlistdo

	return STATUS_FAILED $(CAPI)

[MayDisableMiniport]

	set Status = STATUS_DISABLED
	set Starttype = $(!SERVICE_DEMAND_START)

	read-syms GeneralConstants
    OpenRegKey $(!REG_H_LOCAL) "" $(ServiceParameters) $(MAXPERM) Key

    ifstr(i) $(Key) != $(KeyNull)
        GetRegValue $(Key) "CountOfLines" Lines
        ifint *($(Lines),4) > 0
			set Status = STATUS_SUCCESSFUL
			set Starttype = $(!SERVICE_AUTO_START)
		endif
	endif	

	OpenRegKey $(!REG_H_LOCAL) "" $(ServicePath) $(MAXPERM) WanKey
	ifstr $(WanKey) != $(KeyNull)
		SetRegValue $(WanKey) {"Start",0,4,$(Starttype)}
		CloseRegKey $(WanKey)
	endif
	return $(Status)

[ExploreSrcDir]

	read-syms GeneralConstants
	set SourceDir = $($0)
	OpenRegKey $(!REG_H_LOCAL) "" "SOFTWARE\Microsoft\Windows\CurrentVersion\Setup" $(MAXPERM) Key
	Ifstr $(Key) != $(KeyNull)
		GetRegValue $(Key) "SourcePath" Info
		Debug-Output $(Info)
		ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
			set SourceDir = *($(Info),4)
		endif
		CloseRegKey $(LangKey)
	endif

	loopAsk =+
		Shell "" SetCorrectlySrcPath $(SourceDir)
		set SourceDir = $($R0)
		set Name = $(SourceDir)"RASMAN.EX_"
   		LibraryProcedure FilePresent, $(!LIBHANDLE), CheckFileExistance, $(Name)
		ifstr(i) $(FilePresent) == "YES"
			set !STF_SRCDIR_OVERRIDE = $(SourceDir)
			set !STF_SRCDIR = $(SourceDir)
			return $(SourceDir)
		endif

		ifstr(i) $(SourceDir) != "" 
			set !STFSRCDIR = $(SourceDir)
		endif
		Shell "UTILITY.INF", DoAskSource, $(!STF_CWDDIR), $(SourceDir) YES
		ifstr(i) $($R0) != STATUS_USERCANCEL 
			set SourceDir = $($R1)
			goto loopAsk
		else 
			goto error_end_srcfile
		endif
	endif

error_end_srcfile =+
	
	return "ERROR"

[InstallNetWork]
;// 1. TCPIP
;// 2. Server
;// 3. Workstation
;// 4. Netbios
;// 5. RPC
;// 6. RAS

;// Set Environment
	Shell "" GetLanguage
	Shell "" DetectProductType
	read-syms 	GeneralConstants
	read-syms FileConstants$(!Language)

;// TCPIP BEGIN - I will use the RAS inf file	for this
	set !MAXIMUM_ALLOWED = $(MAXPERM)	;// global var - very side effects !

    shell "oemnsvra.inf" QueryInstalledProtocols
    ifstr(i) $($R0) == STATUS_SUCCESSFUL
        set fNetbeuiInstalled = $($R1)
        set fTcpIpInstalled   = $($R2)
        set fIpxInstalled     = $($R3)
    else
		goto error_end
	endif

	set NTN_InstallMode_Ret = !NTN_InstallMode  
	set !NTN_InstallMode = "install"	

	ifstr(i) $(fTcpIpInstalled) == FALSE
	
		Debug-Output $(Localname)"Install Network: TCPIP not installed"
		Shell "" ExploreSrcDir $(!STF_SRCDIR)
		ifstr(i) $($R0) == "ERROR"
			goto error_end
		endif

		Shell "oemnsvra.inf" InstallProtocol "TCPIP"
		ifint $($ShellCode) != $(!SHELL_CODE_OK)
			goto error_end
		endif
		ifstr(i) $($R0) != STATUS_SUCCESSFUL
			goto error_end
		endif
	else 
		goto Install_Microsoft_Ras
	endif
;// TCPIP END

	set Manufacturer = "Microsoft"
;// Server services	BEGIN
	set ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\LanmanServer\CurrentVersion"

    OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXPERM) KeyProduct
    Ifstr $(KeyProduct) != $(KeyNull)
        CloseRegKey $(KeyProduct)
	else 
		Shell "oemnsvsv.inf" InstallOption ENG "SRV" $(!STF_SRCDIR) "YES" "NO" "NO"
		ifstr(i) $($R0) != STATUS_SUCCESSFUL	
			goto error_end
		endif
	endif
;// Deactivating of srv services by a workstation because must not start this 	
	ifstr(i) $(!STF_PRODUCT) == WINNT
		OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\Srv" $(MAXPERM) Key
		ifstr $(Key) != $(KeyNull)
			SetRegValue $(Key) {"Start",0,4,$(!SERVICE_DEMAND_START)}
			CloseRegKey $(Key)
		endif
	endif
;// Server services	END

;// Workstation services BEGIN
	set ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\LanmanWorkstation\CurrentVersion"

	OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXPERM) KeyProduct
    Ifstr $(KeyProduct) != $(KeyNull)
        CloseRegKey $(KeyProduct)
	else 
		Shell "oemnsvwk.inf" InstallOption ENG "WKSTA" $(!STF_SRCDIR) "YES" "NO" "NO"
		ifstr(i) $($R0) != STATUS_SUCCESSFUL	
			goto error_end
		endif
	;// Deactivating of services by messenger and netlogon because this most installing systems don't need a domain login 	
		OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NetLogon" $(MAXPERM) Key
		ifstr $(Key) != $(KeyNull)
			SetRegValue $(Key) {"Start",0,4,$(!SERVICE_DEMAND_START)}
			CloseRegKey $(Key)
		endif

		OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\Messenger" $(MAXPERM) Key
		ifstr $(Key) != $(KeyNull)
			SetRegValue $(Key) {"Start",0,4,$(!SERVICE_DEMAND_START)}
			CloseRegKey $(Key)
		endif
	endif
;// Workstation services END

;// NetBIOS services BEGIN
	set ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\NetBIOS\CurrentVersion"

	OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXPERM) KeyProduct
    Ifstr $(KeyProduct) != $(KeyNull)
        CloseRegKey $(KeyProduct)
	else 
		Shell "oemnsvnb.inf" InstallOption ENG "NetBios" $(!STF_SRCDIR) "YES" "NO" "NO"
		ifstr(i) $($R0) != STATUS_SUCCESSFUL	
			goto error_end
		endif
	endif

;// NetBIOS services END

;// RPC services BEGIN
	set ProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\RPCLOCATOR"

	OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXPERM) KeyProduct
    Ifstr $(KeyProduct) != $(KeyNull)
        CloseRegKey $(KeyProduct)
	else 
		Shell "oemnsvrp.inf" InstallOption ENG "RPCLOCATE" $(!STF_SRCDIR) "YES" "NO" "NO"
		ifstr(i) $($R0) != STATUS_SUCCESSFUL	
			goto error_end
		endif
	endif

;// RPC services END

Install_Microsoft_Ras =+

;// RAS BEGIN
    Shell "oemnsvra.inf" CheckRasInstalled

   	ifstr(i) $($R0) == TRUE
       	set !NTN_InstallMode = configure
	else
		set !NTN_InstallMode = install
		Shell "" ExploreSrcDir $(!STF_SRCDIR)
		ifstr(i) $($R0) == "ERROR"
			goto error_end
		endif
	endif

	Shell "oemnsvra.inf" InstallOption ENG "RAS" $(!STF_SRCDIR) "NO" "NO" "NO"
	set Status = $($R0)

	ifstr(i) $(!NTN_InstallMode) == "install"
		install InstallNetworkFiles
	    ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
			goto error_end
		endif
	endif

	ifstr(i) $(Status) == STATUS_SUCCESSFUL	
		goto normal_end
	endif

	ifstr(i) $(Status) == STATUS_USERCANCEL
		goto normal_end
	endif
	goto error_end

;// RAS END

normal_end = +
	set !NTN_InstallMode = $(NTN_InstallMode_Ret)
	return STATUS_SUCCESSFUL	;// every successful!

error_end = +
	
	ifstr(i) $(!Language) == "GER"
		set param = "Bei der Microsoft Netzwerkinstallation ist ein Fehler aufgetreten. "$(!LF)+
					"Sie müssen die Netzwerkkomponenten und den Remote Access Services nachträglich installieren."
	else
		set param = "During the Microsoft network installation ocours an error. "$(!LF)+
					"You must reinstall the network and remote access components."
	endif
	Shell "SUBROUTN.INF" SetupMessage,$(!STF_LANGUAGE),"FATAL",$(param)

	set !NTN_InstallMode = $(NTN_InstallMode_Ret)
	return STATUS_SUCCESSFUL	;// in every case successful, because must boot!

[InstallNetworkFiles]

	set !STF_NCPA_FLUSH_COPYLIST = TRUE
	CopyFilesInCopyList

	exit

[CallMicrosoftRAS]

	read-syms GeneralConstants
    Shell "oemnsvra.inf" CheckRasInstalled

   	ifstr(i) $($R0) == TRUE
       	set !NTN_InstallMode = configure
	else
		set !NTN_InstallMode = install
		Shell "" ExploreSrcDir $(!STF_SRCDIR)
		ifstr(i) $($R0) == "ERROR"
			goto error_end
		endif
	endif

	Shell "oemnsvra.inf" InstallOption ENG "RAS" $(!STF_SRCDIR) "NO" "NO" "NO"
	set Status = $($R0)

	ifstr(i) $(!NTN_InstallMode) == "install"
		install InstallNetworkFiles
	endif

	return $(Status)

[InstallRasSoftware]
;// Output $($R0) KeyServiceParameters for Hardwareinstall

	read-syms GeneralConstants
	read-syms 	FileConstants$(!Language)

	ifstr(i) *(^(PrintParms, 1), 1) == TRUE
	set params = "AddSoftwareComponent"$(!LF)+
	"Manufacturer	:"$(Manufacturer)$(!LF)+        
	"Softwarename	:"$(SoftwareName)$(!LF)+        
	"Servicename	:"$(SoftwareServiceName)$(!LF)+
	"Softwaretitle	:"$(SoftwareTitle)$(!LF)+       
	"Inf-filename	:"$(STF_CONTEXTINFNAME)$(!LF)+  
	"SW-Imagepath	:"$(SoftwareImagePath)$(!LF)+   
	"Servicetyp	:kernel"$(!LF)+  
	"Servicegroup	:"$(SoftwareServiceGroup)
	Shell "SUBROUTN.INF" SetupMessage,$(!STF_LANGUAGE),"Status",$(params)
	endif
	
	Shell $(UtilInf), AddSoftwareComponent, +
				$(Manufacturer), +
				$(SoftwareName), +
				$(SoftwareServiceName), +
				$(SoftwareTitle), +
				$(STF_CONTEXTINFNAME), +
				$(SoftwareImagePath), +
				"kernel", +
				$(SoftwareServiceGroup), +
				{}, +
				"", +
				$(NetEventDLL)
				
				ifstr(i) $($R0) != NO_ERROR
				return "ERROR" "Registry error RasSoftware"
				endif
				ifint $($ShellCode) != $(!SHELL_CODE_OK)
				return "ERROR" "SHELL_CODE error RasSoftware"
				endif
				
	set RegistryError		 = $($R0)
	set KeySoftware			 = $($R1)
	set KeySoftwareNetRules	 = $($R2)
	set KeyService			 = $($R3)
	set KeyServiceParameters = $($R4)
	CloseRegKey $($R5)

	detect date
	ifstr(i) *(^(PrintParms, 1), 1) == TRUE
		set params = "AddValues Software"$(!LF)+
					 "SoftwareType	:"$(SoftwareType)$(!LF)+        
					 "Version		:"*(^(Version, 1), 1)$(!LF)+        
					 "Softwaretitle	:"$(SoftwareTitle)$(!LF)+       
					 "Description	:"$(SoftwareDescription)$(!LF)+  
					 "SW-Imagepath	:"$(SoftwareImagePath)$(!LF)+   
					 "Servicename	:"$(SoftwareServiceName)$(!LF)+  
					 "InstallDate	:"*($(Now),1)
		Shell "SUBROUTN.INF" SetupMessage,$(!STF_LANGUAGE),"Status",$(params)
	endif
	
	set NewValueList = {+
		{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
		{Version,$(NoTitle),$(!REG_VT_DWORD),*(^(Version, 1), 1)},+
		{Title,$(NoTitle),$(!REG_VT_SZ),$(SoftwareTitle)},+
		{Description,$(NoTitle),$(!REG_VT_SZ),$(SoftwareDescription)},+
		{ServiceName,$(NoTitle),$(!REG_VT_SZ),$(SoftwareServiceName)},+
		{InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}+
		}

	Shell  $(UtilInf), AddValueList, $(KeySoftware), $(NewValueList)

    ifstr(i) $($R0) != NO_ERROR
		return "ERROR" "Registry error Addvalue RasSoftware"
    endif
    ifint $($ShellCode) != $(!SHELL_CODE_OK)
		return "ERROR" "SHELL_CODE error Addvalue RasSoftware"
    endif

	ifstr(i) *(^(PrintParms, 1), 1) == TRUE
		set params = "AddValues Software Rules"$(!LF)+
					 "Type		:"$(NetRuleSoftwareType)$(!LF)+        
					 "Use		:"$(NetRuleSoftwareUse)$(!LF)+        
					 "bindform	:"$(NetRuleSoftwareBindForm)$(!LF)+       
					 "Class		:"$(NetRuleSoftwareClass)$(!LF)+  
					 "bindable	:"$(NetRuleSoftwareBindable)$(!LF)+   
					 "Infoption	:AcoRas"  
		Shell "SUBROUTN.INF" SetupMessage,$(!STF_LANGUAGE),"Status",$(params)
	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),"AcoRas"}+
		}

	Shell  $(UtilInf), AddValueList, $(KeySoftwareNetRules), $(NewValueList)

    ifstr(i) $($R0) != NO_ERROR
		return "ERROR" "Registry error Addvalue RasSoftware Rules"
    endif
    ifint $($ShellCode) != $(!SHELL_CODE_OK)
		return "ERROR" "SHELL_CODE error Addvalue RasSoftware Rules"
    endif

	return $(KeyServiceParameters) ""
			
[InstallRasHardware]
;// Input  $($0)  KeyServiceParameters from Softwareinstall
	set KeyServiceParameters = $($0)

	read-syms 	GeneralConstants
	read-syms 	FileConstants$(!Language)
    
    Shell $(UtilInf), AddHardwareComponent, $(HardwareName),+
		  $(STF_CONTEXTINFNAME), $(SoftwareKeyName)

    ifstr(i) $($R0) != NO_ERROR
		return "ERROR" "Registry error Addvalue RasHardware"
    endif
    ifint $($ShellCode) != $(!SHELL_CODE_OK)
		return "ERROR" "SHELL_CODE error Addvalue RasHardware"
    endif

    set KeyNetworkCard	= $($R1)
    set KeyAdapterRules = $($R2)
    set KeyParameters	= $($R3)
    set AdapterNumber	= $($R4)

	detect date

	ifstr(i) *(^(PrintParms, 1), 1) == TRUE
		set params = "AddValues Hardware"$(!LF)+
					 "Manufacturer	:"$(Manufacturer)$(!LF)+        
					 "Title		:"$(HardwareTitle)$(!LF)+        
					 "Description	:"$(HardwareDescription)$(!LF)+       
					 "Productname	:"$(HardwareName)$(!LF)+  
					 "Servicename	:"$($R5)   
		Shell "SUBROUTN.INF" SetupMessage,$(!STF_LANGUAGE),"Status",$(params)
	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),$(HardwareName)},+
		{ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
		{InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}+
		}

    Shell  $(UtilInf), AddValueList, $(KeyNetworkCard), $(NewValueList)

    ifstr(i) $($R0) != NO_ERROR
		return "ERROR" "Registry error Addvalue RasHardware"
    endif
    ifint $($ShellCode) != $(!SHELL_CODE_OK)
		return "ERROR" "SHELL_CODE error Addvalue RasHardware"
    endif

    set TempProdName = """"$(HardwareName)$(AdapterNumber)""""
    set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)

	ifstr(i) *(^(PrintParms, 1), 1) == TRUE
		set params = "AddValues Hardware Rules"$(!LF)+
					 "type		:"$(NetRuleHardwareType)$(!LF)+        
					 "bindform	:"$(TempBindForm)$(!LF)+        
					 "class		:"$(NetRuleHardwareClass)$(!LF)+       
					 "InfOption	:AcoRas"   
		Shell "SUBROUTN.INF" SetupMessage,$(!STF_LANGUAGE),"Status",$(params)
	endif

    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),"AcoRas"}+
		}

    Shell  $(UtilInf), AddValueList, $(KeyAdapterRules), $(NewValueList)

    CloseRegKey $(KeyAdapterRules)

    ifstr(i) $($R0) != NO_ERROR
		return "ERROR" "Registry error Addvalue RasHardware Rules"
    endif
    ifint $($ShellCode) != $(!SHELL_CODE_OK)
		return "ERROR" "SHELL_CODE error Addvalue RasHardware Rules"
    endif

	; write the private global configuration parameters

	ifstr(i) *(^(PrintParms, 1), 1) == TRUE
		set params = "AddValues Hardware"$(!LF)+
					 "Reg-Path	:"$(KeyServiceParameters)$(!LF)+
					 "AdapterNumber	:"$(AdapterNumber)$(!LF)+        
					 "MSNEAZ	:"{}$(!LF)+       
					 "Trace		:3"$(!LF)+  
					 "Tracebuffer	:8192"$(!LF)+  
					 "DefaultInbound	:B_HDLC,SYN"$(!LF)+  
					 "DefaultOutbound	:B_HDLC,SYN"$(!LF)+  
					 "Repair		:0" 
		Shell "SUBROUTN.INF" SetupMessage,$(!STF_LANGUAGE),"Status",$(params)
	endif

	set ValueList = { +
		{AdapterNumber,$(NoTitle),$(!REG_VT_DWORD),$(AdapterNumber)},+
		{Controllers,$(NoTitle),$(!REG_VT_MULTI_SZ),{}},+
		{DefaultInbound,$(NoTitle),$(!REG_VT_SZ),"B_HDLC,SYN"},+
		{DefaultOutbound,$(NoTitle),$(!REG_VT_SZ),"B_HDLC,SYN"},+
		{IncallFlag,$(NoTitle),$(!REG_VT_DWORD),0},+
		{IncomingCallerFile,$(NoTitle),$(!REG_VT_SZ),$(InCallFileName)},+
		{LogLevel,$(NoTitle),$(!REG_VT_DWORD),0},+
		{MSNEAZ,$(NoTitle),$(!REG_VT_MULTI_SZ),{}},+
		{TraceLevel,$(NoTitle),$(!REG_VT_DWORD),1},+
	}

	Shell  $(UtilInf), AddValueList, $(KeyServiceParameters), $(ValueList)

    ifstr(i) $($R0) != NO_ERROR
		return "ERROR" "Registry error Addvalue RasHardware Serviceparameter"
    endif
    ifint $($ShellCode) != $(!SHELL_CODE_OK)
		return "ERROR" "SHELL_CODE error Addvalue RasHardware Serviceparameter"
    endif

	; Finally write the adapter specific parameters in the adapter service
	; parameters key (although we are a dummy adapter it seems necessary
	; to set "BusType" and "BusNumber" there).

    Shell $(UtilInf), GetBusTypeNum

    set BusTypeNum = $($R1)
	set BusNumber = 0

    set ValueList = {+
			{BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
			{BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
			}

    Shell  $(UtilInf), AddValueList, $(KeyParameters), $(ValueList)

    ifstr(i) $($R0) != NO_ERROR
		return "ERROR" "Registry error Addvalue RasHardware Bustyp"
    endif
    ifint $($ShellCode) != $(!SHELL_CODE_OK)
		return "ERROR" "SHELL_CODE error Addvalue RasHardware Bustyp"
    endif
			
	return $(AdapterNumber) ""

[CheckCorrectlyInstallDir]
;//	INPUT : in $($0) SourceDirectory

	set SrcDir = $($0)
	Shell "" GetLanguage
	read-syms GeneralConstants
	read-syms FileConstants$(!Language)

	set Name = $(SrcDir)"RasDisk1.TAG"		
  	LibraryProcedure FilePresent, $(!LIBHANDLE), CheckFileExistance, $(Name)
	ifstr(i) $(FilePresent) != "YES"
		ifstr(i) $(!Language) == "GER"
			set parms =  "Für die Installation einer neuen Version des "+
						  $(SoftwareDescription)" werden Informationen aus "+
						  "der Datei oemsetup.inf, die sich in Ihrem Installationsverzeichnis "+
						  "befindet, benötigt. Wechseln Sie vor Start der Installation in dieses Verzeichnis." 			
		else
			set parms =  "You are about install a new version of "$(SoftwareDescription)"."+
						 "The setup need informations from the file oemsetup.inf that is present in the installitons directory. "+
						 "You must change the directory before you can install the software."
		endif
		Shell "SUBROUTN.INF" SetupMessage,$(!STF_LANGUAGE),"STATUS",$(parms)
		LibraryProcedure Status, $(!LIBHANDLE), DelFile, $(STF_CONTEXTINFNAME)
		return "ERROR"
	endif
	return ""

[GetLanguage]

	read-syms GeneralConstants
	set MAXPERM	= 33554432
	set KeyNull = ""
	set !Language = ENG	

	OpenRegKey $(!REG_H_LOCAL) "" $(SetupRegKeyName) $(MAXPERM) Key
	ifstr $(Key) != $(KeyNull)
		set L = {}
		GetRegValue $(Key) "SetupLanguage" L
		CloseRegKey $(Key)
		ifstr(i) $(L) != {}
			set L = *($(L),4)		
			ifstr(i) $(L) == ENG	
				set !Language = ENG	
			endif
			ifstr(i) $(L) == ENGLISH	
				set !Language = ENG	
			endif
			ifstr(i) $(L) == GER
				set !Language = GER	
			endif
			ifstr(i) $(L) == GERMAN	
				set !Language = GER	
			endif
			return $(!Language)
		endif
	endif

	OpenRegKey $(!REG_H_CUSER) "" "Control Panel\International" $(MAXPERM) LangKey
	ifstr $(LangKey) != $(KeyNull)
		GetRegValue $(LangKey) "Locale" LocaleInfo
		ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
			ifcontains *($(LocaleInfo),4) in  {00000407}
				set !Language = GER
			endif
		endif
		CloseRegKey $(LangKey)
	endif

	return $(!Language)

[StartTypeWANDriver]
;// Input $($0) Starttyp

	read-syms GeneralConstants

	OpenRegKey $(!REG_H_LOCAL) "" $(ServicePath) $(MAXPERM) WanKey
	ifstr $(WanKey) != $(KeyNull)
		SetRegValue $(WanKey) {"Start",0,4,$($0)}
		CloseRegKey $(WanKey)
	endif
	return 

[GetInfFileName]

	read-syms GeneralConstants
	set InfFile = ""
	OpenRegKey $(!REG_H_LOCAL) "" $(SoftwareKeyName) $(MAXPERM) KeySoftware
	ifstr $(KeySoftware) != $(KeyNull)
		Shell $(UtilInf), GetInfFileNameFromRegistry, $(KeySoftware)
		ifint $($ShellCode) == $(!SHELL_CODE_OK)
			set InfFile = $($R0)
		endif
		CloseRegKey $(KeySoftware)
	endif

	return $(InfFile)

[CheckRemovingCommonIcons]

	read-syms GeneralConstants

	OpenRegKey $(!REG_H_LOCAL) "" $(SoftwareBase)"\AcoMpr" $(MAXPERM) Key
	ifstr $(Key) != $(KeyNull)
		CloseRegKey $(WanKey)
		return
	endif

	OpenRegKey $(!REG_H_LOCAL) "" $(SoftwareBase)"\AcoRas" $(MAXPERM) Key
	ifstr $(Key) != $(KeyNull)
		CloseRegKey $(WanKey)
		return
	endif

	OpenRegKey $(!REG_H_LOCAL) "" $(SoftwareBase)"\AcoCG" $(MAXPERM) Key
	ifstr $(Key) != $(KeyNull)
		CloseRegKey $(WanKey)
		return
	endif

	Shell $(AcoSetupIconsPath) "RemoveCommonIcons"

	Sleep 1000	
	LibraryProcedure Result $(!SetupHandle) AcoRasCleanFolderIcons $(HWND)

	return	

[SetCorrectlySrcPath]

	set SrcDir = $($0)
	set SplitList = {}
	split-string $(SrcDir) "\" SplitList
	querylistsize SplitCount $(SplitList)
	ifstr(i) "\" != *($(SplitList), $(SplitCount))
		set SrcDir = $(SrcDir)"\"
	endif

	return $(SrcDir)

[SetOEMCapture]
	
	read-syms GeneralConstants
	OpenRegKey $(!REG_H_LOCAL) "" $(SetupRegKeyName) $(MAXPERM) Key
	ifstr $(Key) != ""
		SetRegValue $(Key) {"OEMCapture",0,1,"acotec"}
		CloseRegKey $(Key)
	endif
	return

;//***************************************************************
;//  INSTALL SECTIONS; copy the files used by MPR 
;//***************************************************************

[Files-Inf]
	1,	OEMSETUP.INF,		SIZE=1,  	RENAME=$(!UG_FILENAME)

[FileCopyList]
	1,	AcoRas.sys,		SIZE=1, RENAME=AcoRas.sys , DESTINATION=$(WinNTSystem32Path)
;	1,  RasReadG.txt,	SIZE=1,	RENAME=RasReadG.txt	,DESTINATION=$(ProductPath)
;	1,  RasReadE.txt,	SIZE=1,	RENAME=RasReadE.txt	,DESTINATION=$(ProductPath)
;	1,  RasFAQE.txt,	SIZE=1,	RENAME=RasFAQE.txt	,DESTINATION=$(ProductPath)
;	1,  RasFAQG.txt,	SIZE=1,	RENAME=RasFAQG.txt	,DESTINATION=$(ProductPath)
	1,	arasinst.EXE,	SIZE=1,	RENAME=arasinst.EXE	,DESTINATION=$(ProductPath)
	1,	RasSUDLL.DLL,	SIZE=1, RENAME=RasSUDLL.DLL,DESTINATION=$(ProductPath), OVERWRITE=VERIFYSOURCEOLDER		
;	1,	RasGER.HLP,		SIZE=1, RENAME=RasGER.HLP,DESTINATION=$(ProductPath), OVERWRITE=VERIFYSOURCEOLDER
;	1,	RasENG.HLP,		SIZE=1, RENAME=RasENG.HLP,DESTINATION=$(ProductPath), OVERWRITE=VERIFYSOURCEOLDER
;	1,	ACORASBG.BMP,	SIZE=1, RENAME=ACORASBG.BMP,DESTINATION=$(ProductPath), OVERWRITE=VERIFYSOURCEOLDER
;	1,	GETVER.EXE,		SIZE=1, RENAME=GETVER.EXE,DESTINATION=$(ProductPath), OVERWRITE=VERIFYSOURCEOLDER
	1,	langeng.DLL,	SIZE=1, RENAME=langeng.DLL ,DESTINATION=$(ProductPath), OVERWRITE=VERIFYSOURCEOLDER
	1,	langger.DLL,	SIZE=1, RENAME=langger.DLL ,DESTINATION=$(ProductPath), OVERWRITE=VERIFYSOURCEOLDER
	1,	DELFILES.DAT,	SIZE=1, RENAME=DELFILES.DAT,DESTINATION=$(ProductPath), OVERWRITE=VERIFYSOURCEOLDER
	1,	DATAS.DLL,		SIZE=1, RENAME=DATAS.DLL   ,DESTINATION=$(ProductPath), OVERWRITE=VERIFYSOURCEOLDER
;	1,	AcoMprTrc.INF,	SIZE=1, RENAME=AcoMprTrc.INF,DESTINATION=$(ProductPath), OVERWRITE=VERIFYSOURCEOLDER
;	1,	VerDlg.DLL,		SIZE=1, RENAME=VerDlg.DLL,DESTINATION=$(ProductPath), OVERWRITE=VERIFYSOURCEOLDER
;	1,	AcoClean.EXE,	SIZE=1, RENAME=AcoClean.EXE,DESTINATION=$(ProductPath), OVERWRITE=VERIFYSOURCEOLDER
	1,	AcoIcons.INF,	SIZE=1, RENAME=AcoIcons.INF,DESTINATION=$(ProductPath), OVERWRITE=VERIFYSOURCEOLDER

[Install-Install]

    set STF_VITAL		= "1"
    set STF_DECOMPRESS	= 1
	set FILE_EXISTING	= YES

	CreateDir $(!STF_WINDOWSSYSPATH)"\"$(ProductDirectory)

	forlistdo ^(FileCopyList, 2)
		ifstr(i) $(FILE_EXISTING) == YES
			AddNthSectionFileToCopyList FileCopyList $(#) $(SrcDir) ""
		else 
			set f = $(SrcDir)$($)
		   	LibraryProcedure FilePresent, $(!LIBHANDLE), CheckFileExistance, $(f)
			ifstr(i) $(FilePresent) == "YES"
				AddNthSectionFileToCopyList FileCopyList $(#) $(SrcDir) ""
			endif
		endif
	endforlistdo

	ifstr(i) 	$(!NTN_InstallMode) == update
	    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
	endif

	set !STF_NCPA_FLUSH_COPYLIST = TRUE
	CopyFilesInCopyList

	exit

[RemoveFiles]

	read-syms GeneralConstants

	set SectionList = {"FileCopyList"}
	forlistdo $(SectionList)
		set Section = $($)
		forlistdo ^($(Section),2)
			Debug-Output $(LocalName)"RemoveFiles "$($)	
			LibraryProcedure Status, $(!LIBHANDLE), DelFile, $(ProductDirectoryPath)"\"$($)
		endforlistdo
	endforlistdo

	return

[DoYouWantInstallMSRas]

	Shell "" GetLanguage
	read-syms WantMSRasInstall$(!Language) 
	ui start "CustomMessageBox"
	ifstr(i) $(DLGEVENT) == "YES" 
		return "YES"
	endif		
	return "NO"

[WantMSRasInstallGER]
	DlgType		 =	"MessageBox"
    STF_MB_TITLE = "acotec ISDN RasCapi Setup"
    STF_MB_TEXT  = +
	"Der acotec ISDN RasCapi Treiber wurde erfolgreich installiert bzw. konfiguriert. "+
	"Sie müssen jetzt die Microsoft RAS Konfiguration aufrufen, um die ISDN Zugänge einzurichten. "$(!LF)+
	"Wollen Sie jetzt MS-Ras konfigurieren?"
	STF_MB_TYPE  = 3 
    STF_MB_ICON  = 4    
    STF_MB_DEF   = 1 

[WantMSRasInstallENG]
	DlgType = "MessageBox"
    STF_MB_TITLE = "acotec ISDN RasCapi Setup"
    STF_MB_TEXT  = +
	"The acotec ISDN RasCapi driver installed or configured successful. "+
	"You must configure the Microsoft RAS for providing the ISDN lines. "$(!LF)+
	"Do you want call the installation of Microsoft RAS?"
	STF_MB_TYPE  = 3 
    STF_MB_ICON  = 4    
    STF_MB_DEF   = 1 


[CheckReallyCancel]

	Shell "" GetLanguage
	read-syms WillCancelMessageDlg$(!Language) 
	ui start "CustomMessageBox"
	ifstr(i) $(DLGEVENT) == "YES" 
		return "USER_CANCEL"
	endif		
	return ""

[WillCancelMessageDlgGER]
	DlgType = "MessageBox"
    STF_MB_TITLE = "acotec ISDN RasCapi Setup"
    STF_MB_TEXT  = +
	"Wollen Sie die Installation des acotec ISDN RasCapi Treibers wirklich abbrechen?"
	STF_MB_TYPE  = 3 
    STF_MB_ICON  = 3    
    STF_MB_DEF   = 1 

[WillCancelMessageDlgENG]
	DlgType = "MessageBox"
    STF_MB_TITLE = "acotec ISDN RasCapi Setup"
    STF_MB_TEXT  = +
	"Do you want really quit the installation of acotec ISDN RasCapi drivers?"
	STF_MB_TYPE  = 3 
    STF_MB_ICON  = 3    
    STF_MB_DEF   = 1 

[StfVariableSyms]
    !ProcessorID_I386  = I386
    !ProcessorID_I486  = I486
    !ProcessorID_I586  = I586
    !ProcessorID_R4000 = R4000
    !ProcessorID_Alpha = Alpha_AXP
    !ProcessorID_PPC601  = PPC601
    !ProcessorID_PPC603  = PPC603
    !ProcessorID_PPC604  = PPC604
    !ProcessorID_PPC620  = PPC620
    !PlatformID_I386   = I386
    !PlatformID_Mips   = Mips
    !PlatformID_Alpha  = Alpha
    !PlatformID_PPC    = ppc
    !STF_PRODUCT        = SERVERNT    
    !STF_USERNAME       = ""       
    !STF_INSTALL_MODE   = "CUSTOM" 
    !STF_UPDGRADE       = NO       
    !STF_NCDETECT       = NO       
    !STF_NCOPTION       = ""       
    !STF_NCDETCARD      = 99999    
    !STF_NCDETINFO      = {}       
    !STF_NC_PARAMS      = {}       
    !STF_NC_PNAMES      = {}       
    !STF_SRCDIR_KEYED   = ""       
    !STF_SRCDIR_USED    = ""       
    !STF_SRCDIR_OVERRIDE = ""      
    !STF_SRCDIR_WINNT   = ""       
    !STF_TEMPLATE_CRITERR = "CRITERR2"
    !STF_TEMPLATE_NONCRITERR = "NONCRITERR2"
    !STF_INSTALLED_OS = {} ? $(!LIBHANDLE) GetInstalledOSNames
    FatalErrorIndex = 1
    Exit_Code = 0

[StfVariableDetect]
    !STF_PROCESSOR		= "" ? $(!LIBHANDLE) GetProcessor
    !STF_PLATFORM		= "I386"        
    !STF_LANGUAGE		= "" ? $(!LIBHANDLE) GetLanguage
    LanguageList		= ^(LanguageID, 1)
    !STF_WINDOWSPATH    = "" ? $(!LIBHANDLE) GetWindowsNtDir
    !STF_WINDOWSSYSPATH = "" ? $(!LIBHANDLE) GetWindowsNtSysDir
    !STF_NTPATH         = $(!STF_WINDOWSPATH)
    !STF_COMPUTERNAME   = "" ? $(!LIBHANDLE) GetMyComputerName
    !STF_BUSTYPE        = "" ? $(!LIBHANDLE) GetMyBusType
    !STF_BUSTYPELIST    = "" ? $(!LIBHANDLE) GetMyBusTypeList

[DetectProductType]

    OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Control\ProductOptions" 33554432 KeyProductOption
    ifstr(i) $(KeyProductOption) != ""
        GetRegValue $(KeyProductOption) "ProductType" ProductTypeList
        set TempProductType = *($(ProductTypeList),4)
        ifstr(i) $(TempProductType) == "winnt"
            set !STF_PRODUCT = WINNT
        else-ifstr(i) $(TempProductType) == "lanmannt"
            set !STF_PRODUCT = LANMANNT
        else-ifstr(i) $(TempProductType) == "servernt"
            set !STF_PRODUCT = SERVERNT
        else
            return
        endif
        CloseRegKey $(KeyProductOptions)
    else
        return
    endif

	return

[ExeStart]

	LoadLibrary "y" $(!STF_CWDDIR)"ncpa.cpl"		!NCPA_HANDLE
	LoadLibrary "x" $(!STF_CWDDIR)"setupdll.dll"	!LIBHANDLE

	read-syms	StfVariableSyms
	read-syms	StfVariableDetect
	detect		StfVariableDetect

	Shell "" GetLanguage

	set !NTN_SoftwareBase = "SOFTWARE"
	set !NTN_ServiceBase  = "SYSTEM\CurrentControlSet\SERVICES"
	set !NTN_InstallMode = $(!InstallMode)
	set SRCDir = $(!SrcPath)

	set !ExeCalled = TRUE
	set !EndText = ""
	set !ExitCondition = "CANCEL"
	set !MakeBindings = NO

	Debug-Output "ACO-MP: "$(!NTN_InstallMode)" in "$(SRCDir)
	Shell "" InstallOption ENG AcoRasCapi $(SRCDir) YES YES YES

	ifstr(i) $($R0) == STATUS_USERCANCEL
		;// no actions required
	else 
		ifstr(i) $(!MakeBindings) == YES
			;// Bindings analyse
			LibraryProcedure Result $(!NCPA_HANDLE),"CPlSetup" $(!STF_HWND),"NCPA"
		endif
	endif

	ifstr(i) $(!EndText) != ""
;// 		Shell "SUBROUTN.INF" SetupMessage,$(!STF_LANGUAGE),"STATUS",$(!EndText)
	endif

;// write Exítcondition by registry
	set MAXPERM	= 33554432

	OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase) $(MAXPERM) ServKey
	OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\acotecTempKey" $(MAXPERM) Key
	ifstr $(Key) == ""
		set NewKey = {"acotecTempKey",$(NoTitle),""} 
		CreateRegKey $(ServKey) $(NewKey) "" $(!REG_KEY_ALL_ACCESS) "" Key
	endif

	SetRegValue $(Key) {"BootCondition",0,1,$(!ExitCondition)}
	CloseRegKey $(Key)
	CloseRegKey $(ServKey)
		
	exit 

[Shell Commands]
;//	test environment
    set !DebugOutputControl = 1
	set !STF_WINDOWSSYSPATH = "C:\WINNTNEU\system32"

	LoadLibrary "y" $(!STF_CWDDIR)"ncpa.cpl"	!NCPA_HANDLE
	LoadLibrary "x" $(!STF_CWDDIR)"setupdll.dll"	!LIBHANDLE

	read-syms	StfVariableSyms
	read-syms	StfVariableDetect
	detect		StfVariableDetect

	set !NTN_SoftwareBase = "SOFTWARE"
	set !NTN_ServiceBase  = "SYSTEM\CurrentControlSet\SERVICES"
	set-subst !LF = \n

	Shell "" GetLanguage

	read-syms GeneralConstants
	read-syms FileConstants$(!Language)

	set !MAXIMUM_ALLOWED = $(MAXPERM)

;	set !InstallMode = "deinstall"
	set !InstallMode = "install"
	set !SrcPath = "d:\users\ras\rasrele"
	Shell "" SetCorrectlySrcPath $(!SrcPath)
	set SrcDir = $($R0)

    LoadLibrary "x" $(!STF_CWDDIR)rascfg.dll PORTSDLGHANDLE

    shell "oemnsvra.inf" IsNetcardInstalled
    ifstr(i) $($R0) == STATUS_SUCCESSFUL
        set fNetcardInstalled = $($R1)
    endif

    shell "oemnsvra.inf" QueryInstalledProtocols
    ifstr(i) $($R0) == STATUS_SUCCESSFUL
        set fNetbeuiInstalled = $($R1)
        set fTcpIpInstalled   = $($R2)
        set fIpxInstalled     = $($R3)
    endif

	set !STF_GUI_UNATTENDED = YES
	set !STF_UNATTENDED  = YES
	set !STF_UNATTENDED_SECTION = FALSE

	LoadLibrary "x" "d:\users\ras\acosetup\rassudll\debug\rassudll.dll"	SetupHandle

;	LibraryProcedure Result $(!SetupHandle) AcoRasConfigureSerialNumber $(HWND)
	Shell "" CheckCAPIInstalled

	ifstr(i) $($R0) != STATUS_SUCCESSFUL
		ifstr(i) $(!Language) == "GER"
			set param = "Sie haben keine ISDN-Karte mit einem CAPI 2.0 Treiber installiert."$(!LF)+
						"Für eine erfolgreiche Installation des "$(SoftwareDescription)" müssen Sie vorher eine ISDN-Karte mit einer CAPI 2.0 Schnittstelle installieren."
		else 
			set param = "You have not installed any ISDN-Card with a CAPI 2.0 interface."$(!LF)+
						"You must install an ISDN-Card before you can install the "$(SoftwareDescription)"."
		endif 
		Shell "SUBROUTN.INF" SetupMessage,$(!STF_LANGUAGE),"FATAL",$(param)
						
	endif

	Shell "SUBROUTN.INF" SetupMessage,$(!STF_LANGUAGE),"STATUS",$($R0)"  "$($R1)
;	Shell "" ExeStart

exit


Download Driver Pack

How To Update Drivers Manually

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.

server: web3, load: 2.96