// Token: 0x06000112 RID: 274 RVA: 0x000070FC File Offset: 0x000052FC
        public override ExitCode ProcessArguments()
        {
            if (SetupLauncherHelper.IsFromInstalledExchangeDir() && this.IsInstallMode() && !this.IsLanguagePackMode() && !this.IsAddRolePossible())
            {
                this.ReportMessage(Strings.AddRoleNotPossible);
                return(ExitCode.Error);
            }
            bool flag = false;
            bool flag2;

            if (string.IsNullOrEmpty(SetupBase.SetupArgs.FirstOrDefault((string a) => a.ToLowerInvariant().IndexOf("addumlanguagepack") > 0)))
            {
                flag2 = string.IsNullOrEmpty(SetupBase.SetupArgs.FirstOrDefault((string a) => a.ToLowerInvariant().IndexOf("removeumlanguagepack") > 0));
            }
            else
            {
                flag2 = false;
            }
            bool flag3 = flag2;

            if (flag3)
            {
                flag = string.IsNullOrEmpty(SetupBase.SetupArgs.FirstOrDefault((string a) => a.ToLowerInvariant().IndexOf("mode") > 0));
            }
            if (flag)
            {
                SetupOperations setupOperations;
                if (base.IsExchangeInstalled)
                {
                    if (string.IsNullOrEmpty(SetupBase.SetupArgs.FirstOrDefault((string a) => a.ToLowerInvariant().IndexOf("removeumlanguagepack") > 0)))
                    {
                        string text = this.GetSourceDirFromArgs();
                        if (string.IsNullOrEmpty(text))
                        {
                            text = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
                        }
                        string fullFileName = Path.Combine(Path.Combine(text, "Setup\\ServerRoles\\Common"), "ExSetup.exe");
                        int    num          = SetupLauncherHelper.CompareRunningVersionWithInstalledVersion(fullFileName);
                        if (num > 0)
                        {
                            this.ReportMessage(Strings.OlderVersionsOfServerRolesInstalled);
                            return(ExitCode.Error);
                        }
                        if (num < 0)
                        {
                            setupOperations = SetupOperations.Upgrade;
                            goto IL_167;
                        }
                        setupOperations = SetupOperations.Install;
                        goto IL_167;
                    }
                }
                setupOperations = SetupOperations.Install;
IL_167:
                this.AddArgument("mode", setupOperations.ToString());
            }
            return(base.ProcessArguments());
        }
Beispiel #2
0
        // Token: 0x0600000E RID: 14 RVA: 0x00002698 File Offset: 0x00000898
        private bool CopyFiles()
        {
            bool flag = SetupLauncherHelper.IsFromInstalledExchangeDir();

            if (!base.IsExchangeInstalled || !flag)
            {
                this.ReportMessage(Strings.FileCopyText);
                bool flag2 = SetupLauncherHelper.CopyExSetupFiles(SetupBase.TheApp.SourceDir);
                if (!flag2)
                {
                    return(false);
                }
                if (Datacenter.IsMicrosoftHostedOnly(true))
                {
                    string path = "Setup\\ServerRoles\\ClientAccess\\ServicePlans".Split(new char[]
                    {
                        '\\'
                    }, 3)[2];
                    try
                    {
                        SetupHelper.CopyFiles(Path.Combine(SetupBase.TheApp.SourceDir, "Setup\\ServerRoles\\ClientAccess\\ServicePlans"), Path.Combine(SetupBase.TheApp.TargetDir, path), false);
                    }
                    catch (InsufficientDiskSpaceException)
                    {
                        SetupLogger.Log(Strings.InsufficientDiskSpace);
                        flag2 = false;
                    }
                    catch (FileNotExistsException ex)
                    {
                        SetupLogger.Log(Strings.FileCopyException(ex.Message));
                        flag2 = false;
                    }
                    if (!flag2)
                    {
                        return(false);
                    }
                    path = "Setup\\ServerRoles\\Mailbox".Split(new char[]
                    {
                        '\\'
                    })[2];
                    try
                    {
                        SetupHelper.CopyFiles(Path.Combine(SetupBase.TheApp.SourceDir, "Setup\\ServerRoles\\Mailbox"), Path.Combine(SetupBase.TheApp.TargetDir, path), false);
                    }
                    catch (InsufficientDiskSpaceException)
                    {
                        SetupLogger.Log(Strings.InsufficientDiskSpace);
                        flag2 = false;
                    }
                    catch (FileNotExistsException ex2)
                    {
                        SetupLogger.Log(Strings.FileCopyException(ex2.Message));
                        flag2 = false;
                    }
                    if (!flag2)
                    {
                        return(false);
                    }
                    this.ReportMessage(Strings.FileCopyComplete);
                    return(true);
                }
                else
                {
                    this.ReportMessage(Strings.FileCopyComplete);
                }
            }
            return(true);
        }