protected override void OnStartup(StartupEventArgs e) { varContainer = new MyVarContainer(); testService = new AutoResetEvent(false); testServiceInstalled = !e.Args.Contains("-no_service_check"); WindowsPrincipal pricipal = new WindowsPrincipal(WindowsIdentity.GetCurrent()); hasAdministrativeRight = pricipal.IsInRole(WindowsBuiltInRole.Administrator); base.OnStartup(e); this.threadServiceChecker = new Thread(new ThreadStart(this.ServiceChecker)); this.threadServiceChecker.Start(); }
protected override void OnStartup(StartupEventArgs e) { varContainer = new MyVarContainer(); testService = new AutoResetEvent(false); testServiceInstalled = !e.Args.Contains("-no_service_check"); WindowsPrincipal pricipal = new WindowsPrincipal(WindowsIdentity.GetCurrent()); hasAdministrativeRight = pricipal.IsInRole(WindowsBuiltInRole.Administrator); base.OnStartup(e); this.threadServiceChecker = new Thread(new ThreadStart(this.ServiceChecker)); this.threadServiceChecker.Start(); }