How do I start windows 7 explorer in desktop mode when an application is runnig as shell?

StackOverflow https://stackoverflow.com/questions/18393858

  •  26-06-2022
  •  | 
  •  

Pregunta

I wrote an application for a parking garage that has to be "fool proof"... One of the things I'm doing is that I start the application as shell instead of the explorer. (HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell set to my application).

Inside this application I implemented a little service dialog, well protected from the user, that allows me to start e.g. the explorer. What I'd need now is a way to start the explorer as desktop.

Is there a way to do this?

¿Fue útil?

Solución

According to this discussion on Technet it's not possible.

It is NOT possible to set explorer as shell without designating it as shell in the registry key.

Keeping explorer as shell in the registry, but killing explorer.exe and launching your shell work as an option for you?

I dont see any other clean way around.

One user posted a possible solution though.

change HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell to "explorer.exe"

run "userinit.exe"

change HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell back to your custom shell

My Code (autoit)
RegWrite('HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon','Shell',"REG_SZ",'Explorer.exe')
Run('userinit.exe')
ProcessWait('explorer.exe')
RegWrite('HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon','Shell',"REG_SZ",@ScriptFullPath)

I've had to do a similar thing in the past, with a mobile device running in kiosk mode. For debugging purposes on-site I did this:

  • On application startup, check for a config setting like debug = true. If so, boot explorer.exe instead.
  • Connect to the device, set this setting and reboot if you want to debug.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top