Installer: old to new update #4

This commit is contained in:
McMak 2015-05-20 16:19:56 +03:00
parent 8219bc32c9
commit b2bb23ea13
7 changed files with 106 additions and 21 deletions

View file

@ -63,6 +63,9 @@ namespace WebsitePanel.Setup.Actions
void IInstallAction.Run(SetupVariables vars)
{
if (vars.ComponentExists)
return;
try
{
OnInstallProgressChanged(LogStartInstallMessage, 0);
@ -232,6 +235,9 @@ namespace WebsitePanel.Setup.Actions
{
void IInstallAction.Run(SetupVariables vars)
{
if (vars.ComponentExists)
return;
try
{
//
@ -330,6 +336,9 @@ namespace WebsitePanel.Setup.Actions
void IInstallAction.Run(SetupVariables vars)
{
if (vars.ComponentExists)
return;
try
{
Log.WriteStart("Updating serveradmin password");
@ -389,6 +398,9 @@ 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);

View file

@ -151,6 +151,8 @@ 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);
@ -394,7 +396,7 @@ namespace WebsitePanel.Setup.Actions
}
// This flag is the opposite of poolExists flag
vars.NewWebApplicationPool = !poolExists;
vars.NewWebApplicationPool = !poolExists || vars.ComponentExists;
if (poolExists)
{
@ -501,6 +503,9 @@ namespace WebsitePanel.Setup.Actions
void IInstallAction.Run(SetupVariables vars)
{
if (vars.ComponentExists)
return;
var siteName = vars.ComponentFullName;
var ip = vars.WebSiteIP;
var port = vars.WebSitePort;
@ -774,6 +779,9 @@ namespace WebsitePanel.Setup.Actions
void IInstallAction.Run(SetupVariables vars)
{
if (vars.ComponentExists)
return;
try
{
Begin(LogStartInstallMessage);