views:

10

answers:

1

I have a homemade bootstrapper (call it SetUp.exe) that checks whether .NET 3.5 is installed on the target machine, and, if not, launches the installation by running dotnetfx35.exe. Fine. This works for all cases that I need EXCEPT for Windows 2008 Server R2. On this OS, the .NET installer does not install/enable .NET 3.5. Instead it pops up a dialog indicating that one must manually enable it. I would prefer doing this automatically from within my bootstrapper exe OR from within my main MSI which is WiX based.

A: 

The .NET Framework installation changed with Windows Server 2008 R2 - you cannot simply run the dotnetfx35.exe (as you tried), but need to enable the server feature.

Usually you would add the server role via the Server Manager > Add Features > .NET Framework 3.5.1 Features, but you said you need to install it via a WiX installation.

The only way I know of is to use PowerShell. In PowerShell (started as Administrator!) you need to run the following commands:

Import-Module ServerManager
Add-WindowsFeature as-net-framework

This of course could be scripted by calling powershell.exe like so:

powershell.exe -ImportSystemModules  Add-WindowsFeature net-framework 

The ImportSystemModules you need to be able to call Add-WindowsFeature. If you want top keep powershell.exe open to see the results (I guess not in a deployment situation), just add a -noexit parameter.

There is actually an article on the Microsoft SQL Server Blog about How to install/enable .Net 3.5 SP1 on Windows Server 2008 R2 for SQL Server 2008 and SQL Server 2008 R2

moontear