locked
Detect .NET Framework RRS feed

  • Question

  • Is their an application, not written in .NET that i can use to write a system to check for the correct version of the .NET Framework, and if its not installed start the .NET Framework installer, then once thats done or it it already exists run my installer which i have written in .NET to install my .NET application.
    Monday, December 25, 2006 5:15 PM

All replies

  • there maybe a way however if you are using ClickOnce or the setup and deployment project, it does all this for you. The first core prerequiste is to install the .NET Framework if its not found then after any other products you want to install finally then your application installation. You are probably better and easier to use ClickOnce/Setup and deployment to do all the hard work for you.
    Monday, December 25, 2006 5:59 PM
  • I have developed a custom installer since unlike the installation project is VS I have much more control over how the application installs, but since its a .NET app it itself requires the .NET Framework to run, so I need some non .NET app to setup the framework or verify its existence then run my installer, then I can code my installer to terminate the original program used to start it.

    if that makes any sense...
    Monday, December 25, 2006 7:12 PM
  • sure.

    you could check the registry and to see if the appropriate directories have been created for the .NET Framework but still it does not mean that its installed or working since the user could modify any one of those points mentioned. There are also multiple versions of .NET Framework that could be installed on one system!

    the key HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework

     

    maybe the one you are after. It also contains values such as InstallRoot and sdkInstallRootvx.y  Where x.y is the major.minor version of the .NET Framework.

    does this help?

     

    Monday, December 25, 2006 7:32 PM
  • how to find it doesn't help me, unless i learn something like C++.  I am looking for a program to make an executable that can detect if .NET Framework 2.0 or higher is installed and if not run the installer which will be bundled on the CD, then run my installation.exe then exit, or if it doesn't exit i can have my installer terminate the process.  I was woundering if anything like that exists?
    Monday, December 25, 2006 7:46 PM
  • not sure. you can however kickstart the .NET Framework process, thats not a problem with the redistributional package, just run its process. I don't think there is a ready made program out there that you can run and checks if .NET Framework is installed. of course if you are creating your own .NET app and you wish for it to detect if .NET Framework is installed, it wont work anyway as you know, it needs the .NET Framework in order to run that .NET developed application.

    certainly is an interesting one...

    you say you developed your own custom installer - how did you do this? using which language? If you are not aware, you can do certain things within the custom actions of the VS setup and deployment installer/solution/project. what exactly do you need to do that made you want to create your own installer that gives you more flexibility? perhaps if you explain, maybe we can see if we can help you create that in the installer project?

    Monday, December 25, 2006 7:56 PM
  • primarily i created my own installer to allow the user to have the option to activate the program right then, and also to all them to register the app. 
    Monday, December 25, 2006 8:02 PM
  • Hi Ryan88,

    Perhaps I missed something, but why not using Windows Installer? By default it has a launch condition where you can specify the .NET Framework you're looking for. You can run it on machines that lack the .NET Framework.

    All the best!

    Carlos Mallen

    Tuesday, November 16, 2010 6:23 PM