I need to disable explorer.exe on startup on Windows 10 in order to run an script.exe that launches several apps to run a vending machine.

How can this be done?

  • Do you mean that you want to avoid the desktop, and will Tablet Mode help? – harrymc Oct 9 at 16:50
  • 2
    Windows 10 has a Kiosk Mode. – Ramhound Oct 9 at 19:01
up vote -1 down vote accepted

This solution is likely to make the system unstable and is provided for informational purposes only.

If you add the AutoHotKey script to the startup folder, you can add the following command as the first command in the script to kill explorer.exe.

Process, Close , explorer.exe

From the Process, Close documentation:


Forces the first matching process to close.

Process, Close , PIDOrName

If a matching process is successfully terminated, ErrorLevel is set to its former Process ID (PID). Otherwise (there was no matching process or there was a problem terminating it), it is set to 0. Since the process will be abruptly terminated -- possibly interrupting its work at a critical point or resulting in the loss of unsaved data in its windows (if it has any) -- this method should be used only if a process cannot be closed by using WinClose on one of its windows.

This by itself only works temporarily as explorer.exe will restart itself occasionally, so this would need to be run in a loop.

    Process, Exist, explorer.exe
    If ErrorLevel = 0
    Process, Close, explorer.exe


  • 1
    explorer.exe will restart itself occasionally...Explorer.exe is the default shell in Windows so if it's terminated Windows will restart it immediately. This solution will make the computer unstable because of the constant terminating and restarting of Explorer. – Twisty Impersonator Oct 9 at 21:45
  • 1
    Right. The point isn't so much how quickly Explorer gets restarted, but that it will and it will be done over and over. This is visible to the end user and is not suitable for establishing a kiosk-style interface. – Twisty Impersonator Oct 9 at 21:52

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.