1

I'd like to write my own (very simple) explorer.exe alternative that I could actively switch between without having to restart my computer.

  1. Is it possible to run two shells simultaneosly (or to write a program that temporarily disables the current shell)?
  2. If not, is it possible to stop explorer without it restarting itself, and have my shell start itself instead?

Edit

More info: I'd like to write a simple productivity tool for myself. I want to set up a very simple task manager that prevents me from starting/opening/using anything but a whitelisted set of applications I list ahead of time. Locking me into that set of apps for whatever time period I've set. If there's another (better) way to prevent people from shutting down my app, switching from my app (with alt-tab, etc) I'm all ears.

Note: I'm fine with the app/shell/whatever being escapable by restarting my computer. I just want to make it massively inconvenient to switch to being distracted, and I wanted to learn a bit more about the Windows API.

Chris Pfohl
  • 18,220
  • 9
  • 68
  • 111
  • no joke i've seen viruses replace explorer.exe, so i know it can be done. That said, i have no idea of the difficulty or the official way to do it in a supported manner (or if it's even recommended to do it that way). It may be best to just write your own shell that can live on the system path and be invoked from the explorer shell. Much like a python or php interactive shell. – Mike McMahon May 23 '12 at 22:44
  • Which particular features of the explorer do you want to replace or switch between? – jdigital May 23 '12 at 23:54
  • More info added. Sorry. The question wasn't quite complete enough. – Chris Pfohl May 24 '12 at 01:45
  • Won't help. If you write the software, you know how to start and stop it, hack around it. I don't think it's the right solution. – Evan Trimboli May 24 '12 at 01:51
  • @Evan, I realize I could hack around it, the point it to make it inconvenient to do so. – Chris Pfohl May 24 '12 at 11:19

1 Answers1

1

See this question for details about writing a shell.

  1. No, there can only be one real shell process (SetShellWindowEx only works when there is no other shell process) WH_SHELL can be used by other processes and it might be enough for your needs (Maybe in combination with IShellExecuteHook)

  2. When explorer.exe is started and it detects a different shell it will not display the taskbar, just a file browser window. Explorer also looks at the shell value in the registry IIRC. You might also want to look into the shift to exit trick.

Community
  • 1
  • 1
Anders
  • 97,548
  • 12
  • 110
  • 164