Click here to Skip to main content
Licence CPOL
First Posted 10 Jun 2007
Views 34,104
Downloads 628
Bookmarked 85 times

XFxDetect - A utility to detect which versions of .Net are installed

By | 12 Mar 2011 | Article
XFxDetect inspects registry and file system of local or remote computer to determine which versions of .Net Framework are installed.

Introduction

I wrote XFxDetect to help in diagnosing problems with .Net installations, because I found that some of the available diagnostic tools did a very superficial job, reporting that a .Net version was installed when it obviously was not. There are many web sites - on MSDN and private blogs - that document the registry locations and folders used by the .Net Frameworks. What was needed, I felt, was utility that cross-checked registry locations with what actually existed in file system folders. This is what XFxDetect attempts to do.

Note that XFxDetect is only a diagnostic tool - it makes no attempt to repair or modify any registry setting or file.

How It Works

When you run XFxDetect, it scans first registry and then file system for evidence of .Net Frameworks (1.0, 1.1, 2.0, 3.0, and 3.5) and their service packs. Any discrepancy between registry and what exists on disk is immediately apparent.

screenshot

You can also view details of which registry settings and folders are being checked:

screenshot

screenshot

The Settings dialog allows you to select remote computer and to enable logging:

screenshot

After selecting remote computer, click on Refresh to display the results:

screenshot

XFxDetect Log File

The log file records information gathered by XFxDetect:

screenshot

In the above screenshot, the five released versions of the .Net Framework (1.0, 1.1, 2.0, 3.0, 3.5) are highlighted (0 = not detected, 1 = detected). Each line indicates source of data (local or remote computer name), and whether information was collected from registry or file system.

Accessing Remote Computers

The Settings dialog (see screenshot above) allows you to select remote computer by entering computer name and, optionally, name of file share. The file share name is used to access files on the remote computer's drive where .Net Framework files are installed. Typically, this is C: drive. In some corporate environments, C: drive is set up with standard share name, such as "C". You may have to enter password before you can access remote drive - quick way to check this is to use Windows Explorer to access C: drive on remote computer. If you need to enter username and password, you will be asked for them, and then you can run XFxDetect to gather information from remote computer.

Accessing remote computer registry and file system may require you to start some services that are not normally running. In the following screenshot from Vista, three services needed to be started before access was possible:

screenshot

Limitations

  • Currently only the standard .Net Framework folders are checked.

References

Revision History

Version 2.0 — 2011 March 2

  • Added support for .NET 4.0
  • Converted to VS2008

Version 1.0 — 2007 June 8

  • Initial public release

Usage

This software is released under the Code Project Open License (CPOL). You are free to use this software in any way you like, except that you may not sell this source code. This software is provided "as is" with no expressed or implied warranty. I accept no liability for any damage or loss of business that this software may cause.



License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Hans Dietrich

Software Developer (Senior)
Hans Dietrich Software
United States United States

Member

I attended St. Michael's College of the University of Toronto, with the intention of becoming a priest. A friend in the University's Computer Science Department got me interested in programming, and I have been hooked ever since.
 
Recently, I have moved to Los Angeles where I am doing consulting and development work.
 
For consulting and custom software development, please see www.hdsoft.org.







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
GeneralMy vote of 5 PinmvpKanasz Robert2:19 17 Jan '12  
GeneralMy vote of 5 Pinmemberigetorix23:15 24 Mar '11  
GeneralMy vote of 5 Pinmemberhikaru7:55 15 Mar '11  
GeneralClient Profile PinmemberSeverin Meyer4:39 3 Mar '11  
GeneralRe: Client Profile PinmentorHans Dietrich14:16 13 Mar '11  
GeneralMy vote of 5 Pinmembermarco_ragogna0:41 3 Mar '11  
Questionupdates for .net 4.0 ?? Pinmemberalhambra-eidos3:57 2 Mar '11  
AnswerRe: updates for .net 4.0 ?? PinmentorHans Dietrich19:47 2 Mar '11  
GeneralUsername and password for remote computers PinmemberDimondWolfe5:23 19 Oct '09  
QuestionRe: Username and password for remote computers PinmemberDavidCrow6:22 8 Mar '11  
AnswerRe: Username and password for remote computers PinmemberDimondWolfe6:33 8 Mar '11  
GeneralV6.0 Doesn't Compile PinmemberNice Life19:50 18 Jun '07  
GeneralRe: V6.0 Doesn't Compile PinmvpHans Dietrich0:34 19 Jun '07  
GeneralBut don't you need .NET... PinprotectorMarc Clifton2:06 11 Jun '07  
...to run the app?
 
Marc
 

GeneralRe: But don't you need .NET... PinmemberNordin Rahman4:25 11 Jun '07  
GeneralRe: But don't you need .NET... PinmvpNishant Sivakumar4:33 11 Jun '07  
GeneralCool! PinmvpNishant Sivakumar1:43 11 Jun '07  

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.120529.1 | Last Updated 12 Mar 2011
Article Copyright 2007 by Hans Dietrich
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid