Archive: Detect .NET 2.0 and ask to install if not present


Detect .NET 2.0 and ask to install if not present
I am in charge of making an installer for a project that has been developed in .net 2005. therefore net framework 2 is needed.

i rather not have it download from the web as most of our users wont have internet connection so i'll provide the runtime and have my installer install it first.

how can i do this?

mainly i want to check it its present and if its not, ask to install it, and NSIS will install it, then when its done, it will finish the installer. when i uninstall, i clearly want net2 to still be there.

is this the best method? or should i have the installer abort, and have them go to the .net directory in the cd and go from there?

thanks


You can use GetDotNETVersion to detect .NET. To install .NET, you can use ExecWait to execute the installer.

I'd say it would be nicer for the user, if you install .NET for him. Asking the user to browse the CD, find the .NET installer and install it manually is too much in my opnion.