Windows: List Installed OS Hotfixes and Service Packs from the Command Line

Posted August 3, 2008 by Rob Rogers in Windows

Want a quick list of hotfixes and service packs that are installed on your Windows PC or Server? By using the Windows Instrumentation command-line interface (WMIC) you can create a quick list. This Tech-Recipe applies to Windows XP Professional, Windows Vista, Windows Server 2003 and Windows Server 2008.


1. Open a command prompt.

2. Execute the following command:
wmic qfe list

A list of all service packs and hotfixes for your operating system will be listed.

If you want to generate a text or HTM file for printing, execute the following:

to generate a textfile:
/output:d:\hotfixes.txt qfe list

to generate a HTM file:
/output:d:\hotfixes.htm qfe list

 

About Rob Rogers

Once a prolific author here on Tech-Recipes, Rob has moved on to greener pastures.
View more articles by Rob Rogers

The Conversation

Follow the reactions below and share your own thoughts.

  • kwhoff

    Typing “systeminfo” from the command provides this information as well. It includes extra info as well. If you only want a list of QFE numbers the wmic call is probably the easiest way.

  • Donmhr

    Both options still work in Windows 7.

  • kat

    this really works

  • nah

    Thanks for this tip. WMIC better than Systeminfo as it shows who installed the patch and the date and time. In corporate envionronments with crap politics this snippet of info can be handy….

  • Felix

    This is a usefull command indeed however this will only list “Windows” related updates. In other words, this will not list the updates for DotNet Framework or the Office Suite.

    You could run the following command to see everything that is installed on your computer:
    ————————
    wmic product list > installed.txt
    ———————–
    (This will basicaly outpout what you see in the “Add Remove Program” list in a file called installed.txt inside the directory that you have been running the command.)

    However this command does not provide the HotfixID (KB numbers) so it does not resolve the problem either.

    If anyone finds a way to list ALL the updates (not only windows ones) hit me up!

    • Namah

      I found a list of the Windows KB——– update numbers this way.

      I had a power failure during a windows update and my Vista Home Premium computer locked on the update 3 of 3 Updates 0% and then would shut down and reboot, over and over and over…… I couldn’t boot to Safe Mode or to System Restore, it said I had no saved restores which was not true!! So I selected System Recovery Options and selected the DOS Prompt.
      I found a list of the Windows KB——– update numbers this way.
      I booted to the DOS prompt from the System Recovery Options screen after selecting F8
      It looked like this
      C:\
      Then I did a directory search by typing (dir /p) in front of the C:\ and press ENTER, then you see,
      C:\dir /p
      To scroll through all the files and folders you have to press ENTER several times. I then went into the windows directory by typing cd windows in front of the C:\ and press ENTER.
      C:\cd windows It came up as,
      C:\Windows>

      I did a directory search (dir /p) of the Windows folder which looks like
      C:\Windows>dir /p and press ENTER

      (In the Dos window the /p lets you scroll throw the pages if there are more than one otherwise DOS just zips through them to the bottom so fast and you can’t read it and you can’t see all the way to the right side of the page which I needed to see all the numbers of the updates in the windowsupdate.log file)

      Near the bottom of the dir list I found the file, windowsupdate.log
      Next, directly behind the C:\Windows> I typed in the command line: windowsupdate.log /p
      It looked like this,
      C:\Windows>windowsupdate.log and pressed ENTER

      The update log file opened in Windows Notepad. I had use of my mouse and I was able to scroll through it up and down and side to side. I went to the bottom of the file and scrolled up until I found the last update that kept saying:
      Shutdown InstallAtShutdown got Install progress.
      Shutdown InstallAtShutdown got Install progress.
      Shutdown InstallAtShutdown got Install progress. OVER and OVER
      Just above all that is where I found KB978886~31bf3856ad364e35~x86~6.0.1.2

      By selecting File/Save As I was able to save the file on a USB flash drive.

      In the File Save As window, I was able to also click My Computer on the left, then doulble clicking a drive, my folders were there but you can’t read any of the files or pictures because Notepad Save As is in ANSI type file only. But you can RIGHT CLICK ONE FOLDER at a time and select copy. Then you have to select the Arrow at the end of the “Look In” bar at the top and select the drive you want to save to. When that drive is open in the window right click again inside the blank window and select paste. You have to go back and repeat these steps for each folder with files or pictures you want to keep and copy them one folder at a time.

      I haven’t figured our how to delete the update that is locked on install but by doing the following steps I was able to access and copy all my files I needed to save before putting my computer back to factory and starting over. I double checked this by connecting that external hard drive to my desktop computer and accessing all the files and pictures and they were all there.

      Hope this helps someone, Namah

  • tracy

    When i tried this it only lists 2 programs out of 15 that are actually on startup list

    • Can you describe what you did? This program lists the uninstallable programs from the Add and Remove programs list not the startup list. Shoot us an e-mail at help @helptual.com and let’s see what is happening.

  • If you download the program Helptual Viewer or Pro you can easily view hotfixes and installed programs with a few simple clicks – the best part is you can even do it for remote PC’s as well. Check out the program at http://www.helptual.com