Skip to content

Manual: Setting Playnite as the default shell

Motion Development edited this page Sep 13, 2024 · 7 revisions

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 pre-requisites 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
}

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 Batchscript:
@ECHO OFF
START explorer
EXIT
  1. build the exe and ensure its name when saved is Windows-Shell.exe and saved to

Clone this wiki locally