1

我需要编写一段代码(最好是脚本),告诉我是否安装了 Adob​​e Reader,如果是,它的版本是什么。我认为在这里使用 PowerShell 是正确的,但我不知道。

4

1 回答 1

2
$query = Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | select DisplayName,DisplayVersion | where {$_.DisplayName -like "*Gimp*"}

if ($query)
{
Write-Host "Adobe Reader is installed with the version $query.DisplayVersion .."
}
else
{
Write-Host "Adobe Reader is not installed.."
}
于 2017-08-04T11:45:18.257 回答