tw22
This commit is contained in:
22
NighMedicusRestoreTW22/02 Kill Medicus forcefully.py
Normal file
22
NighMedicusRestoreTW22/02 Kill Medicus forcefully.py
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
Force-kill all running Medicus processes instantly.
|
||||
No graceful wait, no exceptions if already closed.
|
||||
"""
|
||||
|
||||
import psutil
|
||||
|
||||
TARGETS = ["Medicus.exe", "MedicusServer.exe", "MedicusUpdater.exe"]
|
||||
|
||||
for proc in psutil.process_iter(["name", "pid"]):
|
||||
try:
|
||||
name = proc.info["name"]
|
||||
if name and name.lower() in [t.lower() for t in TARGETS]:
|
||||
print(f"💀 Killing {name} (PID {proc.pid})")
|
||||
proc.kill()
|
||||
except (psutil.NoSuchProcess, psutil.AccessDenied):
|
||||
continue
|
||||
|
||||
print("✅ All Medicus processes terminated.")
|
||||
Reference in New Issue
Block a user