Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
213 views
in Technique[技术] by (71.8m points)

Windows Command Line To View Installed Software Hotfixes/Patches

On Windows, navigating into the Control Panel > Programs and Features > View installed updates page, I can see all of the software hotfixes applied including the Windows updates.

I would like to view this information using a command. Using the following command, I can view all of the Windows updates applied:

wmic qfe list full

The only problem is, the command above does not list software appliance patches applied to the machine. For example, on the view installed updates page, I can see a patch applied for SolarWinds and I cannot see the same information in the command line.

question from:https://stackoverflow.com/questions/65848801/windows-command-line-to-view-installed-software-hotfixes-patches

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Refer to Skipping last empty line of WMIC command output in batch

@echo off
Title wmic to get HotfixID
Setlocal EnableDelayedExpansion
echo "patches" : {
set "patches=wmic qfe get HotfixID"
for /f "skip=1" %%i in ('%patches%') do for /f "delims=" %%j in ("%%i") do (
    set /a count=count+1
    echo "!count!" : "%%j",
)
echo }

With Powershell 7.1 and refer to Get-Package , You can give a try with Powershell :

Get-Package -AllVersions

Getting List of Installed Applications that Matches Add/Remove Programs List


Refer to group all installed software in one cell by PowerShell

(Get-Package | Where-Object {$_.ProviderName -in @('Programs','msi','Chocolatey')} | Select-Object -ExpandProperty Name)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...