I have the following code:
from subprocess import call
import time
call('taskkill /IM explorer.exe /F', shell=True)
time.sleep(2)
call(["start", "explorer.exe"],shell=True)
When i run it, explorer.exe (Taskbar, environment etc.) closes, but on call
function, it starts the Windows Explorer
- File explorer.
If i close the explorer.exe (Let's say, from task manager) and then on cmd start explorer.exe
it works as intended.
Presumably, the code above does the same, but the results are not.
What is going on under the hood?