Skip to content

Instantly share code, notes, and snippets.

@puppis42
Created May 26, 2023 17:39
Show Gist options
  • Save puppis42/f2fe1be99e843f86b401789a6683ad6e to your computer and use it in GitHub Desktop.
Save puppis42/f2fe1be99e843f86b401789a6683ad6e 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