.net – How to communicate with .NET 3.5 SP1 bootstrapper

.net-3.5deploymentnet

I'm building a custom Windows installer package for my .NET 3.5 SP1 WPF application. I want it to detect what version (if any) of the .NET framework is installed on the client's computer, and then automatically download it from Microsoft if they don't have it.

Now, I've read about the .NET bootstrapper and even seen it in action in a ClickOnce installer I made. It seems to do just what I need.

The problem is, I don't want to use ClickOnce. I'm partial to NSIS. So essentially I'm looking for some documentation on how to communicate with or integrate the bootstrapper in some way so I can leverage it inside my own installer. But I'm not finding much.

Any help would be greatly appreciated.

Thanks,
Steve

Best Answer

You'll want something like this, except when I've used this it only detects up to 2 properly. I'm at home now but when I get to work I'll post my hack of this code to make it work up to 3.5 SP1. They changed the location of the version number a little.

Edit: Posted my version on pastebin