Jump to content

How to get a list of Office hotfixes installed?


Recommended Posts

Posted

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


Posted

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

Posted

Oops, sorry... Well, I dont know about WMI class for Office, sorry :( Dont even think so there is something like this.

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

Posted
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.

Posted

For your scenario is ideal to use WSUS + Detect Only on all machines. Simple to create and powerfull scenario, I used it when I need to detect what paches I need to approve

Posted

Well... That won't be an option : We use Novell / Tivoli. Our computers are in workgroup, netbios disabled, no domain, no AD :blushing:

But I think I can manage something with these tools.

Posted

Alright, job done!

Using inventory.exe and then convert.exe enables me to create a .csv file with all the info I need.

Thanks for everyone's help!

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

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