Question

I'm trying to make an installer for a program with user input in a visual studio 2012 environment. How do I go about checking for .NET framework when all the options available seem to run .NET (i.e. VB.NET, C#, F#).

I started a program in VB.NET at the 2.0 framework:

For i = 0 To (versionArray.length -1)
    if versionArray(i) = Release then
       exit for
    end if
next i

Where versionArray is an array of the Registry entries in SOFTWARE for .NET 4.5 and Release is the current entry, if it exists.

This code works but, as I said, it's running on .NET.

Was it helpful?

Solution

You can't run a .NET Application without .NET. You will need to develop your installer with some sort of setup utility. With WIX configured correctly in your .NET Project and a setup utility, you can create what's called a CustomAction to further retrieve information at install time.

Note that the setup utility will be the one to detect if the .NET framework is installed and enabled on the system, if not it will proceed with installing it; This will need to be setup ahead of time in your setup tool of choice.

Refer to this site for lots of great Installer tools and tips: http://installsite.org/

Here is a nice guide on installing .NET framework programmatically via WiX: http://wixtoolset.org/documentation/manual/v3/howtos/redistributables_and_install_checks/install_dotnet.html

Here are some free setup tools you can use:

  1. WIX Toolset (Windows Installer XML toolset--lets developers create installers for Windows Installer, the Windows installation engine.)
  2. Advanced Installer (Free version, very easy to use! Free version includes limited set of features)
  3. Inno Setup
  4. NSIS (Open source Setup tool)
  5. Ghost Installer (Free version available)
  6. ClickTeam Install Creator (Very Friendly, Free version available)
  7. CreateInstall Free

OTHER TIPS

It's not clear what you are doing because there are no setup projects in VS 2012 for building MSI files. Maybe that means you are writing your own setup program? If you want to detect the .NET Frameworks I recommend looking at the code here, C++

http://blogs.msdn.com/b/astebner/archive/2013/10/17/10457758.aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top