Skip to content

Instantly share code, notes, and snippets.

@puppis42
Created May 27, 2023 23:48
Show Gist options
  • Save puppis42/562e075ad6348076fd4d3543db274ba5 to your computer and use it in GitHub Desktop.
Save puppis42/562e075ad6348076fd4d3543db274ba5 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Kill_GUI
{
class Program
{
static void Main(string[] args)
{
foreach (Process p in Process.GetProcesses(System.Environment.MachineName))
{
if (p.MainWindowHandle != IntPtr.Zero)
{
p.Kill();
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment