Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to list out hotfixes installed via command prompt

Posted on 2007-07-23
5
Medium Priority
?
8,505 Views
Last Modified: 2008-01-09
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.
0
Comment
Question by:exhaust
4 Comments
 
LVL 7

Accepted Solution

by:
oriziv earned 1000 total points
ID: 19553759
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
 
LVL 14

Expert Comment

by:inbarasan
ID: 19554210
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
 
LVL 2

Expert Comment

by:clesius
ID: 19559556
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
 
LVL 5

Expert Comment

by:usacadena
ID: 19614333
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

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of my most closely kept secrets is revealed in this discussion How to output text on the same line This question was recently posted in EE by Simon336697 (http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_2459…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question