When you launch an item in your collection, the launcher will execute the .bat pointing to your link. The .bat launches the application, and retroFE waits until its finished. Tell me if you still have trouble, as there are plenty .bat code variations in case you still have the problem.
The problem is that these exe files require a specific launcher to do some sort of fixup on them before they'll run, but the launcher itself doesn't keep running once the game starts. RetroFE (or whatever batch file you launch with RetroFE) detects that the launcher has died, but does not realize that there is a new process to wait for.
We need a way to tell the program RetroFE launches directly to keep running until a process
other than the one that it starts itself stops running. My PowerShell script shows a way to do this by knowing both the exe/bat/lnk file that launches the game and the process name that represents the game process itself, which will be different from the launcher. The trick is to devise a PowerShell script and a means of launching it from RetroFE with both the pathname of the item that launches the game and the string that will show up in the process list as the name of the game process itself. I don't run RetroFE in Windows myself typically, aside from testing builds, so I'm hoping someone who does can experiment with this technique a bit to get it working right.
I have modified the PowerShell script to take parameters:
param (
[string]$exename,
[string]$procname
)
Write-Host Launching $exename
Invoke-Item $exename
Write-Host It was launched
$proc_id = (Get-Process $procname).id
Wait-Process -id $proc_id
Write-Host It was closed
If you name that
pslauncher.ps1
you should be able to call it with parameters like this:
powershell -executionpolicy bypass -file C:\RetroFE\pslauncher.ps1 C:\Games\GameDir\FunGameLauncher.lnk FunGame
assuming you replace the pathnames with real ones and use the right name for the game's process name. If the process name of the final game exe ends up being related to the game item name from RetroFE, it should be pretty straightforward to get a launcher configuration set up to use this technique.
The script you pass in the $exename parameter doesn't have to be an exe; it can be anything that will launch a program when you double-click on it, but it has to have the full path. It will probably help if both the $exename and $procname can be derived from something from RetroFE like %ITEM_NAME%, but I have no idea how the Windows process names are actually determined.