Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions FadCrypt.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def safe_flush(stream=None):
with open(log_file, 'a') as f:
f.write("[REGISTER-CONTEXT] Restarting Explorer...\n")
try:
subprocess.run(['taskkill', '/f', '/im', 'explorer.exe'],
subprocess.run(['cmd', '/c', 'start', '', 'explorer.exe'],
stderr=subprocess.DEVNULL, timeout=5)
subprocess.Popen('explorer.exe')
print("[CONTEXT MENU] Explorer restarted successfully", flush=True)
Expand Down Expand Up @@ -314,7 +314,7 @@ def safe_flush(stream=None):
with open(log_file, 'a') as f:
f.write("[UNREGISTER-CONTEXT] Restarting Explorer...\n")
try:
subprocess.run(['taskkill', '/f', '/im', 'explorer.exe'],
subprocess.run(['cmd', '/c', 'start', '', 'explorer.exe'],
stderr=subprocess.DEVNULL, timeout=5)
subprocess.Popen('explorer.exe')
print("[CONTEXT MENU] Explorer restarted successfully", flush=True)
Expand Down Expand Up @@ -368,7 +368,7 @@ def safe_flush(stream=None):
with open(log_file, 'a') as f:
f.write("[REGISTER-CONTEXT] Restarting Explorer...\n")
try:
subprocess.run(['taskkill', '/f', '/im', 'explorer.exe'],
subprocess.run(['cmd', '/c', 'start', '', 'explorer.exe'],
stderr=subprocess.DEVNULL, timeout=5)
subprocess.Popen('explorer.exe')
print("[CONTEXT MENU] Explorer restarted successfully", flush=True)
Expand Down Expand Up @@ -901,7 +901,7 @@ def safe_flush(stream=None):
print("[CLEANUP] Restarting File Explorer to clear context menu cache...", flush=True)
try:
# Kill explorer and restart it properly
subprocess.run(['taskkill.exe', '/f', '/im', 'explorer.exe'],
subprocess.run(['cmd', '/c', 'start', '', 'explorer.exe'],
capture_output=True, timeout=5)
# Give it a moment to fully terminate
import time
Expand Down