Click here to Skip to main content
Licence 
First Posted 26 Jul 2005
Views 34,597
Bookmarked 10 times

Extract Windows XP Hotfix

By | 7 Sep 2005 | Article
This article gives a class that extracts Windows XP hotfix installed on a computer.

What does the code do

This class extracts Windows XP hot-fix installed on a computer.

Enumerate all entries of the registry key: "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\HotFix" and focalize on the value "Fix Description".

How to use it

It's simple :). Declare an object of the CXP_Hotfix class, named "hf".

CXP_Hotfix hf;

Now we can use it in, here is a little example:

  int nb_hotfix;
  nb_hotfix = hf.m_aHotFix.GetCount();

  if (nb_hotfix > 0) // display only if there is at least 1 Hotfix
  {

      // loop until we find an Hotfix and display it (them).
      for (int a = 0; a < hf.m_aHotFix.GetCount(); a++)
      {
         printf("%s\r\n", hf.m_aHotFix[a]);
      }
     
      printf("\r\n");
    
      // here we show number of Hotfix found.
      printf("Found %i Windows XP Hot-fix installed.\r\n\r\n", 
                                     hf.m_aHotFix.GetCount());
  }

  else // No Hotfix was found.
  {
      printf("No Windows XP Hot-fix installed.\r\n\r\n");
  }

That's all.

Inspirations

I had the idea to write this code when I saw the code of Robert Edward Caldecott's to get the list of installed applications (CinstalledSoftware).

Restrictions

This code runs well on Windows XP SP1; for other Windows versions, I don't know, sorry..

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

$icK$



France France

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionDocumentation/illustration of class? PinsussAnonymous5:26 27 Jul '05  
AnswerRe: Documentation/illustration of class? Pinmembersicks11:26 27 Jul '05  
GeneralRe: Documentation/illustration of class? PinmemberJörgen Sigvardsson11:26 7 Sep '05  
GeneralRe: Documentation/illustration of class? PinsussSicks13:04 7 Sep '05  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web04 | 2.5.120517.1 | Last Updated 7 Sep 2005
Article Copyright 2005 by $icK$
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid