diff --git a/WebsitePanel.Installer/Sources/Setup.WIXInstaller/Product.wxs b/WebsitePanel.Installer/Sources/Setup.WIXInstaller/Product.wxs
index bfd91d56..42f1f4e9 100644
--- a/WebsitePanel.Installer/Sources/Setup.WIXInstaller/Product.wxs
+++ b/WebsitePanel.Installer/Sources/Setup.WIXInstaller/Product.wxs
@@ -707,15 +707,21 @@
NOT (Remove="ALL") AND NOT(DB_AUTH = "Windows Authentication")
-
-
-
+
+
+
+
+
+
(NOT Installed AND NOT WIX_UPGRADE_DETECTED) AND (DB_AUTH = "Windows Authentication") AND (COMPFOUND_ESERVER="0")
@@ -729,13 +735,18 @@
NOT (Remove="ALL") AND (DB_AUTH = "Windows Authentication")
-
+
-
+ Sequence="11" ContinueOnError="no" ExecuteOnInstall="yes" ExecuteOnReinstall="yes" ExecuteOnUninstall="no"/>
+
+
diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/EntServerActionManager.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/EntServerActionManager.cs
index 4afab84d..52cf5a85 100644
--- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/EntServerActionManager.cs
+++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/EntServerActionManager.cs
@@ -63,9 +63,6 @@ namespace WebsitePanel.Setup.Actions
void IInstallAction.Run(SetupVariables vars)
{
- if (vars.ComponentExists)
- return;
-
try
{
OnInstallProgressChanged(LogStartInstallMessage, 0);
@@ -235,10 +232,7 @@ namespace WebsitePanel.Setup.Actions
{
void IInstallAction.Run(SetupVariables vars)
{
- if (vars.ComponentExists)
- return;
-
- try
+ try
{
//
Log.WriteStart(String.Format("Creating database user {0}", vars.Database));
@@ -336,9 +330,6 @@ namespace WebsitePanel.Setup.Actions
void IInstallAction.Run(SetupVariables vars)
{
- if (vars.ComponentExists)
- return;
-
try
{
Log.WriteStart("Updating serveradmin password");
@@ -398,9 +389,6 @@ namespace WebsitePanel.Setup.Actions
{
void IInstallAction.Run(SetupVariables vars)
{
- if (vars.ComponentExists)
- return;
-
Log.WriteStart("Updating web.config file (connection string)");
var file = Path.Combine(vars.InstallationFolder, vars.ConfigurationFile);
vars.ConnectionString = String.Format(vars.ConnectionString, vars.DatabaseServer, vars.Database, vars.Database, vars.DatabaseUserPassword);
diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/ServerActionManager.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/ServerActionManager.cs
index 57f60eb7..5314f724 100644
--- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/ServerActionManager.cs
+++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/ServerActionManager.cs
@@ -151,8 +151,6 @@ namespace WebsitePanel.Setup.Actions
void IInstallAction.Run(SetupVariables vars)
{
- if (vars.ComponentExists)
- return;
// Exit with an error if Windows account with the same name already exists
if (SecurityUtils.UserExists(vars.UserDomain, vars.UserAccount))
throw new Exception(UserAccountExists);
@@ -503,10 +501,7 @@ namespace WebsitePanel.Setup.Actions
void IInstallAction.Run(SetupVariables vars)
{
- if (vars.ComponentExists)
- return;
-
- var siteName = vars.ComponentFullName;
+ var siteName = vars.ComponentFullName;
var ip = vars.WebSiteIP;
var port = vars.WebSitePort;
var domain = vars.WebSiteDomain;
@@ -779,10 +774,7 @@ namespace WebsitePanel.Setup.Actions
void IInstallAction.Run(SetupVariables vars)
{
- if (vars.ComponentExists)
- return;
-
- try
+ try
{
Begin(LogStartInstallMessage);
//
diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Internal/Adapter.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Internal/Adapter.cs
index 2deea1a8..8a3dca10 100644
--- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Internal/Adapter.cs
+++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Internal/Adapter.cs
@@ -198,7 +198,7 @@ namespace WebsitePanel.Setup.Internal
var mup = "MODE_UP";
var mrup = "MODE_RUP";
var Result = ModeExtension.Normal;
- if (Src.Keys.Contains(mup) && !string.IsNullOrWhiteSpace(Src[mup]))
+ if ((Src.Keys.Contains(mup) && !string.IsNullOrWhiteSpace(Src[mup])) || (Src.Keys.Contains("ComponentId") && !string.IsNullOrWhiteSpace(Src["ComponentId"])))
Result = ModeExtension.Restore;
else if (Src.Keys.Contains(mrup) && !string.IsNullOrWhiteSpace(Src[mrup]))
Result = ModeExtension.Backup;
@@ -3943,7 +3943,7 @@ namespace WebsitePanel.Setup.Internal
XmlDocumentMerge.KeyAttributes = new List { "name", "id", "key", "pageID", "localName", "xmlns", "privatePath", "moduleDefinitionID", "ref", "verb;path", "controlRenderingCompatibilityVersion;clientIDMode" };
XmlDocumentMerge.FrozenAttributes = new List
{
- new XmlDocumentMerge.FrozenAttrTag() { Path="configuration/microsoft.web.services3/security/securityTokenManager/add", Attributes = new List() {"localName"} },
+ new XmlDocumentMerge.FrozenAttrTag() { Path="configuration/microsoft.web.services3/security/securityTokenManager/add", Attributes = new List() {"type"} },
new XmlDocumentMerge.FrozenAttrTag(true) { Path="compilation", Attributes = new List() {"targetFramework"} },
new XmlDocumentMerge.FrozenAttrTag() { Path="configuration/startup/supportedRuntime", Attributes = new List() {"version", "sku" } }
};
@@ -4242,12 +4242,6 @@ namespace WebsitePanel.Setup.Internal
WiXThrow = true;
});
sam.Start();
- if (Context.ComponentExists)
- {
- Context.UpdateVersion = Context.Release;
- AppConfig.LoadComponentSettings(Context);
- new RestoreScript(Context).Run();
- }
}
catch (Exception ex)
{
@@ -4326,12 +4320,6 @@ namespace WebsitePanel.Setup.Internal
WiXThrow = true;
});
sam.Start();
- if(Context.ComponentExists)
- {
- Context.UpdateVersion = Context.Release;
- AppConfig.LoadComponentSettings(Context);
- new RestoreScript(Context).Run();
- }
}
catch (Exception ex)
{
@@ -4410,12 +4398,6 @@ namespace WebsitePanel.Setup.Internal
WiXThrow = true;
});
sam.Start();
- if (Context.ComponentExists)
- {
- Context.UpdateVersion = Context.Release;
- AppConfig.LoadComponentSettings(Context);
- new RestoreScript(Context).Run();
- }
}
catch (Exception ex)
{
diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.WIXInstaller/CustomAction.cs b/WebsitePanel.Installer/Sources/WebsitePanel.WIXInstaller/CustomAction.cs
index b268cead..70cffceb 100644
--- a/WebsitePanel.Installer/Sources/WebsitePanel.WIXInstaller/CustomAction.cs
+++ b/WebsitePanel.Installer/Sources/WebsitePanel.WIXInstaller/CustomAction.cs
@@ -219,13 +219,14 @@ namespace WebsitePanel.WIXInstaller
var ConnStr = new SqlConnectionStringBuilder(CtxVars.DbInstallConnectionString);
SetProperty(Ctx, "DB_CONN", ConnStr.ToString());
SetProperty(Ctx, "DB_SERVER", ConnStr.DataSource);
- SetProperty(Ctx, "DB_DATABASE", ConnStr.InitialCatalog);
SetProperty(Ctx, "DB_AUTH", ConnStr.IntegratedSecurity ? SQL_AUTH_WINDOWS : SQL_AUTH_SERVER);
if (!ConnStr.IntegratedSecurity)
{
SetProperty(Ctx, "DB_LOGIN", ConnStr.UserID);
SetProperty(Ctx, "DB_PASSWORD", ConnStr.Password);
}
+ ConnStr = new SqlConnectionStringBuilder(CtxVars.ConnectionString);
+ SetProperty(Ctx, "DB_DATABASE", ConnStr.InitialCatalog);
var HaveAccount = SecurityUtils.UserExists(CtxVars.UserDomain, CtxVars.UserAccount);
bool HavePool = Tool.AppPoolExists(CtxVars.ApplicationPool);