RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    [Solved] Launching Xbox Gamepass Games on Windows

    Scheduled Pinned Locked Moved Help and Support
    pc gamewindows
    3 Posts 2 Posters 1.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      Tunes0710
      last edited by Tunes0710

      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 :-)

      1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by

        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.

        T 1 Reply Last reply Reply Quote 0
        • T
          Tunes0710 @mitu
          last edited by Tunes0710

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

          f04dde76-8375-4323-9b14-2973058da5f4-image.png

          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 URL

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

          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          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.