chm

New Member
Joined
Dec 5, 2016
Messages
2
Hi there.

Something I used to do in windows 7 doesn't work anymore on windows 10.

What I am trying to achieve is running my own program before desktop initializes, so I can display a simple menu without any desktop gui.

In windows 7 I did it by replacing value
[ HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell ]
with exe of my program.

When I wanted to restore regular desktop I simply called "explorer.exe" from my program (or taskmanager) and desktop was initialized as normal.

In windows 10 however it doesn't work that way. After changing winlogon\shell value in regedit calling "explorer.exe" only brings up standard Windows Explorer window but desktop and taskbar just don't initialize.

I searched google but couldn't find any solution to this.
Does anyone know what is the difference between win7 and win10 in this behavior?

Cheers
 


Solution
Looks like sihost.exe needs to be started for the taskbar to work.

I already tried that but it doesn't work that way.

Anyway I managed to achieve what I wanted. It is dirty and has lots of downsides but it works. I spent few hours on it so I'll describe it.

Apparently whole desktop init is made by C:\Windows\system32\userinit.exe but it takes value of Winlogon\Shell process to start.
So I changed default value of Shell to my program in regedit. If I want to turn on regular desktop from my program I start autohotkey script I wrote, ran with admin privileges (ran by windows scheduler so it doesn't prompt for approval). It changes value of Shell to 'explorer.exe' just for a moment of userinit.exe starts. After userinit finishes...
Windows Vista through 8.1 all share the same kernel base code. Windows 10 was a completely new kernel and the architecture it very different. It's hard to say what else you would need to launch in order to get the taskbar running
 


Looks like sihost.exe needs to be started for the taskbar to work.
 


Looks like sihost.exe needs to be started for the taskbar to work.

I already tried that but it doesn't work that way.

Anyway I managed to achieve what I wanted. It is dirty and has lots of downsides but it works. I spent few hours on it so I'll describe it.

Apparently whole desktop init is made by C:\Windows\system32\userinit.exe but it takes value of Winlogon\Shell process to start.
So I changed default value of Shell to my program in regedit. If I want to turn on regular desktop from my program I start autohotkey script I wrote, ran with admin privileges (ran by windows scheduler so it doesn't prompt for approval). It changes value of Shell to 'explorer.exe' just for a moment of userinit.exe starts. After userinit finishes it changes it back to my value, so next windows logon will start with my program.

If there is more interest in the subject I could provide a proper tutorial :)
 


Solution
Back
Top