예제 #1
0
 // Token: 0x06000111 RID: 273 RVA: 0x00006FE4 File Offset: 0x000051E4
 public override int Run()
 {
     ExSetupUI.exitCode = (ExitCode)base.Run();
     if (ExSetupUI.exitCode == ExitCode.Success)
     {
         bool flag = false;
         if (base.ParsedArguments.ContainsKey("mode"))
         {
             SetupOperations setupOperations = (SetupOperations)base.ParsedArguments["mode"];
             if (setupOperations == SetupOperations.Install || setupOperations == SetupOperations.Upgrade)
             {
                 flag = SetupLauncherHelper.IsRestart(base.ParsedArguments);
                 if (flag)
                 {
                     this.TryAddUpdatesParameterCopyMspFiles(SetupLauncherHelper.GetUpdatesDirFromRegistry(), Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), "Temp\\ExchangeSetup\\MspTemp"), Path.Combine(SetupHelper.WindowsDir, "Temp\\ExchangeSetup"));
                 }
             }
         }
         SetupWizard mainForm = new SetupWizard(this, !flag, SetupLauncherHelper.IsExchangeInstalled());
         if (ExSetupUI.exitCode == ExitCode.Success)
         {
             SplashScreen.SplashInstance.Hide();
             Application.Run(mainForm);
         }
         SplashScreen.SplashInstance.CloseSplash();
     }
     return((int)ExSetupUI.exitCode);
 }
예제 #2
0
        // Token: 0x0600000B RID: 11 RVA: 0x000021E8 File Offset: 0x000003E8
        public override int Run()
        {
            ExitCode exitCode = this.SetupChecks();

            if (exitCode == ExitCode.Error)
            {
                SetupLogger.Log(new LocalizedString("CurrentResult main.run:185: " + ExitCode.Error));
                return(1);
            }
            if (SetupBase.TheApp.ParsedArguments.ContainsKey("updatesdir"))
            {
                if (base.IsExchangeInstalled)
                {
                    this.ReportMessage(Strings.UpdatesNotOnFreshInstall);
                    SetupLogger.Log(new LocalizedString("CurrentResult main.run:196: " + ExitCode.Error));
                    return(1);
                }
                if (SetupLauncherHelper.IsRestart(SetupBase.TheApp.ParsedArguments))
                {
                    SetupLauncherHelper.CopyMspFiles(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), "Temp\\ExchangeSetup\\MspTemp"), Path.Combine(SetupHelper.WindowsDir, "Temp\\ExchangeSetup"));
                }
                else
                {
                    ExitCode exitCode2 = this.CheckForUpdates(SetupBase.TheApp.ParsedArguments);
                    if (exitCode2 != ExitCode.Success)
                    {
                        SetupLogger.Log(new LocalizedString("CurrentResult main.run:214: " + exitCode2));
                        return((int)exitCode2);
                    }
                }
            }
            if (!this.CopyFiles())
            {
                this.ReportMessage(Strings.FileCopyFailed(SetupBase.TheApp.SourceDir, Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), "Temp\\ExchangeSetup")));
                SetupLogger.Log(new LocalizedString("CurrentResult main.run:223: " + ExitCode.Error));
                return(1);
            }
            int num = SetupLauncherHelper.LoadAssembly(SetupBase.SetupArgs, SetupBase.TheApp.ParsedArguments, SetupBase.TheApp, "Microsoft.Exchange.Setup.Console.dll", "Microsoft.Exchange.Setup.Console.Console");

            if (num == 1)
            {
                this.ReportMessage();
                this.ReportMessage(Strings.AdditionalErrorDetails);
            }
            SetupLogger.Log(new LocalizedString("CurrentResult main.run:235: " + num));
            return(num);
        }