📄 oemsetup.inf
字号:
ifstr(i) $(NetaKey) != ""
GetRegValue $(NetaKey) "SecuredCard" SecuredCardList
set SecuredCard = *($(SecuredCardList),4)
endif
;enable Tcpip for secured card
Shell "", FlipBinding, "Tcpip", $(SecuredCard), "ON"
set BNumber = $($R0)
ifstr(i) $(BNumber) != ""
Shell $(UtilityInf),ToggleBinding, "Tcpip", $(BNumber) , "activate"
endif
;enable NetBT for secured card
Shell "", FlipBinding, "NetBT", $(SecuredCard), "ON"
set BNumber = $($R0)
ifstr(i) $(BNumber) != ""
Shell $(UtilityInf),ToggleBinding, "NetBT", $(BNumber) , "activate"
endif
;enable dRMON for secured card
Shell "", FlipBinding, "DTA", $(SecuredCard), "ON"
set BNumber = $($R0)
ifstr(i) $(BNumber) != ""
Shell $(UtilityInf),ToggleBinding, "DTA", $(BNumber) , "activate"
endif
;
; Build a list of real LAN adapters that the transport is bound to
;
OpenRegKey $(!REG_H_LOCAL) "" $(TransportLinkageKeyName) $(MAXIMUM_ALLOWED) TransportLinkageKey
ifstr(i) $(TransportLinkageKey) != ""
GetRegValue $(TransportLinkageKey) "Bind" BindList
Debug-Output "PGPMac: Remove: BindList: "$(BindList)
Set Binding = *($(BindList),4)
Debug-Output "PGPMac: Remove: Binding: "$(Binding)
CloseRegKey $(TransportLinkageKey)
else
Debug-Output "PGPMac: failed to open key "$(TransportLinkageKeyName)
goto skipRemoveBindings
endif
set CardList = {}
set CreateCardList = {}
ForListDo $(Binding)
Split-String $($), "\", BindInfo
QueryListSize BindListSize $(BindInfo)
set CardName = *($(BindInfo),$(BindListSize))
Debug-Output "PGPMac: Remove: Cardname: "$(CardName)
ifstr(i) $(CardList) == {}
set CardList = {$(CardName)}
else
set CardList = >($(CardList),$(CardName))
endif
EndForListDo
Debug-Output "PGPMac: Cardlist: "$(CardList)
;
; For each real LAN adapter in the list...
;
ForListDo $(CardList)
;
; Open the params key
;
Set RegKey = $(!NTN_ServiceBase)"\"$($)"\Parameters\"$(TransportProductSoftwareName)
OpenRegKey $(!REG_H_LOCAL) "" $(RegKey) $(MAXIMUM_ALLOWED) ParamsKey
ifstr(i) $(ParamsKey) != ""
;
; get the adapter number
;
GetRegValue $(ParamsKey) "AdapterNumber" AdapterNoValue
CloseRegKey $(ParamsKey)
Set AdapterNo = *($(AdapterNoValue),4)
;
; Remove the virtual hardware component that represents the ELAN.
; This will remove the adapter software component as well.
;
Set AdapterRegBase = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$(AdapterNo)
Debug-Output "PGPMac: removing adapter number "$(AdapterNo)" RegBase "$(AdapterRegBase)
Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
$(AdapterProductSoftwareName), $(AdapterRegBase)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
Debug-Output "PGPMac: ShellCode error"
goto ShellCodeError
endif
;
; delete the whole PGPMac transport specific key from the real LAN adapter
;
Set RegKey = $(!NTN_ServiceBase)"\"$($)"\Parameters"
Debug-Output "PGPMac: Deleting protocol specific key from LAN adapter"
Debug-Output "PGPMac: Key is "$(RegKey)
OpenRegKey $(!REG_H_LOCAL) "" $(RegKey) $(MAXIMUM_ALLOWED) ParamsKey
ifstr(i) $(ParamsKey) != ""
DeleteRegTree $(ParamsKey) $(TransportProductSoftwareName)
CloseRegKey $(ParamsKey)
else
Debug-Output "PGPMac: Failed to delete "$(RegKey)
endif
endif
continueRemoveBindings =+
EndForListDo
skipRemoveBindings =+
Debug-Output "PGPMac: Removing "$(TransportProductSoftwareName)" Software Component from Registry"
Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
$(TransportProductSoftwareName)
; ignore errors for now
goto end
configure =+
set Error = "Configuration Not Implemented"
set from = end
goto nonfatalinfo
update = +
set Error = "Update Not Implemented, Remove and Reinstall"
set from = end
goto nonfatalinfo
successful = +
goto end
warning = +
Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
ifstr(i) $($R1) == "OK"
goto $(to)
else-ifstr(i) $($R1) == "CANCEL"
goto $(from)
else
goto "end"
endif
nonfatalinfo = +
Set CommonStatus = STATUS_USERCANCEL
Set Severity = STATUS
goto nonfatalmsg
nonfatal = +
Set Severity = NONFATAL
goto nonfatalmsg
nonfatalmsg = +
ifstr(i) $(Error) == ""
Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
set Error = $($R0)
endif
Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
ifstr(i) $($R1) == "OK"
goto $(from)
else
goto "end"
endif
fatalregistry = +
Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
set Error = $($R0)
goto fatal
fatal = +
ifstr(i) $(Error) == ""
Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
set Error = $($R0)
endif
Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
ifint $($ShellCode) != $(!SHELL_CODE_OK)
goto ShellCodeError
endif
goto setfailed
ShellCodeError = +
set DlgType = "MessageBox"
set STF_MB_TITLE = $(ShellCodeErrorTitle)
set STF_MB_TEXT = $(ShellCodeErrorText)
set STF_MB_TYPE = 1
set STF_MB_ICON = 3
set STF_MB_DEF = 1
ui start "Error Message"
goto setfailed
setfailed = +
set CommonStatus = STATUS_FAILED
ifstr(i) $(OEM_ABANDON_ON) == TRUE
set OEM_ABANDON_ON = FALSE
goto deinstall
endif
goto end
end = +
goto term
term = +
Return $(CommonStatus)
Return 100100101
[StripTrailSlash]
Split-String $($0) "\" InList
QueryListSize InListSize, $(InList)
Ifint $(InListSize) <= 1
Return $($0)
Endif
Set NewString = ""
ForListDo $(InList)
ifint $(#) < $(InListSize)
Set NewString = $(NewString)$($)
else-ifstr $($) != "\"
Set NewString = $(NewString)$($)
endif
EndForListDo
Return $(NewString)
;Adds $($0) to review list at uninstall time
;this is temporary, soon this wont be needed
;$(!NTN_SoftwareBase)"\Microsoft\Ncpa\CurrentVersion"
:$(!NTN_ServiceBase)"\RASARP\Linkage"
[AddNcpaInf]
set Start = $($0)
set NewList = {$($0)}
set KeyName = $($1)
set ValueName = $($2)
set Return = STATUS_FAILED
set hKey = ""
OpenRegKey $(!REG_H_LOCAL) "" $(NcpaKeyName) $(MAXIMUM_ALLOWED) hKey
Ifstr(i) $(KeyName) != $(hKey)
GetRegValue $(KeyName) "ReviewPrograms" TempList
ifint $(RegLastError) == 0
ForListDo *($(TempList),4)
//This entry needs to added
ifstr(i) $($) != $($Start)
set NewList = >($(newList), $($))
endif
EndForListDo
SetRegValue $(hKey) {$($ValueName), 0, +
$(!REG_VT_MULTI_SZ),$(NewList)}
CloseRegKey $(hKey)
Set Return = STATUS_SUCCESSFUL
endif
else
Debug-Output "AddNcpaInf couldnt open key"
endif
return $(Return )
;Removes $0 from review list at uninstall time
;this is temporary, soon this wont be needed
[RemoveNcpaInf]
set InfName = $($0)
set KeyName = $($1)
set Return = STATUS_FAILED
set hKey = ""
set newList = {}
OpenRegKey $(!REG_H_LOCAL) "" $(KeyName) $(MAXIMUM_ALLOWED) hKey
Ifstr(i) $(KeyName) != $(hKey)
GetRegValue $(KeyNcpa) "ReviewPrograms" TmpList
ifint $(RegLastError) == 0
ForListDo *($(TmpList),4)
ifstr(i) $($) != $($InfName)
set newList = >($(newList), $($))
endif
EndForListDo
Debug-Output "AddInf: new List "$(newList)
SetRegValue $(hKey) {ReviewPrograms, 0, +
$(!REG_VT_MULTI_SZ),$(newList)}
CloseRegKey $(hKey)
Set Status = STATUS_SUCCESSFUL
endif
else
Debug-Output "RemoveInfFromReviewPrograms: error opening ncpa key."
endif
Debug-Output "RemoveInfFromReviewPrograms: exit"
return $(Status)
[FlipBinding]
;
; Open the Linkage Key and get the Bind Value
;
;The service which has bindings you want to toggle
set ServiceName = $($0)
;The name of the binding you wish to toggle
set BindingName = $($1)
;How do you wish to toggle ON or OFF
set Mode = $($2)
set ON = "ON"
set OFF = "OFF"
read-syms GeneralConstants
set MagicIndex = ""
ifstr(i) $(Mode) == $(ON)
Set LinkRegKey = $(!NTN_ServiceBase)"\"$(ServiceName)"\Linkage\Disabled"
else
Set LinkRegKey = $(!NTN_ServiceBase)"\"$(ServiceName)"\Linkage"
endif
OpenRegKey $(!REG_H_LOCAL) "" $(LinkRegKey) $(MAXIMUM_ALLOWED) hRegKey
ifstr(i) $(hRegKey) != ""
GetRegValue $(hRegKey) "Bind" BindList
Debug-Output "PGPMac: BindList: "$(BindList)
Set Binding = *($(BindList),4)
CloseRegKey $(hRegKey)
else
;goto fatalRegistry
endif
;
; Parse the Bindings to create a list Bindings
;
set BindList = {}
set CreateBindList = {}
ForListDo $(Binding)
Split-String $($), "\", BindInfo
QueryListSize BindListSize $(BindInfo)
set BindName = *($(BindInfo),$(BindListSize))
ifstr(i) $($) == "\Device\"$(BindingName)
set MagicIndex = $(#)
endif
EndForListDo
return $(MagicIndex)
[EndOfFlipBinding]
[Install-Option]
set STF_VITAL = ""
ifstr(i) $(AddCopy) == "YES"
;AddSectionFilesToCopyList Files-Platform-Drivers $(PlatformDir) $(!STF_WINDOWSSYSPATH)\drivers
endif
ifstr(i) $(DoCopy) == "YES"
set !STF_NCPA_FLUSH_COPYLIST = TRUE
CopyFilesInCopyList
endif
ifstr(i) $(DoConfig) == "YES"
endif
Exit
[Install-Update]
set STF_VITAL = ""
set STF_OVERWRITE = "VERIFYSOURCEOLDER"
exit
[Source Media Descriptions]
1 = "PGPMac Driver Installation Disk", TAGFILE = disk1
[ProductType]
STF_PRODUCT = Winnt
[Files-Inf]
1, OEMSETUP.INF, SIZE=999, RENAME=$(!UG_Filename)
[Files-Platform-Drivers]
1, PGPNet.SYS , SIZE=999
[DialogConstantsENG]
Help = "&Help"
Exit = "Cancel"
OK = "OK"
HelpContext = ""
Continue = "Continue"
Cancel = "Cancel"
;set DlgType = "MessageBox"
;set STF_MB_TITLE = "To reg key"
;set STF_MB_TEXT = $(ToRegistryKey)
;set STF_MB_TYPE = 1
;set STF_MB_ICON = 3
;set STF_MB_DEF = 1
;ui start "TEST"
;disable us from us
; Shell "", FlipBinding, "PGPMac", $(AdapterProductHardwareName)$(AdapterNumber), "OFF"
; set BNumber = $($R0)
; ifstr(i) $(BNumber) != ""
; Shell $(UtilityInf),ToggleBinding, "PGPMac", $(BNumber) , "disable"
; Set RegKey = $(!NTN_SoftwareBase)"\Microsoft\NCPA\CurrentVersion"
; OpenRegKey $(!REG_H_LOCAL) "" $(RegKey) $(MAXIMUM_ALLOWED) NcpaKey
; endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -