powershell - Get-ItemProperty HKLM...:为什么我找不到 Chrome?
问题描述
我在用着:
Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* |
Select-Object DisplayName, InstallLocation |
Format-Table –AutoSize | clip
但我在其中找不到 Chrome,而我可以在 Windows 控制面板中找到它。为什么?
解决方案
如果您运行的是 64 位系统,您还需要在 WOW6432Node 下进行搜索。也可以作为配置文件应用程序而不是系统应用程序在 CU 上下文中安装。
试试这个来捕捉一切:
$RegHives = "HKLM:\Software","HKLM:\Software\WOW6432Node","HKCU:\Software"
$Apps = @()
ForEach ($Hive in $RegHives)
{
$Apps += Get-ItemProperty $Hive\Microsoft\Windows\CurrentVersion\Uninstall\* |
Select-Object DisplayName, InstallLocation
}
$Apps | Format-Table –AutoSize | clip
推荐阅读
- regex - 用于在 PowerShell 中查找相似字符串的 RegEx
- sql - 客户订单总价值 1
- python - 像字典一样索引 NumPy 数组
- c# - 无法使用 aspnet_regsql 连接到 SQL 数据库进行缓存依赖注册
- macos - 无法在 MacOS 应用程序中创建新目录
- angular - NGRX store.dispatch() 循环中的同步/异步调用
- jquery - 单击我的手风琴幻灯片效果时更改图标
- rdma - /usr/include/rdma/rdma_cma.h:91:2: 错误:未知类型名称 '__be16' __be16 pkey;
- android - 更改 TextInputLayout 轮廓颜色
- javascript - 根据保存状态部分加载模型