WSP Installer checks updated for IIS 8, Windows 2012 and ASP.NET 4.0
This commit is contained in:
parent
cf75c359eb
commit
e94cfe87c1
4 changed files with 56 additions and 40 deletions
|
@ -282,7 +282,11 @@ namespace WebsitePanel.Setup
|
|||
WindowsXP,
|
||||
WindowsServer2003,
|
||||
WindowsVista,
|
||||
WindowsServer2008
|
||||
WindowsServer2008,
|
||||
Windows7,
|
||||
WindowsServer2008R2,
|
||||
Windows8,
|
||||
WindowsServer2012
|
||||
}
|
||||
|
||||
public static string GetName(WindowsVersion version)
|
||||
|
@ -404,11 +408,28 @@ namespace WebsitePanel.Setup
|
|||
}
|
||||
break;
|
||||
case 6:
|
||||
if (info.wProductType == (byte)WinPlatform.VER_NT_WORKSTATION)
|
||||
ret = WindowsVersion.WindowsVista;
|
||||
else
|
||||
ret = WindowsVersion.WindowsServer2008;
|
||||
break;
|
||||
switch (osInfo.Version.Minor)
|
||||
{
|
||||
case 0:
|
||||
if (info.wProductType == (byte)WinPlatform.VER_NT_WORKSTATION)
|
||||
ret = WindowsVersion.WindowsVista;
|
||||
else
|
||||
ret = WindowsVersion.WindowsServer2008;
|
||||
break;
|
||||
case 1:
|
||||
if (info.wProductType == (byte)WinPlatform.VER_NT_WORKSTATION)
|
||||
ret = WindowsVersion.Windows7;
|
||||
else
|
||||
ret = WindowsVersion.WindowsServer2008R2;
|
||||
break;
|
||||
case 2:
|
||||
if (info.wProductType == (byte)WinPlatform.VER_NT_WORKSTATION)
|
||||
ret = WindowsVersion.Windows8;
|
||||
else
|
||||
ret = WindowsVersion.WindowsServer2012;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -590,16 +590,8 @@ namespace WebsitePanel.Setup
|
|||
|
||||
public static bool CheckAspNet40Registered(SetupVariables setupVariables)
|
||||
{
|
||||
//
|
||||
var aspNet40Registered = false;
|
||||
// Run ASP.NET Registration Tool command
|
||||
var psOutput = ExecAspNetRegistrationToolCommand(setupVariables, "-lv");
|
||||
// Split process output per lines
|
||||
var strLines = psOutput.Split(new char[] { '\n' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
// Lookup for an evidence of ASP.NET 4.0
|
||||
aspNet40Registered = strLines.Any((string s) => { return s.Contains("4.0.30319.0"); });
|
||||
//
|
||||
return aspNet40Registered;
|
||||
var regkey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\ASP.NET\\4.0.30319.0");
|
||||
return (regkey != null);
|
||||
}
|
||||
|
||||
public static string ExecAspNetRegistrationToolCommand(SetupVariables setupVariables, string arguments)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue