Get-ItemProperty HKLM...: 为什么我找不到 Chrome?



我正在使用:

Get-ItemProperty HKLM:SoftwareMicrosoftWindowsCurrentVersionUninstall* |
Select-Object DisplayName, InstallLocation |
Format-Table –AutoSize | clip

但我在其中找不到 Chrome,而我可以在 Windows 控制面板中找到它。为什么?

如果您运行的是 64 位系统,则还需要在 WOW6432Node 下进行搜索。也可以作为配置文件应用程序而不是系统应用程序安装在 CU 上下文下。

尝试此操作以捕获所有内容:

$RegHives = "HKLM:Software","HKLM:SoftwareWOW6432Node","HKCU:Software"
$Apps = @()
ForEach ($Hive in $RegHives)
{
$Apps += Get-ItemProperty $HiveMicrosoftWindowsCurrentVersionUninstall* |
Select-Object DisplayName, InstallLocation
}

$Apps | Format-Table –AutoSize | clip

最新更新