Windows – How to prevent explorer starting as a shell in a kiosk setting

Securityshellwindowswindows-explorer

I'm using an alternative shell (a simple program that restarts a kiosk application if it dies) for a project I'm working on. I've set it via the Shell value in the registry, and I'm not using explorer.exe at all.

However, whenever the windows default file chooser opens, I can just right click on a directory and click open, then explorer will start up, even though I'm not using it as a shell. Is there any way to stop explorer from ever starting up? If I change its name to something like explorer.exe.bak, is there likely to be any negative side-effects?

Best Answer

On Windows, explorer.exe is a program just like any other. It can be started, stopped and restarted, just like any other program. The only difference is that it's also capable of being used as a shell.

Switching the shell will not prevent explorer.exe from being run, in much the same way as it won't prevent notepad.exe from being run. You can hack around, but bear in mind that you're interfering with behaviour that is by design.

I said it before, but it's worth repeating: a brute force approach is normally an indication that built-in functionality is not being used optimally.

For restarting a kiosk app if it dies, I think you're taking the wrong approach. I'd be writing a service that polls the app every few seconds (making sure to Sleep () between polls...!) that would accomplish the same. Consideration of how the whole setup would work if one was to reboot the computer (i.e. the kiosk app is dying, but this is intended behaviour) would also need to be taken.

From there, don't be looking to block explorer.exe from running, but instead investigate the "Prevent access to these drives from My Computer" GPO setting. It may also be worthwhile searching on Technet or elsewhere for recommendations relating to running Windows in a kiosk mode.