[Solved] Launching Xbox Gamepass Games on Windows
-
Hi all.
I'm running the latest nightly ES on a Win 10 machine and have Xbox Gamepass, and would like ES to handle the PC games as well as my retro ones.
I've set it up so it points to a folder containing the .lnk files and issuing %rom% as a launch command, which works.The problem I have, is that I see the Window of the game pop up, but before it goes full screen and loads, ES returns and the game runs behind ES.
The only way I can get to the game (using a control pad) is to exit ES and then I can get to and play the game.Is there any command or something I can do to stop ES doing this. Or a way of bringing the game window "to front"?
Any ideas/suggestions greatly welcomed.
Cheers :-)
-
Instead of using the
.lnk
to launch the game, just run a.cmd
file that actually launches the game. I suspect that COMSPEC runs the.lnk
, then exits, leaving ES thinking the game has exited. -
@mitu Erm. Not exactly... I could maybe get the .bat file to run the .lnk
The problem is, the way the xbox app installs the games is by writing them to <driveletter>:WindowsApps - which I do not have access to.
There is no .exe per say to run, so all I could do would be to run the .lnk from a .bat, which I have tried, but launching the .lnk from the .bat still makes the script think its' finished and then ES returns.
However, I've managed to solve it.
The main thing is to get ES to not return until the game has gone full screen.I borrowed the idea from https://steamcommunity.com/sharedfiles/filedetails/?id=687564452 and was able to figure out how to make a batch file to launch the game.
If anyone has gamepass, the only difference is on the link above it asks you to find the .exe that has been launched, whereas with this, you want the full target of the URLMy Example below is for Forza Horizon 4.
echo off cls cmd /r start "" "shell:appsFolder\Microsoft.SunriseBaseGame_randomlettershere!SunriseReleaseFinal" timeout /t 120
So instead of having "ForzaHorizon4" after the ! I needed to use "SunriseReleaseFinal"
The problem I had, was that ES was still returning too quickly.
If I used pause, then it wouldn't return at all without a keypress.Thankfully Windows 10 has the timeout function.
So by setting a timeout for 120 seconds, this allowed the program to launch and go full screen before ES returned, and when it did, it did so behind the current full screen, allowing me to play the game, and then exit back in to ES.Hopefully this will help someone else who is trying to do the same thing.
I'm going to edit the title to make it a bit more specific.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.