Created
May 26, 2023 17:39
-
-
Save puppis42/f2fe1be99e843f86b401789a6683ad6e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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