Tuesday, May 27, 2008

Displaying System Info the way Office does

Office 2003 had a button 'System Info' on the about page.

It brought up a dialog with the title 'System Information'

This dialog, which is actually another application displays sections for:
-Hardware Resources
-Components
-Software Environment
-Internet Settings
and others.

This is handy information when troubleshooting issues on a clients computer. By putting a button on your application to launch this, you lower the mental barrier for your clients.

Now using task manager you can see this results in the process 'helpctr.exe'.
But if you run it directly you get the application running with the title 'Help and Support Center'.
Alas it has no command line help switch (/? -? /help).
What office is does is call 'msinfo.exe' which in turn invokes:
%windir%\pchealth\helpctr\binaries\helpctr.exe -mode hcp://system/sysinfo/msinfo.xml

Here 'msinfo.xml' provides some configuration information. Try messing with the 'Width' and 'Height' elements to see this. But what is most important is that the element 'TopicToDisplay' which has a with value 'msinfo.htm' controls which topic, in the form of an HTML page, is loaded.

You can experiment with this. Save a copy and change to 'TopicToDisplay' to 'sysHealthInfo.htm'. Then invoke 'helpctr' with your altered XML file.

permalink

No comments: