📜  如何防止或终止windows家庭安全windows服务c#代码示例的时间启动屏幕

📅  最后修改于: 2022-03-11 14:49:16.401000             🧑  作者: Mango

代码示例1
private void PreventTimesUpScreen() {
  System.Timers.Timer tm = new System.Timers.Timer();
  tm.Elapsed += PreventTick;
  tm.Start();
}
private void PreventTick(object sender, System.Timers.ElapsedEventArgs e) {
  foreach (Process p in Process.GetProcessesByName("WpcMon")) {
    p.Kill();
  }
}