1 Star 0 Fork 0

yunlovely/ListInstalledPrograms

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
ListInstalledPrograms.ps1 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
3gstudent 提交于 2018-01-27 05:35 . Update ListInstalledPrograms.ps1
<#
.SYNOPSIS
This script can be used to list the programs that the current Windows system has installed.
Supprot x86 and x64
Author: 3gstudent@3gstudent
License: BSD 3-Clause
#>
Function ListPrograms
{
param($RegPath)
$QueryPath = dir $RegPath -Name
foreach($Name in $QueryPath)
{
(Get-ItemProperty -Path $RegPath$Name).DisplayName
# (Get-ItemProperty -Path $RegPath$Name).Publisher
# (Get-ItemProperty -Path $RegPath$Name).DisplayVersion
}
}
if ([IntPtr]::Size -eq 8)
{
Write-Host "[*] OS: x64"
Write-Host "[*] List the 64 bit programs that have been installed"
$RegPath = "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
ListPrograms -RegPath $RegPath
Write-Host "[+] List the 32 bit programs that have been installed"
$RegPath = "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\"
ListPrograms -RegPath $RegPath
}
else
{
Write-Host "[*] OS: x86"
Write-Host "[*] List the 32 bit programs that have been installed"
$RegPath = "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
ListPrograms -RegPath $RegPath
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yunlovely/ListInstalledPrograms.git
git@gitee.com:yunlovely/ListInstalledPrograms.git
yunlovely
ListInstalledPrograms
ListInstalledPrograms
master

搜索帮助