Code: Select all
$f4::
sleep 5000
run taskkill /F /IM explorer.exe
sleep 5000
run explorer.exe ;;;;; This doesn't work. It only opens a "This PC" window.
return
Starting explorer from an AHK script doesn't seem to work though. When I use "run explorer.exe" in an AHK script it just opens a window showing "This PC." It doesn't bring back the whole Windows Explorer UI (the Start menu, taskbar, desktop, etc). It looks like this:
But if I open the Task Manager and run "explorer" from the "Create new task" window, then explorer.exe runs correctly and the Start menu, taskbar, and desktop return.
Why does running the same command lead to different outcomes in an AHK script and the "Create new task" window?