Archive: How to run command to addfeature on "windows server 2008 R2"


How to run command to addfeature on "windows server 2008 R2"
I want to install "Sql server 2008 R2" on "Windows server 2008 R2"

Sql server 2008 R2 require dotnet version 3.5 for installation.

For this Windows server 2008 R2 need to upgrade dotnet version by doing, add features.

I refered respective link to achieve the same:

http://blogs.msdn.com/b/sqlblog/arch...ironments.aspx

Below given is the nsis code I tried running on Windows 2008 R2:

var AddFeatureForDotNet

Function RunAddFeatureForDotNet
ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell" "Path"
StrCpy $AddFeatureForDotNet $0
ExecWait 'AddFeatureForDotNet Import-Module ServerManager ; Add-WindowsFeature as-net-framework'
FunctionEnd

But failed.......

I get below given error msg:

---------------------------
Microsoft .NET Framework 3.5 SP1 Setup
---------------------------
You must use the Role Management Tool to install or configure Microsoft .NET Framework 3.5 SP1.
---------------------------
OK
---------------------------

Kindly guide how to achieve this.


You should ask this elsewhere such as on the MSDN forums as it looks like nobody here has the answer.

Stu