Bootstrapper for .NET framework version detector

You wrote your .NET program, that can be used as stand alone portable application (such as it should be for Smart Client Apps), however you have to be sure, that necessary prerequisites (such as .NET framework) are installed on client’s machine. What to do? How to detect .NET framework version installed on target machine before running .NET application. The answer is – to use unmanaged C++ bootstrapper, that invoke your application if correct version of framework is installed.

.NET framework vrsion detector

Until now there are 15 possible .NET frameworks can be installed on client’s machine. Here the table of possible and official supported versions, as appears in Q318785

.NET version Actual version
3.5 SP1 3.5.30729.1
3.5 3.5.21022.8
3.0 SP2 3.0.4506.2152
3.0 SP1 3.0.4506.648
3.0 3.0.4506.30
2.0 SP2 2.0.50727.3053
2.0 SP1 2.0.50727.1433
2.0 2.0.50727.42
1.1 SP1 1.1.4322.2032
1.1 SP1 (in 32 bit version of Windows 2003) 1.1.4322.2300
1.1 1.1.4322.573
1.0 SP3 1.0.3705.6018
1.0 SP2 1.0.3705.288
1.0 SP1 1.0.3705.209
1.0 1.0.3705.0

All of those versions are detectible by queering specific registry keys. However, in some cases, you need to load mscoree.dll and call “GETCOREVERSION” API to determine whether specific version of .NET is installed. You can read more about it in MSDN.

So it’s really simple to write small C++ application (or PowerShell applet), that queries registry and invoke your managed application. How to do this? You can either read about it in outstanding blog of Aaron Stebner, who is Project Manager in XNA platform deployment team or attend my session next week to learn do it yourself. We’ll speak about nifty ways to do it also.

Anyway, by now, you can use small stand alone program, I wrote a while ago, that will tell you all versions of .NET frameworks installed in target machine without any prerequisites. It can be run even from shared network location :)

Download whoooot.exe (13K) >>

See you next week.

PS: Do not forget to download and install the new version of Visual Studio Snippet Designer, which is extremely useful tool by MVP Bill McCarthy, you’ll need it later next week…

Have a nice day and be good people.

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DotNetKicks
  • DZone
  • Live
  • Reddit
  • TwitThis
  • email
  • Slashdot
  • StumbleUpon

You may also be interested with:

  1. New version of Hebrew and Arabic support for Silverlight was released
  2. Some new in-mix downloads
  3. USB FM radio library was published on CodePlex
  4. WPF Line-Of-Business labs and Silverlight vs. Flash
  5. Making TFS better or what is TITS?

5 Responses to “Bootstrapper for .NET framework version detector”

  1. Govindaya Says:

    There is obviously a lot to know about this. I think you made some good points in Features also.

  2. john thomas Says:

    Hey, thanks for writing this little thing. I forget to thank you coders who write these apps for the heck of it but they make life much easier.
    best,
    jt, California

  3. .NET Framework Detector: Averigua si tienes instalado las últimas librerias Says:

    [...] [link] AKPC_IDS += "4890,"; « Paint.Net 3.5 Final [...]

  4. Rub3n CT Says:

    Cool program, but could include Microsoft .NET Framework 4.0 (Beta 2)

  5. .Net Framework Version Detector, scopri la versione di .NET Framework installata « valkiro Says:

    [...] .Net Framework Version Detector è il software da utilizzare per verificare la presenza o meno delle librerie Microsoft .Net Framework e anche la loro versione, si tratta di un piccolissimo file eseguibile che non va nemmeno installato (software portatile), basta avviarlo e attendere pochissimi secondi per avere subito i risultati della ricerca. [...]

Leave a Reply

Recommended

 


Sponsor


Partners

WPF Disciples
Dreamhost
Code Project
Switched to Better Place

Together