⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 oemsetup.inf

📁 vc环境下的pgp源码
💻 INF
📖 第 1 页 / 共 3 页
字号:
;______________________________________________________________________________
;	Copyright (C) 1998 Network Associates, Inc.
;	All rights reserved.
;
;	
;
;	$Id: Oemsetup.inf,v 1.26 1999/04/08 23:01:06 philipn Exp $
;______________________________________________________________________________

[Identification]
    OptionType = NetAdapter

[LanguagesSupported]
    ENG

[Options]
    PGPMac

[OptionsTextENG]
    PGPMac     = "PGPnet VPN driver"

[FileConstants]
UtilityInf      			= "UTILITY.INF"
subroutineinf   			= "SUBROUTN.INF"
TransportSoftwareType			= "transport"
AdapterSoftwareType   			= "driver"
Exit_Code       			= 0
NetEventDLL     			= "%SystemRoot%\System32\netevent.dll"

Manufacturer    			= "Network Associates"
ProductMajorVersion     		= "1"
ProductMinorVersion     		= "0"
ProductVersion  			= $(ProductMajorVersion)"."$(ProductMinorVersion)

TransportProductSoftwareName   		= "PGPMac"

ProductSoftwareImagePath 		= "\SystemRoot\System32\drivers\PGPnet.sys"

TransportNetRuleSoftwareType    	= "PGPMac TcpipTransport"
TransportNetRuleSoftwareClass   	= {"TcpipTransport basic"}
TransportNetRuleSoftwareUse     	= $(TransportSoftwareType)" none none"

TransportNetRuleSoftwareBindForm	= """PGPMac"" yes yes simple"
TransportNetRuleSoftwareBindable 	= {"PGPMac ndisDriver non non 100"}

AdapterNetRuleSoftwareType    		= "PGPSys ndisDriver PGPDriver"
AdapterNetRuleSoftwareUse     		= $(AdapterSoftwareType)
AdapterNetRuleSoftwareBindForm		= """PGPSys"" yes no container"
AdapterNetRuleSoftwareClass   		= {"PGPDriver basic"}
AdapterNetRuleSoftwareBindable 		= {"PGPDriver PGPAdapter non exclusive 100"}

AdapterNetRuleHardwareType		= "PGP PGPAdapter"
AdapterNetRuleHardwareBindForm 		= " yes yes container"
AdapterNetRuleHardwareClass    		= {"PGPAdapter basic"}

TransportProductKeyName	= $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(TransportProductSoftwareName)"\CurrentVersion"
TransportParamKeyName	= $(!NTN_ServiceBase)"\"$(TransportProductSoftwareName)"\Parameters"
TransportServiceKeyName	= $(!NTN_ServiceBase)"\"$(TransportProductSoftwareName)
TransportLinkageKeyName	= $(!NTN_ServiceBase)"\"$(TransportProductSoftwareName)"\Linkage"

[FileConstantsENG]
ProCaption   				= "Windows NT Setup"
ProCancel    				= "Cancel"
ProCancelMsg 				= "Windows NT Networking is not correctly installed.  "+
               				  "Are you sure you want to cancel copying files?"
ProCancelCap 				= "Network Setup Message"
ProText1     				= "Copying:"
ProText2     				= "To:"
FunctionTitle   			= "PGPnet VPN Driver"
TransportProductSoftwareDescription	= "PGPnet VPN Driver Transport"
TransportProductSoftwareDisplayName	= "PGPnet VPN Driver Transport"
TransportProductSoftwareTitle    	= "PGPnet VPN Driver Transport"
AdapterProductSoftwareDescription	= "PGPnet VPN Driver Adapter"
AdapterProductSoftwareDisplayName	= "PGPnet VPN Driver Adapter"
AdapterProductSoftwareTitle    		= "PGPnet VPN Driver Adapter"
ProductHardwareDescription		= "PGPnet VPN Driver Virtual Adapter"
ProductHardwareDisplayName		= "PGPnet VPN Driver Virtual Adapter"
ProductHardwareTitle			= "PGPnet VPN Driver Virtual Adapter"
ShellCodeErrorTitle     		= "Error: "$(FunctionTitle)
ShellCodeErrorText      		= "Shell Code Error."

[GeneralConstants]
from      = ""
to        = ""
ExitCodeOk     = 0
ExitCodeCancel = 1
ExitCodeFatal  = 2
KeyNull        = ""
MAXIMUM_ALLOWED   = 33554432
RegistryErrorIndex = NO_ERROR
KeyProduct      = ""
KeyParameters   = ""
TRUE            = 1
FALSE           = 0
NoTitle         = 0
ExitState   = "Active"
OldVersionExisted = $(FALSE)
DriverPath      = $(!STF_NTPATH)\drivers

[date]
    Now = {} ? $(!LIBHANDLE) GetSystemDate

[platform]
    STF_PLATFORM = "" ? $(!LIBHANDLE) GetPlatform

[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 !DebugOutputControl = 0
    
    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
    set-subst LF = "\n"
    read-syms GeneralConstants
    read-syms FileConstants
    read-syms DialogConstants$(!STF_LANGUAGE)
    ifstr(i) $(!NTN_Origination) == "NCPA"
        set Continue = $(OK)
    endif
    read-syms FileConstants$(!STF_LANGUAGE)
    detect date
    detect platform
    set-title  $(FunctionTitle)
    set to   = Begin
    set from = Begin
    set CommonStatus = STATUS_SUCCESSFUL
    EndWait
    
Begin = +
	;Get CardType
	Set NetaRegKey = "SOFTWARE\Network Associates\PGP\PGPnet"
	OpenRegKey $(!REG_H_LOCAL) "" $(NetaRegKey) $(MAXIMUM_ALLOWED) NetaKey
	ifstr(i) $(NetaKey) != ""
		GetRegValue $(NetaKey) "CardType" CardTypeList
		set GroupName = *($(CardTypeList),4)
	else
		Debug-Output "PGPMac: failed to open CardType Key for "$(NetaRegKey)
		set DlgType      = "MessageBox"
		set STF_MB_TITLE = "Error"
		set STF_MB_TEXT  = "Registry error"
		set STF_MB_TYPE  = 1
		set STF_MB_ICON  = 3
		set STF_MB_DEF   = 1
		ui start "Error"
		goto fatalRegistry
	endif
	CloseRegKey $(NetaKey)

	ifstr(i) $(GroupName) == "NDISWAN"
		set AdapterProductSoftwareName		= "NdisWanPGPMacMP"
		set AdapterProductHardwareName		= "NdisWanPGPMacMP"
		set AdapterProductKeyName		= 						$(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(AdapterProductSoftwareName)"\CurrentVersion"
		set AdapterParamKeyName	= $(!NTN_ServiceBase)"\"$(AdapterProductSoftwareName)"\Parameters"
		set AdapterServiceKeyName	= $(!NTN_ServiceBase)"\"$(AdapterProductSoftwareName)
		set AdapterLinkageKeyName	= $(!NTN_ServiceBase)"\"$(AdapterProductSoftwareName)"\Linkage"
	else
		set AdapterProductSoftwareName		= "PGPMacMP"
		set AdapterProductHardwareName		= "PGPMacMP"
		set AdapterProductKeyName		= 						$(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(AdapterProductSoftwareName)"\CurrentVersion"
		set AdapterParamKeyName	= $(!NTN_ServiceBase)"\"$(AdapterProductSoftwareName)"\Parameters"
		set AdapterServiceKeyName	= $(!NTN_ServiceBase)"\"$(AdapterProductSoftwareName)
		set AdapterLinkageKeyName	= $(!NTN_ServiceBase)"\"$(AdapterProductSoftwareName)"\Linkage"
	endif

    Ifstr(i) $(!NTN_InstallMode) == deinstall
        set StartLabel = deinstall
    else-Ifstr(i) $(!NTN_InstallMode) == update
        set StartLabel = update
    else-Ifstr(i) $(!NTN_InstallMode) == bind
        set StartLabel = bind
    else-Ifstr(i) $(!NTN_InstallMode) == configure
        set StartLabel = configure
    else
        set StartLabel = install
    endif
    set RadioDefault = 2
    set RadioIn = {$(RadioDefault)}
    set from = $(fatal)
    set to = $(fatal)
    goto $(StartLabel)

install = +
    OpenRegKey $(!REG_H_LOCAL) "" $(TransportProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
    Ifstr $(KeyProduct) != $(KeyNull)
        CloseRegKey $(KeyProduct)
        Shell $(UtilityInf), VerExistedDlg, $(TransportProductSoftwareTitle),+
            $(ProductVersion)
        ifint $($ShellCode) != $(!SHELL_CODE_OK)
            goto ShellCodeError
        endif
        goto end
    endif
    CloseRegKey $(KeyProduct)
    goto installproduct

installproduct = +
    StartWait
    ifint $(OldVersionExisted) == $(FALSE)
        Ifstr(i) $(DoCopy) == "YES"
           Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
           Ifint $($ShellCode) != $(!SHELL_CODE_OK)
               Goto ShellCodeError
           Else-Ifstr(i) $($R0) == STATUS_FAILED
               Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
               ifint $($ShellCode) != $(!SHELL_CODE_OK)
                   goto ShellCodeError
               endif
               Goto fatal
           Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
               Goto successful
           Endif
           Set SrcDir = $($R1)
        Endif
        Shell "" StripTrailSlash $(SrcDir)
        set PlatformDir  = $($R0)"\"
        set InfDir  = $($R0)"\"
        install "Install-Option"
        ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
           Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
           ifint $($ShellCode) != $(!SHELL_CODE_OK)
               goto ShellCodeError
           endif
           set Error = $($R0)
           goto fatal
        endif
        set OEM_ABANDON_ON = TRUE

	;Get CardType
	Set NetaRegKey = "SOFTWARE\Network Associates\PGP\PGPnet"
	OpenRegKey $(!REG_H_LOCAL) "" $(NetaRegKey) $(MAXIMUM_ALLOWED) NetaKey
	ifstr(i) $(NetaKey) != ""
		GetRegValue $(NetaKey) "CardType" CardTypeList
		set GroupName = *($(CardTypeList),4)
	else
		Debug-Output "PGPMac: failed to open CardType Key for "$(NetaRegKey)
		set DlgType      = "MessageBox"
		set STF_MB_TITLE = "Error"
		set STF_MB_TEXT  = "Registry error"
		set STF_MB_TYPE  = 1
		set STF_MB_ICON  = 3
		set STF_MB_DEF   = 1
		ui start "Error"
		goto fatalRegistry
	endif
	CloseRegKey $(NetaKey)
	Debug-Output "PGPMac: Adding Transport Software Component to Registry"

	Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
        $(TransportProductSoftwareName), +
	$(TransportProductSoftwareName), +
       	$(TransportProductSoftwareDisplayName), $(STF_CONTEXTINFNAME), +
        $(ProductSoftwareImagePath), "transport", $(GroupName), {}, "",+
        $(NetEventDLL)
        set RegistryErrorIndex = $($R0)
        Ifstr(i) $(RegistryErrorIndex) !=  NO_ERROR
            EndWait
            CloseRegKey $($R1)
            CloseRegKey $($R2)
            CloseRegKey $($R3)
            CloseRegKey $($R4)
            CloseRegKey $($R5)
            goto fatalRegistry
        endif

        Set SoftProductKey      = $($R1)
        Set SoftNetRuleKey      = $($R2)
        Set SoftServiceKey      = $($R3)
        Set SoftParameterKey    = $($R4)
        Set SoftLinkageKey      = $($R5)
        set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(TransportSoftwareType)},+
                           {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
                           {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
                           {Title,$(NoTitle),$(!REG_VT_SZ),$(TransportProductSoftwareTitle)},+
                           {Description,$(NoTitle),$(!REG_VT_SZ),$(TransportProductSoftwareDescription)},+
                           {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(TransportProductSoftwareName)},+
                           {Review,$(NoTitle),$(!REG_VT_DWORD),1},+
                           {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
        Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
        set RegistryErrorIndex = $($R0)
        Ifstr $(RegistryErrorIndex) != NO_ERROR
            CloseRegKey $(SoftProductKey)
            CloseRegKey $(SoftNetRuleKey)
            CloseRegKey $(SoftServiceKey)
            CloseRegKey $(SoftParameterKey)
            CloseRegKey $(SoftLinkageKey)
            goto fatalRegistry
        endif
        set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(TransportNetRuleSoftwareType)}, +
                            {use,$(NoTitle),$(!REG_VT_SZ),$(TransportNetRuleSoftwareUse)}, +
                            {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(TransportNetRuleSoftwareClass)}, +
                            {bindform,$(NoTitle),$(!REG_VT_SZ),$(TransportNetRuleSoftwareBindForm)}, +
                            {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(TransportNetRuleSoftwareBindable)}, +
                            {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
        Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
        set RegistryErrorIndex = $($R0)
        Ifstr $(RegistryErrorIndex) != NO_ERROR
            CloseRegKey $(SoftProductKey)
            CloseRegKey $(SoftNetRuleKey)
            CloseRegKey $(SoftServiceKey)
            CloseRegKey $(SoftParameterKey)
            CloseRegKey $(SoftLinkageKey)
            goto fatalRegistry
        endif

        set NewValueList = {{DebugLevel,$(NoTitle),$(!REG_VT_DWORD),0}, +
                            {DebugMask,$(NoTitle),$(!REG_VT_DWORD), 0}}
        Shell  $(UtilityInf), AddValueList, $(SoftParameterKey), $(NewValueList)
        set RegistryErrorIndex = $($R0)
        Ifstr $(RegistryErrorIndex) != NO_ERROR
            CloseRegKey $(SoftProductKey)
            CloseRegKey $(SoftNetRuleKey)
            CloseRegKey $(SoftServiceKey)
            CloseRegKey $(SoftParameterKey)
            CloseRegKey $(SoftLinkageKey)
            goto fatalRegistry
        endif

	
        CloseRegKey $(SoftProductKey)
        CloseRegKey $(SoftNetRuleKey)
        CloseRegKey $(SoftServiceKey)
        CloseRegKey $(SoftParameterKey)
        CloseRegKey $(SoftLinkageKey)

	Debug-Output "PGPMac: Adding Adapter Software Component to Registry"

	Debug-Output "PGPMac: Adding Adapter Software Component to Registry"
	ifstr(i) $(GroupName) == "NDISWAN"
        	Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
            	$(AdapterProductSoftwareName), +
            	$(AdapterProductSoftwareName), +
            	$(AdapterProductSoftwareDisplayName), $(STF_CONTEXTINFNAME), +
            	$(ProductSoftwareImagePath), "kernelautostart", $(GroupName), {}, "",+
            	$(NetEventDLL)
	else
        	Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
            	$(AdapterProductSoftwareName), +
            	$(AdapterProductSoftwareName), +
            	$(AdapterProductSoftwareDisplayName), $(STF_CONTEXTINFNAME), +
            	$(ProductSoftwareImagePath), "kernel", $(GroupName), {}, "",+
            	$(NetEventDLL)
	endif	

        set RegistryErrorIndex = $($R0)
        Ifstr(i) $(RegistryErrorIndex) !=  NO_ERROR
            EndWait
            CloseRegKey $($R1)
            CloseRegKey $($R2)
            CloseRegKey $($R3)
            CloseRegKey $($R4)
            CloseRegKey $($R5)
            goto fatalRegistry
        endif
        Set SoftProductKey      = $($R1)
        Set SoftNetRuleKey      = $($R2)
        Set SoftServiceKey      = $($R3)
        Set SoftParameterKey    = $($R4)
        Set SoftLinkageKey      = $($R5)

        set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(AdapterSoftwareType)},+
                           {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
                           {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
                           {Title,$(NoTitle),$(!REG_VT_SZ),$(AdapterProductSoftwareTitle)},+
                           {Description,$(NoTitle),$(!REG_VT_SZ),$(AdapterProductSoftwareDescription)},+
                           {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(AdapterProductSoftwareName)},+
                           {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
        Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
        set RegistryErrorIndex = $($R0)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -