Jump to content

How to get a list of Office hotfixes installed?


jean table

Recommended Posts

Hi.

I'm trying to find a way to identify which hotfixes have been installed on a computer. I've searched the registry with no luck. I wonder if there would be a way through the use of WMI...

Any help greatly appreciated.

Thanks

Link to comment
Share on other sites


Try this (copy and past in Notepad, save-as "hotfixes.bat")

Tested on NT4, W2K and XP.

Output can be redirected, eg "hotfixes >fixes.txt"

@ECHO OFF

ECHO.

:: 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

:: Remove temporary file

IF EXIST "%systemdrive%\Hotfixes.dat" DEL "%systemdrive%\Hotfixes.dat"

:: Gather info from the registry

REGEDIT /E "%systemdrive%\Hotfixes.dat" "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Hotfix"

:: Display header

ECHO Hotfixes installed on this PC:

ECHO.

:: Summarize all hotfixes gathered from registry

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

:: 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 "%systemdrive%\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 "%systemdrive%\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%

ENDLOCAL

GOTO:EOF

:Syntax

ECHO Hotfixes.bat, Version 2.00 for Windows NT 4 / 2000 / XP

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

Link to comment
Share on other sites

What do you need it for? Wouldnt MBSA be enough for you?

I need it to make an inentory of hotfixes installed on our computers, so we know which needs what. This cannot be done automatically through MBSA.

But I might have found what I need here : http://office.microsoft.com/en-us/assistan...1402491033.aspx

When I look at the way this works, I understand why I haven't found it out all by myself.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...