开发者

Choosing an installer product that is free and will download/install the .NET Framework

I'm currently using the Visual Studio Installer (Setup Project) in Visual Studio 2010 as the installer for MyProgram. It has some quirky bugs and is not very customizable so I would like to switch to another installer product. Here are my requirements:

  • Must be free (and licensed for commercial use)
  • Must install the Windows Installer 3.1 and .NET Framework 4.0 if the client doesn't have them
    • The installer will download them if they are not available
    • The code for detecting the .NET Framework and downloading it must be written by Microsoft (I do not want to have to update hard-coded URLs and registry keys in the future). I know that the Windows SDK includes a setup bootstrap that does this (C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper)
    • In the future, when .NET Framework 5 is released and MyProgram uses it, no installer code will need to be changed, the updated installer product should see that MyProgram now uses the .NET Framework version 5 and will install that

Here are my current choices:

Visual Studio Installer:

  • Automatically detects/downloads/installs Windows Installer and .NET Framework using a bootstrapper Setup.exe (Good!)
  • Limited/buggy functionality (Uninstall shortcuts in the Start Menu cause empty folders to be left behind during uninstall, asking the user if they want a desktop shortcut requires a lot of work, etc.)

NSIS:

  • Doesn't natively support the .NET Framework so adding it as a prerequisite requires excessive coding, hardcoded URLS, etc.

Inno Setup:

  • Doesn't natively support the .NET Framework so adding it as a prerequisite requires excessive coding, hardcoded URLs, etc.

WiX:

  • Steep learning curve... not sure if I want to spend weeks learning it only to find out that it has the same uninstall problem as 开发者_运维技巧the Visual Studio Installer (because they both use MSI files)

InstallShield LE 2010:

  • Downloading it requires me to setup a fake email account to register just to download it. Then once it is installed it has to contact the company's servers and transmit some private information to them before I'm even allowed to try the free version. This is the most insidious form of DRM that there is and I will not accept it.


WiX v3.5 is currently in beta, set to be released soon. It's latest addition, Burn, is a bootstrapper/chainer designed to do exactly what you're after.

WiX is a steep learning curve, basically because you have to learn MSI to do anything marginally complex. But, it does meet your requirements.

My choice would probably be NSIS just because scripting the installer is so easy. Although adding a .NET prerequisite is manual, how to do so is well understood and published freely.


It seems that changing my installer product to WiX is the best solution. I was able to create a simple setup program with it in a short amount of time and it works as it should.

As for the bootstrapper, while I'm waiting for "Burn" to be released, I will be able to include the Windows SDK bootstrapper using this tutorial.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