Can I programmatically install a new version of .NET using .NET?

Say I have .NET 2 installed. Can I install version 4 programmatically using .NET 2?

+5
source share
3 answers

Of course you can. Include the required installation package and then Process.Start or even better: complete the installation and deployment project for your application and set the .NET 4.0 launch condition so that when someone tries to install it, they will check for .NET 4.0 and if not ask him to install:

alt text

Note: in the screenshot, .NET 4.0 is installed as a launch condition (step 4)

+12
source

( MSI msiexec.exe), , . , , . .net 2.0.

+2

Of course. Just start the installation process.

Process.Start("dotnetfx.exe");
+1
source

All Articles