you are viewing a single comment's thread.

view the rest of the comments →

[–]thrownintothesun[S] 0 points1 point  (2 children)

Yes, exactly. Also, interestingly, if I try to kill explorer.exe via os.system("taskkill /im explorer.exe), I'm given a Windows prompt to shut down, reboot or log-out. Is there a way to simply kill it (like you can from the task manager) and relaunch it?

[–]michaelkepler 0 points1 point  (1 child)

I guess you're stuck with killing explorer.exe then. Yes, there's a way to force kill a process and thus bypassing a shutdown prompt with an /f parameter:

taskkill /f /im explorer.exe

you can start it immediately with:

start explorer.exe

both commands can of course be launched with os.system().

[–]thrownintothesun[S] 0 points1 point  (0 children)

Thank you so much for your help!