public void InstallStatus(bool isCompleted, string userAgent, string errorMsg)
        {
            bool isUpgrade = false;

            // if it's an upgrade, you'll need to be logged in before we allow this call
            if (!String.IsNullOrEmpty(global::Umbraco.Core.Configuration.GlobalSettings.ConfigurationStatus))
            {
                isUpgrade = true;
                try
                {
                    legacyAjaxCalls.Authorize();
                }
                catch (Exception)
                {
                    //we don't want to throw the exception back to JS
                    return;
                }
            }

            // Check for current install Id
            Guid installId     = Guid.NewGuid();
            var  installCookie = new BusinessLogic.StateHelper.Cookies.Cookie("umb_installId", 1);

            if (string.IsNullOrEmpty(installCookie.GetValue()) == false)
            {
                if (Guid.TryParse(installCookie.GetValue(), out installId))
                {
                    // check that it's a valid Guid
                    if (installId == Guid.Empty)
                    {
                        installId = Guid.NewGuid();
                    }
                }
            }
            installCookie.SetValue(installId.ToString());

            string dbProvider = string.Empty;

            if (string.IsNullOrEmpty(global::Umbraco.Core.Configuration.GlobalSettings.ConfigurationStatus) == false)
            {
                dbProvider = ApplicationContext.Current.DatabaseContext.DatabaseProvider.ToString();
            }

            var check = new global::Umbraco.Web.org.umbraco.update.CheckForUpgrade();

            check.Install(installId,
                          isUpgrade,
                          isCompleted,
                          DateTime.Now,
                          UmbracoVersion.Current.Major,
                          UmbracoVersion.Current.Minor,
                          UmbracoVersion.Current.Build,
                          UmbracoVersion.CurrentComment,
                          errorMsg,
                          userAgent,
                          dbProvider);
        }
        public void InstallStatus(bool isCompleted, string userAgent, string errorMsg)
        {
            bool isUpgrade = false;
            // if it's an upgrade, you'll need to be logged in before we allow this call
            if (!String.IsNullOrEmpty(global::Umbraco.Core.Configuration.GlobalSettings.ConfigurationStatus))
            {
                isUpgrade = true;
                try
                {
                    legacyAjaxCalls.Authorize();
                }
                catch (Exception)
                {
                    //we don't want to throw the exception back to JS
                    return;
                }
            }

            // Check for current install Id
            Guid installId = Guid.NewGuid();
            BusinessLogic.StateHelper.Cookies.Cookie installCookie = 
                new BusinessLogic.StateHelper.Cookies.Cookie("umb_installId", 1);
            if (!String.IsNullOrEmpty(installCookie.GetValue()))
            {
                if (Guid.TryParse(installCookie.GetValue(), out installId))
                {
                    // check that it's a valid Guid
                    if (installId == Guid.Empty)
                        installId = Guid.NewGuid();

                }
            }
            installCookie.SetValue(installId.ToString());

            string dbProvider = String.Empty;
            if (!String.IsNullOrEmpty(global::Umbraco.Core.Configuration.GlobalSettings.ConfigurationStatus))
            dbProvider = ApplicationContext.Current.DatabaseContext.DatabaseProvider.ToString();

            org.umbraco.update.CheckForUpgrade check = new global::umbraco.presentation.org.umbraco.update.CheckForUpgrade();
            check.Install(installId,
                isUpgrade,
                isCompleted,
                DateTime.Now,
                UmbracoVersion.Current.Major,
                UmbracoVersion.Current.Minor,
                UmbracoVersion.Current.Build,
                UmbracoVersion.CurrentComment,
                errorMsg,
                userAgent,
                dbProvider);
        }