Monday, January 15, 2007

Netsh diag gui

Click Start, Run, type in Netsh diag gui and press enter. Run the system scan. Pretty neat, huh? You can get some of this information in other ways, but I can't think of an alternative that is this comprehensive and well-ordered.

You know what else is neat? If you save the results you'll get an HTML doc on your desktop. When run in your browser, you can click the + and - signs and still get the same information - handy if you need to share the system scan results with a tech.

But what I really liked about it was found in the source code of the saved file. Probably because I am relatively new to HTML and javascript, I am impressed at how the collection and formatting of the data is handled by a minimum amount of well-explained javascript and a style sheet. It amounts to 150 lines of initial code (much of it comments and brackets) to generate about 300 lines of html.

Perhaps this code could be useful in displaying any kind of hierarchical data, so it's kind of re-usable. If I were to change one thing though, it would be the use of ascii + and -. I would try to use a little gray and black gif, or maybe even better would be just clicking on the parent to expand/collapse the tree.