11-15-2021, 09:56 PM
(This post was last modified: 11-15-2021, 10:02 PM by RashFaustinho.)
Hello there
I'm writing this because it took me actually some time to figure it out, so I hope I am saving someone's time out there in understanding how to archive this effect.
Main Objective: Make it so that Playnite starts at boot replacing explorer.exe, and making a game/app inside Playnite itself to start explorer.exe and using Windows as intended.
Why would you want to do that? Isn't there already a way to auto start Playnite at boot?
Yes there is, but when you do, the Desktop and all of his icons flash before you. Windows FIRST starts his main components (including explorer.exe) and THEN it starts playnite.
I have an handled windows gaming device, so the less I see Windows, the more it feels like a proper portable console!
CONS: Be aware, we WILL be touching the regedit / registry values of Windows, which are key values that make the PC work as intended. If you don't know what these are, just stick with Playnite in normal auto-boot.
___________________________________
The registry value which is responsible for booting up explorer.exe is located here:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
The "Shell" value, to be exact. In normal circumstances, it should be explorer.exe
You change it to the Playnite fullscreen app path, and that's it, the next time you boot, explorer will be gone and Playnite will start in his place.
Now, there is a catch. If you change this value NOW, and change it to the Fullscreen exe path, everything will look normal at first, but you'll soon figure out that explorer is broken: even if you start it with the task manager, the graphics of the task bar and that of the entire desktop are missing. You are able to use just an explorer window to navigate throught the files, but that's about it.
This is because explorer.exe, in order to work properly, has to be the shell value in winlogon (the key registry value we talked before). If it's not, then explorer.exe cannot start properly.
So, we have to create a batch file which we will use in playnite in order to boot explorer.exe the "proper" way.
This "proper" way consists in setting explorer.exe as the shell value for 1 second, starting it, and then putting back Playnite fullscreen app as winlogon shell.
MY code (you have to change the path for the Fullscreen, which is different in your PC obv)
Now, put this in a notepad, change the path which is written there for the app, and save it as a .bat file.
We cannot use this file yet, we have to convert it in a proper exe which will ask for (mandatory) admin rights.
Without admin rights, this batch file simply doesn't work.
You can convert a bat file into an exe with this tool right here:
Bat To Exe Converter 2.4.8.0 | Blind Help Project
Download the portable version so that you won't install unnecessary stuff.
Check the flags for the admin rights and for the invisible program, then simply convert it into an exe. It should be all very simple and self-explainatory.
You got an exe now. Simply put it into Playnite as if it were a game. Put a Windows cover art in it so it looks prettier (most important passage)
When you boot this exe you made just now, it will ask for admin rights. Answer yes, and explorer will return as normal.
Shutdown the PC, and the next time it will boot up, Playnite will STILL boot up in place of explorer. Just select your Windows app/game any time you want to return to regular Windows.
Maybe also put a "Stop-Process -name "Playnite.FullscreenApp"" as a Playnite internal script so that the frontend shuts down as well right when you return to "regular" Windows usage
I'm writing this because it took me actually some time to figure it out, so I hope I am saving someone's time out there in understanding how to archive this effect.
Main Objective: Make it so that Playnite starts at boot replacing explorer.exe, and making a game/app inside Playnite itself to start explorer.exe and using Windows as intended.
Why would you want to do that? Isn't there already a way to auto start Playnite at boot?
Yes there is, but when you do, the Desktop and all of his icons flash before you. Windows FIRST starts his main components (including explorer.exe) and THEN it starts playnite.
I have an handled windows gaming device, so the less I see Windows, the more it feels like a proper portable console!
CONS: Be aware, we WILL be touching the regedit / registry values of Windows, which are key values that make the PC work as intended. If you don't know what these are, just stick with Playnite in normal auto-boot.
___________________________________
The registry value which is responsible for booting up explorer.exe is located here:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
The "Shell" value, to be exact. In normal circumstances, it should be explorer.exe
You change it to the Playnite fullscreen app path, and that's it, the next time you boot, explorer will be gone and Playnite will start in his place.
Now, there is a catch. If you change this value NOW, and change it to the Fullscreen exe path, everything will look normal at first, but you'll soon figure out that explorer is broken: even if you start it with the task manager, the graphics of the task bar and that of the entire desktop are missing. You are able to use just an explorer window to navigate throught the files, but that's about it.
This is because explorer.exe, in order to work properly, has to be the shell value in winlogon (the key registry value we talked before). If it's not, then explorer.exe cannot start properly.
So, we have to create a batch file which we will use in playnite in order to boot explorer.exe the "proper" way.
This "proper" way consists in setting explorer.exe as the shell value for 1 second, starting it, and then putting back Playnite fullscreen app as winlogon shell.
MY code (you have to change the path for the Fullscreen, which is different in your PC obv)
@echo off
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "explorer.exe" /f
timeout /t 1
start explorer.exe
timeout /t 1
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "D:\Playnite\Playnite.FullscreenApp.exe" /f
exit
Now, put this in a notepad, change the path which is written there for the app, and save it as a .bat file.
We cannot use this file yet, we have to convert it in a proper exe which will ask for (mandatory) admin rights.
Without admin rights, this batch file simply doesn't work.
You can convert a bat file into an exe with this tool right here:
Bat To Exe Converter 2.4.8.0 | Blind Help Project
Download the portable version so that you won't install unnecessary stuff.
Check the flags for the admin rights and for the invisible program, then simply convert it into an exe. It should be all very simple and self-explainatory.
You got an exe now. Simply put it into Playnite as if it were a game. Put a Windows cover art in it so it looks prettier (most important passage)
When you boot this exe you made just now, it will ask for admin rights. Answer yes, and explorer will return as normal.
Shutdown the PC, and the next time it will boot up, Playnite will STILL boot up in place of explorer. Just select your Windows app/game any time you want to return to regular Windows.
Maybe also put a "Stop-Process -name "Playnite.FullscreenApp"" as a Playnite internal script so that the frontend shuts down as well right when you return to "regular" Windows usage