Created
May 27, 2023 23:48
-
-
Save puppis42/562e075ad6348076fd4d3543db274ba5 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