How to list out hotfixes installed via command prompt

There is the "systeminfo" command In WinXP and Windows2003 that lists out hotfixes installed as part of the text output.

I'm looking for an equivalent in Windows 2000 Server. Basically I just need to list out all installed hotfixes to a text file.
LVL 3
exhaustAsked:
Who is Participating?
 
orizivCommented:
Hi,

The most easy way to do this:
Every KB installation leaves a log file in your WINNT directory.
All you need to do is:
dir c:\WINNT\KB*.log and you'll get your list.
0
 
inbarasanCommented:
Hi,

You may use this tool and it will very help ful
WinUpdatesList displays the list of all Windows updates (Service Packs and Hotfixes) installed on your local computer. For hotfix updates, this utility also displays the list of files updated with these hotfixes. In addition, it allows you to instantly open the Web link in Microsoft Web site that provides more information about the selected update, uninstall an update, copy the update information to the clipboard, or save it to text/HTML/XML file.
http://www.nirsoft.net/utils/wul.zip
Regards
Inba
0
 
clesiusCommented:
Hi,

First off download psinfo from:

http://www.microsoft.com/technet/sysinternals/systeminformationutilities.mspx?wt.svl=featured

Then once the program is installed, run "psinfo -h" from the command prompt. If you have administrator access you can also query remote computers with the "psinfo -h \\remote" command.

Hope this helps.


0
 
usacadenaCommented:
hotfixes.bat:

@ECHO OFF
ECHO.
::DATE
FOR /f "tokens=2-4 delims=/ " %%a in ('DATE/T') do SET CDATE=%%a-%%b-%%c
::TIME
FOR /F "tokens=1,2,3,4 delims=:., " %%a in ("%TIME%") do set CTIME=%%a:%%b:%%c


SET Verbose=1
:: Check command line parameter
IF NOT "%1"=="" IF /I NOT "%1"=="/V" GOTO Syntax

:: Check for correct Windows version
IF NOT "%OS%"=="Windows_NT" GOTO Syntax

:: Keep variables local
SETLOCAL

:: /V parameter set verbose display
IF /I "%1"=="/V" SET Verbose=1

:: Gather info from the registry
REGEDIT /E "%Temp%.\Hotfixes.dat" "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Hotfix"

:: Display header
ECHO. >> C:\AUTO\LOGS\%COMPUTERNAME%.LOG
ECHO ````````````````````````````````````````````````````````````````````````````````````````````````````````>> C:\AUTO\LOGS\%COMPUTERNAME%.LOG
ECHO %CDATE% %CTIME% >> C:\AUTO\LOGS\%COMPUTERNAME%.LOG
ECHO -HOTFIXES INSTALLED ON %COMPUTERNAME% >> C:\AUTO\LOGS\%COMPUTERNAME%.LOG

:: Summarize all hotfixes gathered from registry
FOR /F "tokens=7 delims=\" %%a IN ('TYPE "%Temp%.\Hotfixes.dat" ^| FIND "[HKEY_"') DO FOR /F "tokens=1 delims=]" %%A IN ('ECHO.%%a ^| FIND "]"') DO CALL :Summarize "%%A"

:: Remove temporary file
IF EXIST "%Temp%.\Hotfixes.dat" DEL "%Temp%.\Hotfixes.dat"

:: Done
ENDLOCAL
GOTO:EOF

:Summarize
SETLOCAL
SET Hotfix=%~1
:: No more details required
IF NOT "%Verbose%"=="1" (
      ECHO.%Hotfix%
      GOTO:EOF
)
:: Gather more details from the registry
REGEDIT /E "%Temp%.\Hotfixes.dat" "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Hotfix\%~1"
:: Retrieve the hotfix description from the temporary file we just created
FOR /F "tokens=1* delims==" %%a IN ('TYPE "%Temp%.\Hotfixes.dat" ^| FIND /I "Fix Description"') DO SET Description=%%~b
:: Escape brackets in the description, otherwise the ECHO command will fail
IF DEFINED Description SET Description=%Description:(=^^^(%
IF DEFINED Description SET Description=%Description:)=^^^)%
:: The whitespace in the following line is a tab
ECHO.%Hotfix%      %Description% >>C:\AUTO\LOGS\%COMPUTERNAME%.LOG

ENDLOCAL
GOTO:EOF

:DISPLAY
START C:\AUTO\LOGS\%COMPUTERNAME%.LOG

:Syntax
ECHO Hotfixes.bat,  Version 2.00 for Windows NT 4 / 2000
ECHO Displays a list of hotfixes installed locally
ECHO.
ECHO Usage:  HOTFIXES  [ /V ]
ECHO.
ECHO         /V  list both hotfix numbers and descriptions
ECHO.
ECHO Written by Rob van der Woude
ECHO http://www.robvanderwoude.com
GOTO:EOF


0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.