[Win32_Product在Windows中使用Powershell的软件安装位置,但它为null或为空

问题描述 投票:0回答:1

我正在Powershell中使用命令Get-WmiObject -Class Win32_Product查找Windows中安装的软件的InstallLocation。它显示出我没有任何价值。 Windows中安装的许多软件没有InstallLocation属性的原因是什么?如何在Powershell中获得它?

windows powershell wmi get-wmiobject
1个回答
0
投票

如果WMI命令返回的结果未返回所需应用程序的所需InstallLocation,那么您可能需要检查以下两个其他选项:

Get-ChildItem HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\* | % { Get-ItemProperty $_.PsPath } | Select-Object DisplayName, InstallLocation | Sort-Object Displayname -Descending

Get-ChildItem HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | % { Get-ItemProperty $_.PsPath } | Select-Object DisplayName, InstallLocation | Sort-Object Displayname -Descending

© www.soinside.com 2019 - 2024. All rights reserved.