其实之前也有一个vbs脚本了,但是老是执行会报错,上网找了一个ps脚本,powershell执行。
执行之前需要管理员运行powershell

在powershell执行:
Set-ExecutionPolicy Unrestricted -Scope CurrentUser
选是:

可以列出所有本机安装软件关联的伪协议

附ps代码:
foreach ($Key in Get-ChildItem Microsoft.PowerShell.Core\Registry::HKEY_CLASSES_ROOT) {
$Path = $Key.PSPath + '\shell\open\command'
$HasURLProtocol = $Key.Property -contains 'URL Protocol'
if (($HasURLProtocol) -and (Test-Path $Path))
{
$CommandKey = Get-Item $Path
$Scheme = $Key.Name.SubString($Key.Name.IndexOf('\') + 1) + ':'
Write-Host $Scheme $CommandKey.GetValue('')
}
}