jean table Posted June 22, 2005 Share Posted June 22, 2005 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 More sharing options...
rc00451 Posted June 22, 2005 Share Posted June 22, 2005 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 OFFECHO.:: Check command line parameterIF NOT "%1"=="" IF /I NOT "%1"=="/V" GOTO Syntax:: Check for correct Windows versionIF NOT "%OS%"=="Windows_NT" GOTO Syntax:: Keep variables localSETLOCAL:: /V parameter set verbose displayIF /I "%1"=="/V" SET Verbose=1:: Remove temporary fileIF EXIST "%systemdrive%\Hotfixes.dat" DEL "%systemdrive%\Hotfixes.dat":: Gather info from the registryREGEDIT /E "%systemdrive%\Hotfixes.dat" "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Hotfix":: Display headerECHO Hotfixes installed on this PC:ECHO.:: Summarize all hotfixes gathered from registryFOR /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":: DoneENDLOCALGOTO:EOF:SummarizeSETLOCALSET Hotfix=%~1:: No more details requiredIF NOT "%Verbose%"=="1" ( ECHO.%Hotfix% GOTO:EOF):: Gather more details from the registryREGEDIT /E "%systemdrive%\Hotfixes.dat" "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Hotfix\%~1":: Retrieve the hotfix description from the temporary file we just createdFOR /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 failIF DEFINED Description SET Description=%Description:(=^^^(%IF DEFINED Description SET Description=%Description:)=^^^)%:: The whitespace in the following line is a tabECHO.%Hotfix% %Description%ENDLOCALGOTO:EOF:SyntaxECHO Hotfixes.bat, Version 2.00 for Windows NT 4 / 2000 / XPECHO Displays a list of hotfixes installed locallyECHO.ECHO Usage: HOTFIXES [ /V ]ECHO.ECHO /V list both hotfix numbers and descriptionsECHO.ECHO Written by Rob van der WoudeECHO http://www.robvanderwoude.comGOTO:EOF Link to comment Share on other sites More sharing options...
Martin Zugec Posted June 22, 2005 Share Posted June 22, 2005 Wmic qfe list fullIs that what you are looking for? Link to comment Share on other sites More sharing options...
Martin Zugec Posted June 22, 2005 Share Posted June 22, 2005 BTW Full WMI class is Win32_QuickFixEngineering Link to comment Share on other sites More sharing options...
jean table Posted June 22, 2005 Author Share Posted June 22, 2005 Thanks. That's a nice batch. But it lists Windows Hotfixes, not Office. Link to comment Share on other sites More sharing options...
jean table Posted June 23, 2005 Author Share Posted June 23, 2005 Wmic qfe list fullIs that what you are looking for?<{POST_SNAPBACK}>Thanks. I looked into it, but no, it's not what I'm looking for. It lists system hotfixes. Office patches are not present.I'm getting deperate... Link to comment Share on other sites More sharing options...
Martin Zugec Posted June 23, 2005 Share Posted June 23, 2005 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? Link to comment Share on other sites More sharing options...
jean table Posted June 23, 2005 Author Share Posted June 23, 2005 What do you need it for? Wouldnt MBSA be enough for you?<{POST_SNAPBACK}>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.aspxWhen 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 More sharing options...
Martin Zugec Posted June 23, 2005 Share Posted June 23, 2005 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 Link to comment Share on other sites More sharing options...
jean table Posted June 23, 2005 Author Share Posted June 23, 2005 Well... That won't be an option : We use Novell / Tivoli. Our computers are in workgroup, netbios disabled, no domain, no AD But I think I can manage something with these tools. Link to comment Share on other sites More sharing options...
Martin Zugec Posted June 23, 2005 Share Posted June 23, 2005 You can use WSUS even if you dont have AD... It is distributed through reg files. I am using this option and it works well Link to comment Share on other sites More sharing options...
jean table Posted June 23, 2005 Author Share Posted June 23, 2005 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! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now