Click here to Skip to main content
15,396,257 members
Articles / Desktop Programming / WTL
Posted 2 Dec 2001


41 bookmarked

An Advanced Windows Hotfix Manager

Rate me:
Please Sign up or sign in to vote.
4.89/5 (8 votes)
3 Feb 20026 min read
An advanced utility that scans computers for missing hotfixes, and helps you download and install them.


In September, 2001, Microsoft released a tool called Hfnetchk that checks NT 4, Windows 2000, and Windows XP systems and generates a report of which hotfixes need to be installed. While this is a great idea, the tool is a console-mode program and only prints out a list of Knowledge Base article numbers; it doesn't list URLs or take you to the Knowledge Base articles about the hotfixes.

The program presented in this article is based on my article "A GUI Front-End for Microsoft's Hotfix Checker Utility". This new version of Windows Hotfix Checker (WHC) has several major improvements:

  • The interface is now a wizard, instead of a cluttered dialog.
  • This version uses the latest release of Hfnetchk, version 3.2.
  • This version supports downloading hotfixes, as well as installing them on the local computer,.

System requirements: NT 4 with IE 5 or later, Windows 2000, or Windows XP. The reporting feature requires IE 5.5 or later, but everything else will work with IE 5.

Overview of WHC's Features

First and foremost, WHC is a front-end for Microsoft's hotfix checking program, Hfnetchk. (See the Knowledge Base article on Hfnetchk for more details.) WHC runs Hfnetchk, captures its output, and shows a report on hotfixes that need to be installed. WHC can scan the local computer, as well as remote computers on which you have administrator privileges.

Once you've scanned for necessary hotfixes, WHC can also download them from Microsoft. Note that some hotfixes are not directly downloadable, so you will need to visit Microsoft's site for download instructions. However, finding the right page is simple - WHC's detailed hotfix report includes hyperlinks to the Microsoft security bulletin and Knowledge Base article for each hotfix.

Finally, once you have downloaded the necessary hotfix installers, WHC can run them for you. OS hotfixes are often chainable, meaning you can install several at once without having to reboot after each hotfix is installed. WHC supports this as well, using Microsoft's Qchain utility.

Scanning for Hotfixes

Run WHC, and click Next from the introduction page. You'll see this screen:

 [External programs page - 37K]

If you haven't downloaded Hfnetchk, click the Download Hfnetchk hyperlink to go to the download page at Microsoft's web site. Once you've installed it, enter the path to Hfnetchk.exe and click Next.

The next screen asks whether you want to scan for needed hotfixes, or run hotfix installers. Click Scan computers for necessary hotfixes and click Next. The next panel is where you tell WHC where Hfnetchk's data file is.

 [XML file location page - 38K]

The data file is an XML file that contains a list of all available hotfixes, and is used by Hfnetchk during its scanning. If you have not run Hfnetchk 3.2 before, click Download a new data file and click Next. If there is already a data file in the same directory as Hfnetchk, WHC will find it and fill in its path for you. If you have not downloaded the data file in a few days, it's a good idea to download a new copy, since Microsoft is continually updating the file with new hotfixes.

The next panel lets you choose which computers to scan, and set some Hfnetchk options.

 [Hfnetchk options page - 38K]

Hfnetchk supports scanning just the local computer, a remote computer, or an entire NT domain. On Windows 2000 and later, it can also scan an IP address, or a range of IP addresses. The remaining options customize Hfnetchk's reporting behavior. For more details about customizing Hfnetchk, click the Hfnetchk Knowledge Base article hyperlink. Click Next to begin the scan.

Once Hfnetchk is finished, WHC will show a list of missing hotfixes that Hfnetchk reported.

 [List of missing hotfixes - 33K]

This list shows a brief description of each hotfix, along with the product it applies to, and the computer where that product is installed. For a more detailed report, which includes links to Microsoft's security bulletins and Knowledge Base articles, click the More Details button.

Downloading Hotfix Installers

After running a scan as described above, click Next. Click Download hotfix installers, then click Next. If any hotfix installers are directly downloadable, you'll see them in a list, as pictured below:

 [List of hotfixes to download - 33K]

Check the box next to the hotfix installers you want to download, and enter a directory to store the files in. Click Next to begin downloading.

Note that not all hotfixes are directly downloadable. The XML data file lists download locations for each hotfix, but often, the locations listed are web pages, not direct links to EXEs. WHC can download only those hotfixes which are listed as EXEs in the XML file. For the others, you'll need to visit the Microsoft web pages and follow the download instructions there.

When you click Next, WHC begins downloading the hotfix installers you selected and shows a progress indicator:

 [Download progress - 37K]

Installing Hotfixes

WHC can also run hotfix installers for you. WHC offers to do this after you download hotfix installers as described above, but you can also choose to install hotfixes from the second wizard panel. WHC requires another Microsoft tool call Qchain, which is used when installing multiple hotfixes at once.

