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.
wmic qfe list
To redirect output to text file:
wmic qfe list > hotfixes.txt