Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm looking to find out if a KB is installed via command line.

share|improve this question
add comment

3 Answers

up vote 13 down vote accepted

In addition to systeminfo there is also wmic qfe

Example:

wmic qfe get hotfixid | find "KB99999"
wmic qfe | find "KB99999"

There is also update.exe

Or from powershell, just adjust it for your needs:

Get-WmiObject -query 'select * from win32_quickfixengineering' | foreach {$_.hotfixid}
share|improve this answer
    
How I've done it in the past. Really easy with psexec, but keep in mind the find command might not work unless you specify stdout instead of the weird hybrid crap wmic spits out on a regular basis. wmic /output:stdout qfe get hotfixid | find "KB99999". –  ajstein Apr 27 '11 at 11:59
add comment

run "systeminfo" in a CMD window and it will pull back a load of statistics about your system including what patches are installed.

share|improve this answer
add comment

Some other possibilities: Grep %windir%\Windowsupdate.log for the KB number. Or use reg.exe to export the corresponding install keys.

share|improve this answer
    
My Windows didn't come with grep. I have to use find. –  jscott Apr 27 '11 at 13:50
    
@jscott: I know that grep is non-standard on Windows :-) Find or findstr would be more suitable. But I used the word grep here as in "to grep" to indicate the process in stead of literally meaning the utility "grep". Using grep as a verb is very common in the Unix circles I normally operate in, so I used the term more or less without thinking it might look odd to a Windows guy. –  Tonny Apr 28 '11 at 10:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.