On the Downloading external programs panel, there is an edit box where you enter the path to Qchain. If you don't have Qchain, click the Download Qchain hyperlink to go to the Microsoft web page on Qchain. Once you've installed it, enter its path as shown below:

 [External programs page - 38K]

Click Next to go to the Select task to carry out panel. Click Install hotfixes on this computer, then click Next. You will see the Select hotfixes to install panel:

 [Hotfixes to install - 36K]

Click Add Files and select hotfix installers to add to the list. You can also click Search Folder to have WHC find hotfix installers in a particular directory. WHC looks for EXE files staring with Q, but excluding qchain.exe.

Note: It's very important to verify that the hotfixes you add to the list are chainable. Most operating system hotfixes are chainable, and their names follow the pattern of Qnnnnnn_W2K_SP3_x86_en.exe where nnnnnn is the KB article number. Normally, you are required to restart the computer after applying a hotfix, but chainable hotfixes do not have this requirement. Check the Knowledge Base article for each hotfix if you are unsure if a hotfix is chainable.

Click Next, and WHC will run the selected installers. It is normal to see some progress dialogs as the installers do their tasks. Once all installers have been run, WHC runs Qchain to finish up the chaining process. It then goes to the finishing wizard page. Click Finish, then restart your computer to complete the hotfix installation.


Find out more about hotfixes in these Knowledge Base articles:


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

Michael Dunn
Software Developer (Senior) VMware
United States United States
Michael lives in sunny Mountain View, California. He started programming with an Apple //e in 4th grade, graduated from UCLA with a math degree in 1994, and immediately landed a job as a QA engineer at Symantec, working on the Norton AntiVirus team. He pretty much taught himself Windows and MFC programming, and in 1999 he designed and coded a new interface for Norton AntiVirus 2000.
Mike has been a a developer at Napster and at his own lil' startup, Zabersoft, a development company he co-founded with offices in Los Angeles and Odense, Denmark. Mike is now a senior engineer at VMware.

He also enjoys his hobbies of playing pinball, bike riding, photography, and Domion on Friday nights (current favorite combo: Village + double Pirate Ship). He would get his own snooker table too if they weren't so darn big! He is also sad that he's forgotten the languages he's studied: French, Mandarin Chinese, and Japanese.

Mike was a VC MVP from 2005 to 2009.

Comments and Discussions

