The Installation of .Net Framework failed, the Installation of SQL server
2008 R2 SP2 also failed,
Futhi, First Install .Net framework.
if window 2008 R2 :-
http://blogs.msdn.com/b/sqlblog/archive/2010/01/08/how-to-install-net-framework-3-5-sp1-on-windows-server-2008-r2-environments.aspx
if window 2008 :-
On Windows Server 2008, if you need to run scripts for cache configuration, or if you want to run cache configuration cmdlets
from any PowerShell console, install .NET Framework 3.5 SP1. Note that .NET Framework 3.5 SP1 is automatically installed on Windows Server 2008 R2.
----Script -----
using System;
using System.Diagnostics;
namespace PrerequisiteHelper
{
class Program
{
static void Main(string[] args)
{
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "powershell.exe";
startInfo.Arguments = "Import-Module ServerManager ; Add-WindowsFeature as-net-framework";
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.UseShellExecute = true;
Process p = new Process();
p.StartInfo = startInfo;
p.Start();
p.WaitForExit();
}
}
}
source: community.flexerasoftware.com/.../index.php
2) You can use
one single line can do it, and you can put it in your batch file:
powershell "Import-Module ServerManager; Add-WindowsFeature as-net-framework"
----------
...
Check and confirm.
-
Edited by
Dinesh Vishe
19 hours 11 minutes ago