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.
- Open Task Scheduler
- (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.
- Right click the folder where you would like to create your task and select Create Task (not Basic Task).
- In the Name field enter whatever you want, such as "Launch Xbox App".
- 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. - Enable Run only when user is logged on.
- Click on the Actions tab and click New.
- Set Action to Start a program.
- Set Program/script to
explorer.exe
- Set Add Arguments to
shell:appsfolder\Microsoft.GamingApp_8wekyb3d8bbwe!Microsoft.Xbox.App
- Click Ok.
- Click the Settings tab.
- Enable Allow task to be run on demand.
- Click Ok.
- Test your task by right-clicking it and selecting Run. The Xbox App should launch.
- You can now close Task Scheduler.
- Open your Sunshine settings page and go to the Applications page.
- Create a new application entry named Xbox.
- 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". Set Working Directory to your Windows user directory. If you don't know what it is, open Command Prompt and enterecho %USERPROFILE%.- Click Save.
You should now be able to launch the Xbox app from Moonlight.