private void InitializePrerequisites() { //The very first thing to do is catch any unhandled exceptions. These can be caused by UI events. AppDomain.CurrentDomain.UnhandledException += ErrorWindow.HandleUnhandledException; var resolver = new AssemblyResolver(new DefaultAssemblyConfiguration()); AppDomain.CurrentDomain.AssemblyResolve += resolver.Resolve; var elevator = new ProgramElevator(); if (elevator.ExecutingProgramRequiresElevation) { elevator.Elevate(); } }
private void InitializeCCMM() { var ccmmInitializer = new CCMMInitializer(); initialization = ccmmInitializer.Initialize(); var elevator = new ProgramElevator(); if (elevator.DependentFolderRequiresElevation(initialization.Settings.Get().CCInstallDirectory)) { elevator.Elevate(); } var cortexCommandInitializer = new CortexCommandInitializer(initialization); cortexCommandInitializer.Initialize(); }