Manual: Setting Playnite as the default shell - MotionDevelopment123/Motion-Shell GitHub Wiki

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.

Getting started:

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/

Setup

Setting Playnite as the default Shell program

  1. 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).

  2. 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

  3. 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.

Setting Playnite to open explorer upon closure

  1. Open Playnite in desktop mode and click the logo at the top left to select Settings and go to Scripts and select Application Scripts

  2. 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
        }
    
 }
  1. 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
}
  1. Click Save.

Creating a exe to open explorer

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

  1. Open your bat2exe program and enter the following Batch script:
@ECHO OFF
START explorer
EXIT
  1. 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.