views:

60

answers:

3

I need Windows executable that checks basic system requirements (e.g. if .NET is installed) and either starts .NET application or gives instructions to user what's missing.

I know I could use an installer to check prerequisites but client would like to avoid this.

Do you know about tool that could help me with this?

+1  A: 

Delphi is a good tool for creating a native executable like this. This app could read the Registry to determine if .Net (and the required version) is installed, and kick off the installer if necessary, and then start your .Net app after the installer is done.

However, having been through this a number of times, I can assure you that this just isn't worth the effort, especially if your app is still .Net 2.0. Most PCs in the world already have at least this much installed, and it's a lot easier to just include the .Net redistributable on your application's install disk (or provide a link to it on your website) along with instructions on what to do if the user starts your application and gets a message box that says "This application requires .Net 2.0. Please install .Net 2.0" or whatever it says.

In my experience, clients tend to worry about this scenario way too much. If a user can't handle installing .Net, you're going to have other problems with them. If your app requires .Net 3.5, you might have some serious problems, since the installer sometimes fails with the helpful message "SETUP Error" (and nothing else [!]), but this will be a problem for you no matter what.

MusiGenesis
A: 

Well, ClickOnce applications will take care of all that for you. But they are not very customizable and will install per user, not per machine.

Dabblernl
+1  A: 

Unfortunately, using an installer is the most reliable way to check prerequisites. The problem is every program has prerequisites be it the correct C runtime version, the latest .NET runtime, etc. So if you write a C program to check for .NET, the C program won't work without the matching C runtime, etc.

I like WIX : http://wix.sourceforge.net/

Unfortunately, you still have a dependency on having the correct Windows Installer bits, but this is a rare problem.

RichAmberale