PreInstall WebRole and AspNet, small WiX UI fix for Server 2008.
This commit is contained in:
parent
ef97dcfd38
commit
0d12cb94e8
5 changed files with 227 additions and 35 deletions
|
@ -57,7 +57,7 @@ namespace WebsitePanel.Setup
|
|||
/// </summary>
|
||||
/// <param name="message">Error message.</param>
|
||||
/// <param name="ex">Exception.</param>
|
||||
internal static void WriteError(string message, Exception ex)
|
||||
public static void WriteError(string message, Exception ex)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -74,7 +74,7 @@ namespace WebsitePanel.Setup
|
|||
/// </summary>
|
||||
/// <param name="message">Error message.</param>
|
||||
/// <param name="ex">Exception.</param>
|
||||
internal static void WriteError(string message)
|
||||
public static void WriteError(string message)
|
||||
{
|
||||
WriteError(message, null);
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ namespace WebsitePanel.Setup
|
|||
/// Write to log
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
internal static void Write(string message)
|
||||
public static void Write(string message)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -98,7 +98,7 @@ namespace WebsitePanel.Setup
|
|||
/// Write line to log
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
internal static void WriteLine(string message)
|
||||
public static void WriteLine(string message)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -112,7 +112,7 @@ namespace WebsitePanel.Setup
|
|||
/// Write info message to log
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
internal static void WriteInfo(string message)
|
||||
public static void WriteInfo(string message)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -126,7 +126,7 @@ namespace WebsitePanel.Setup
|
|||
/// Write start message to log
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
internal static void WriteStart(string message)
|
||||
public static void WriteStart(string message)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -141,7 +141,7 @@ namespace WebsitePanel.Setup
|
|||
/// Write end message to log
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
internal static void WriteEnd(string message)
|
||||
public static void WriteEnd(string message)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
|
@ -601,16 +601,29 @@ namespace WebsitePanel.Setup
|
|||
|
||||
private static bool IsAspNetRoleServiceInstalled()
|
||||
{
|
||||
RegistryKey regkey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\InetStp\\Components");
|
||||
if (regkey == null)
|
||||
return false;
|
||||
|
||||
int value = (int)regkey.GetValue("ASPNET", 0);
|
||||
|
||||
if (value != 1)
|
||||
value = (int)regkey.GetValue("ASPNET45", 0);
|
||||
|
||||
return value == 1;
|
||||
return GetIsWebFeaturesInstalled();
|
||||
}
|
||||
private static bool GetIsWebFeaturesInstalled()
|
||||
{ // See WebsitePanel.Installer\Sources\WebsitePanel.WIXInstaller\Common\Tool.cs
|
||||
bool Result = false;
|
||||
var LMKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32);
|
||||
Result |= CheckAspNetRegValue(LMKey);
|
||||
LMKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64);
|
||||
Result |= CheckAspNetRegValue(LMKey);
|
||||
return Result;
|
||||
}
|
||||
private static bool CheckAspNetRegValue(RegistryKey BaseKey)
|
||||
{
|
||||
var WebComponentsKey = "SOFTWARE\\Microsoft\\InetStp\\Components";
|
||||
var AspNet = "ASPNET";
|
||||
var AspNet45 = "ASPNET45";
|
||||
RegistryKey Key = BaseKey.OpenSubKey(WebComponentsKey);
|
||||
if (Key == null)
|
||||
return false;
|
||||
var Value = int.Parse(Key.GetValue(AspNet, 0).ToString());
|
||||
if (Value != 1)
|
||||
Value = int.Parse(Key.GetValue(AspNet45, 0).ToString());
|
||||
return Value == 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue