Answers:
使用PowerShell可能会有更好的方法。
第一个需要完整的MSTSC内部版本表,并与以下内容的输出进行比较:
(Get-Item C:\Windows\System32\mstsc.exe).VersionInfo.FileVersion
第二个是读取已注册组件的CLSID,其中还包含RDP二进制文件,如下所示:
$Current = 0
$GUID = Get-ChildItem -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID" | Select Name
$GUIDNum = Get-ChildItem -LiteralPath "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID" | Select Name | Measure
While($Current -ne $GUIDNum.Count) {
$Path = $GUID[$Current] | Select -ExpandProperty Name
$GUIDName = ((get-itemproperty -literalpath "Registry::$Path").'(default)')
If ($GUIDName -like 'Microsoft RDP Client Control (redistributable) - version*')
{
Write-Host $GUIDName
}
$Current++
}