Generalhfnetchk 3.2 Pin
5-Apr-02 10:22
suss5-Apr-02 10:22 
GeneralRe: hfnetchk 3.2 Pin
Michael Dunn6-Apr-02 4:48
sitebuilderMichael Dunn6-Apr-02 4:48 
General%1 is not a valid win32 application Pin
17-Mar-02 19:35
suss17-Mar-02 19:35 
GeneralRe: %1 is not a valid win32 application Pin
Michael Dunn17-Mar-02 20:37
sitebuilderMichael Dunn17-Mar-02 20:37 
GeneralRe: %1 is not a valid win32 application Pin
BTP Holdings30-Nov-04 16:15
MemberBTP Holdings30-Nov-04 16:15 
GeneralRe: %1 is not a valid win32 application Pin
Michael Dunn30-Nov-04 16:25
sitebuilderMichael Dunn30-Nov-04 16:25 
GeneralRe: %1 is not a valid win32 application Pin
BTP Holdings30-Nov-04 18:22
MemberBTP Holdings30-Nov-04 18:22 
GeneralCrash Pin
Eric Lapouge18-Feb-02 19:05
MemberEric Lapouge18-Feb-02 19:05 
I just downloaded your program and tried to make it work on my W2K box, and it crashed.
So I was obliged to dig in your source-code and changed two things:
1) Comment the define CREATEPROCESS_MANIFEST_RESOURCE_ID 1 line in the resource.h file, to avoid a warning (I have the last PSDK installed)
2) Changed the ThreadFunc function in the RunningHfnetchkPage.cpp file to avoid the crash (it seems to happen when you have a line with no information, just like for SQL-Server (just my case):

// Use the bulletin ID to find the <bulletin> node corresponding to
// this hotfix.
CComPtr<ixmldomelement> pElt = m_mapBulletinNodes[ info.sBulletin ];
if (NULL != (LPVOID)pElt)
// Now we have the <bulletin> node for this bulletin. Get various
// attributes from the node: FAQ page name, bulletin title, bulletin
// description.
CComVariant vAttr;
CString sBulletinLocID, sFAQLocationID;

pElt->getAttribute ( ATTRNAME_TITLE, &vAttr );
info.sTitle = vAttr.bstrVal;

pElt->getAttribute ( ATTRNAME_ISSUE, &vAttr );
info.sIssue = vAttr.bstrVal;

// Construct the bulletin URL.
pElt->getAttribute ( ATTRNAME_BULLETIN_LOC_ID, &vAttr );
sBulletinLocID = vAttr.bstrVal;

info.sBulletinURL.Format ( _T("%s/%s.asp"),
(LPCTSTR) m_mapLocations[sBulletinLocID],
(LPCTSTR) info.sBulletin );

// Construct the FAQ URL.
pElt->getAttribute ( ATTRNAME_FAQ_NAME, &vAttr );
info.sFAQPageName = vAttr.bstrVal;

pElt->getAttribute ( ATTRNAME_FAQ_LOCATION_ID, &vAttr );
sFAQLocationID = vAttr.bstrVal;

info.sFAQURL.Format ( _T("%s/%s"),
(LPCTSTR) m_mapLocations[sFAQLocationID],
(LPCTSTR) info.sFAQPageName );

// Construct the KB article URL.
long lArticleNum = _ttol ( 1 + (LPCTSTR) info.sKBNumber); // +1 to skip Q prefix

if ( lArticleNum > 0 )
info.sKBURL.Format ( _T(""),
lArticleNum / 1000, (lArticleNum / 100) % 10,
lArticleNum % 100 );

// Find the <patch> nodes under the <bulletin>
CComPtr<ixmldomnodelist> pPatchList;
long lListLen;

pElt->getElementsByTagName ( CComBSTR("Patch"), &pPatchList );
pPatchList->get_length ( &lListLen );

for ( long l = 0; l < lListLen; l++ )
CComPtr<ixmldomnode> pPatchNode;
CComQIPtr<ixmldomelement> peltNode;
CComVariant v;
CString sSQNumber, sPatchName, sPatchLocID;

pPatchList->get_item ( l, &pPatchNode );
peltNode = pPatchNode;

peltNode->getAttribute ( CComBSTR("SQNumber"), &v );
sSQNumber = v.bstrVal;

if ( sSQNumber == info.sKBNumber )
peltNode->getAttribute ( CComBSTR("PatchName"), &v );
sPatchName = v.bstrVal;

peltNode->getAttribute ( CComBSTR("PatchLocationID"), &v );
sPatchLocID = v.bstrVal;

info.sPatchURL = m_mapLocations[sPatchLocID];

LPTSTR psz = PathFindFileName ( info.sPatchURL );

info.bDirectDownload = (0 == lstrcmpi ( psz, sPatchName ));


// Add this patch's info to our array.
g_aPatchInfo.Add ( info );
Wink | ;) Eric
GeneralUPDATE - Hfnetchk 3.2 installer Pin
Michael Dunn14-Feb-02 8:13
sitebuilderMichael Dunn14-Feb-02 8:13 
QuestionQuestion? Pin
nums14-Feb-02 3:33
Membernums14-Feb-02 3:33 
AnswerRe: Question? Pin
Michael Dunn14-Feb-02 8:14
sitebuilderMichael Dunn14-Feb-02 8:14 
GeneralHF installer v 3.2 not working Pin
13-Feb-02 2:35
suss13-Feb-02 2:35 
GeneralRe: HF installer v 3.2 not working Pin
jginspace14-Aug-04 3:29
Memberjginspace14-Aug-04 3:29 
Generalhfnetchk v3.3 Pin
10-Feb-02 23:10
suss10-Feb-02 23:10 
GeneralCould not find the file atlres.h :( Pin
Dan Bright6-Feb-02 5:07
MemberDan Bright6-Feb-02 5:07 
GeneralRe: Could not find the file atlres.h :( Pin
Michael P Butler6-Feb-02 5:20
MemberMichael P Butler6-Feb-02 5:20 
GeneralUPDATE - link to Hfnetchk 3.2 added Pin
Michael Dunn4-Feb-02 12:57
sitebuilderMichael Dunn4-Feb-02 12:57 
GeneralRe: UPDATE - link to Hfnetchk 3.2 added Pin
12-Feb-02 5:04
suss12-Feb-02 5:04 
GeneralRe: UPDATE - link to Hfnetchk 3.2 added Pin
12-Feb-02 5:17
suss12-Feb-02 5:17 
GeneralRe: UPDATE - link to Hfnetchk 3.2 added Pin
jginspace14-Aug-04 2:50
Memberjginspace14-Aug-04 2:50 
GeneralRe: UPDATE - link to Hfnetchk 3.2 added Pin
12-Feb-02 5:25
suss12-Feb-02 5:25 
GeneralArgh, stupid MS broke WHC again. Pin
Michael Dunn1-Feb-02 17:30
sitebuilderMichael Dunn1-Feb-02 17:30 
GeneralRe: Argh, stupid MS broke WHC again. Pin
4-Feb-02 6:39
suss4-Feb-02 6:39 
GeneralAnother and better solution for hotfix hell. Pin
gstorm@san.rr.com28-Jan-02 21:19
Membergstorm@san.rr.com28-Jan-02 21:19 
GeneralRe: Another and better solution for hotfix hell. Pin
21-May-02 7:41
suss21-May-02 7:41 

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

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