Skip to main content

Launching the Xbox app using Sunshine (Windows)

Launching the Xbox app is my preferred way to play Game Pass games through Moonlight since it has controller support and I don't have to add games individually to Sunshine. Just like launching Steam in Big Picture mode.

Sunshine runs as a system user on the host machine. This sometimes causes apps launched through it to run as the system user instead of the user that's logged in to Windows. This is an issue with the Xbox App, but here's a work around using scheduled tasks in Windows to make it launch as your Windows user.

  1. Open Task Scheduler
  2. (Optional) I like to have a folder for my own custom tasks for organizational purposes. Right click Task Scheduler Library, select New Folder, and name it whatever you want.
  3. Right click the folder where you would like to create your task and select Create Task (not Basic Task).
  4. In the Name field enter whatever you want, such as "Launch Xbox App".
  5. Under Security Options and User account, your computer name and Windows username should already be displayed.
    If not, click Change User or Group, enter your Windows username, and click Ok.
  6. Enable Run only when  user is logged on.
  7. Click on the Actions tab and click New.
  8. Set Action to Start a program.
  9. Set Program/script to explorer.exe
  10. Set Add Arguments to shell:appsfolder\Microsoft.GamingApp_8wekyb3d8bbwe!Microsoft.Xbox.App
  11. Click Ok.
  12. Click the Settings tab.
  13. Enable Allow task to be run on demand.
  14. Click Ok.
  15. Test your task by right-clicking it and selecting Run. The Xbox App should launch.
  16. You can now close Task Scheduler.
  17. Open your Sunshine settings page and go to the Applications page.
  18. Create a new application entry named Xbox.
  19. Add this as a detached command: schtasks.exe /run /tn "\Launch Xbox App", where Launch Xbox App is the name of the task. If you put it in a folder, you need to add that as well, such as "\My Tasks\Launch Xbox App".
  20. Set Working Directory to your Windows user directory. If you don't know what it is, open Command Prompt and enter echo %USERPROFILE%.
  21. Click Save.

You should now be able to launch the Xbox app from Moonlight.