Process.Start("explorer.exe"); won't bring back taskbar
Asked Answered
N

2

7

As of right now, I am working on a mock up OS via WinForms to use as a prop for movies. Upon running the application, it kills explorer.exe so that you can't accidentally have the windows task bar show up during a shoot. The issue is, upon closing the mock OS I would like for explorer.exe to be started up again. However, Process.Start("explorer.exe"); brings up an explorer window, and does not re-instate the window taskbar.

I know for a fact, that task manager is more than capable of bringing back the window taskbar via typing "explorer.exe" under a new task, though I've had no luck finding command line arguments to pass to task manager.

Edit: I'm running under Windows 7. As well, I'm going pretty in depth with this mock OS. I'm taking control of quite a few key presses that Windows uses. For this reason, I kill explorer.exe so that I can use key presses such as "Alt-Tab" and display a mock app switcher, etc. The app already runs in full screen, but it is still possible to have the underlying Windows GUI pop back up. I am essentially replacing explorer.exe with my own mock up explorer. Upon closing my custom explorer, I can't seem to get the regular Windows GUI to come back by launching explorer.exe via Process.Start();.

Nap answered 15/8, 2013 at 20:36 Comment(4)
Why not simply run fullscreen?Orling
I'm running under windows 7, however, the mock OS will have to be built to work with any version of windows.Nap
See the answer about how to make the winform the topmost item, which hides the taskbar...Godson
Create a full screen window and leave Explorer alone blogs.msdn.com/b/oldnewthing/archive/2013/08/01/10438543.aspxOllieollis
T
15

From here:

Try

Process.Start(Path.Combine(Environment.GetEnvironmentVariable("windir"), "explorer.exe"));

It appears you must specify the full path to explorer to get the taskbar back.

Tout answered 15/8, 2013 at 21:23 Comment(0)
C
0

From here:

Explorer must see some fulfilled conditions to launch as shell:

  1. Explorer must not run (which includes Control Panel, for instance)
  2. Explorer must see it is the actual shell - hence you need to replace that value before launching explorer.exe (could change it back a few seconds later)
  3. Sometimes it seems (on newer Windows versions) it depends on the process that launches explorer.exe - if it is "known" to explorer.exe -- I don't have any more details for this part though (and you couldn't change it, unfortunately)
Concinnity answered 3/3, 2019 at 14:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.