Installation
Updated: 22/09/2024
Updated: 22/09/2024
This guide will walk you through the steps to set Playnite as your default shell without using my script. If you are not confident using CMD, Powershell or making edits to your registry i would recommend using my script to automate the process.
Before we can start you need to ensure the following prerequisites are met:
Playnite installed (can also be setup for portable installs)
Playnite is closed (use "Exit Playnite" from within playnite, using the X to the top right will minimise it into the System Tray)
Any BAT to EXE converter, I personally use the following: https://www.battoexeconverter.com/
Locate where you have installed Playnite to, this can usually be found at C:\Users\%USERNAME%\AppData\Local\Playnite (Copying and pasting the address provided into explorer will take you to that location on the profile currently signed in).
Open Registry Editor and paste Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon into the top bar or manually navigate there through the sidebar
In this registry we need to right click and select New > String Value, Name the new value shell and double click the new value and paste the location of your Playnite.Fullscreen.exe such as C:\Users\Motion\AppData\Local\Playnite\Playnite.Fullscreen.exe then confirm with OK once done, Registry Editor can now be closed.
Open Playnite in desktop mode and click the logo at the top left to select Settings and go to Scripts and select Application Scripts.
Paste the following into the Execute on application start section:
if((get-process "EXPLORER" -ea SilentlyContinue) -eq $Null){
"Not Running"
#not running
}
else{
"Running"
if ($PlayniteApi.ApplicationInfo.Mode -eq "Fullscreen")
{
TASKKILL /IM EXPLORER.EXE /F
}
else
{
# DESKTOPmode
}
}
6. in Execute on application shutdown paste the following:
if ($PlayniteApi.ApplicationInfo.Mode -eq "Fullscreen")
{
START-PROCESS "C:\Users\$env:USERNAME\Motion-Shell\Playnite-NSV\Windows-Shell.EXE"
}
else
{
# Execute when running in Fullscreen mode
}
7. Click Save.
Why this needs to be done?
When playnite runs the closing script tries to open explorer as a child process of its own instead of as its own separate process, using the bat2exe converter we can use a bat file that opens explorer as a new process.
Setup
Open your bat2exe program and enter the following Batch script:
@ECHO OFF
START explorer
EXIT
build the exe and ensure its name when saved is Windows-Shell.exe and saved to C:\Users\%USERNAME%\Motion-Shell\Playnite-NSV due to the way the above scripts are set, if you want to change this you would need to also change some of the above scripts.
Playnite is now set as the default shell when you next sign in, whenever you enter Playnite's fullscreen mode if the Window shell is open it will be closed and when you re enter desktop mode or exit Playnite the windows Shell is restored.
If you add a desktop or start menu shortcut to the Playnite.Fullscreen.exe it will reclose the Windows shell and return to the gaming mode similar to how the Steam Deck works.