DRY both PersistAppIcon functions, also handle exceptions if trying to copy an icon for an app with encrypted icon when the SteamGridDB integration is disabled, defaulting to the app.Icon itself
- Upgrade to .net 4.8
- Move System.Management.Automation from Powershell to system's
- The older System.Management.Automation hass been deprecated for legacy .Net apps, so I have to either port UWPHook to .net core or use another legacy focused powershell package, not in the mood for either right now, this can be located at C:\Windows\assembly\GAC_MSIL\System.Management.Automation\1.0.0.0__31bf3856ad364e35\System.Management.Automation.dll
- Add System.Net.HTTP.formatting
- Migrate to PackageReference
This should provide more consistency on future releases and a better usage of the capabilities of the NSIS script language, foregoing of the zip based installer
Added a special mode for Steam in-home Streaming, it fools Steam into
streaming the whole desktop then it brings the launched app to the
foreground.
Now, UWPHook will export the app icon to Steam when exporting new games,
it automatically decides on the biggest jpg to be used as icon.
Detecting better which name is the real name of the app.
Detecting if a installed appx is framework properly and excluding it
from the list.
Detecting appx bundles and properly listing individual entries.
Detecting icons to use
Small project to link UWP games and XboxGamePass to Steam
If you want to add Windows Store Games to Steamyou need to do a bit of a warkaround because Steam can't see UWP apps, and there's a chance Steam won't show it on your "Currently playing" status. This app aims to simplify a little bit the process where it is possible by automating the scripting and launching of Windows Store apps and games.
If you want to add Windows Store or Xbox Game Pass Games to Steam, you need to do a bit of a workaround because Steam can't see UWP apps, and there's a chance Steam won't show it on your "Currently playing" status. This app aims to simplify a little bit the process where it is possible by automating the scripting and launching of Windows Store apps and Xbox Game Pass games.
# To add UWP games to Steam #
# To add UWP or XGP games to Steam #
[Download the latest version of UWPHook](https://github.com/BrianLima/UWPHook/releases) and store it somewhere on your PC.
![](http://i.imgur.com/wOV8QwD.png)
Click on the 🔄 to load installed UWP Apps, we will find every UWP app and Xbox Game Pass game installed on your PC.
Click "load installed UWP Apps", we will find every UWP app installed on your PC.
![](https://i.imgur.com/pjGfGHe.png)
![](http://i.imgur.com/ppivtS5.png)
Select every app you want to add to Steam, you can change the name by double clicking the "name" collumn, press "Export selected apps to Steam" and 🎉, every app you selected will be added to Steam.
Select every app you want to add to Steam, change the name by doubleclicking the "name" collumn, press "Export selected apps to Steam" and boom, every app you selected will be added to Steam.
![](https://i.imgur.com/on46CMQ.png)
Close UWPHook, restart Steam, click play on your UWP game, and Steam will show your current game on your status as long as you are playing it!
Close UWPHook, restart Steam if prompted, click play on your UWP game, and Steam will show your current game on your status as long as you are playing it!
----------
# Troubleshooting #
# SteamGridDB #
- **Steam's Overlay isn't working!**
- Unfortunately, it's a Steam limitation, Valve has to update it in order to work properly with UWP, DXTory is a recommended overlay for UWP games.
Since v2.8, UWPHook can automatically import grid, icons and hero images from [SteamGridDB](https://www.steamgriddb.com)
On your first usage, the app will ask you if you want it to download images, redirecting you to the settings page.
![](https://i.imgur.com/K0Cm4IL.png)
- **Steam Link launches the game but input doesn't work!**
- Unfortunately, another limitation by Steam, i have some ideas as to why it isn't working, but i can't give an ETA for when i can fix this, or even if it's fixable on my end, since Valve didn't released the Link in Brazil and i can't get one to test.
By adding a API Key obtained in the SteamGridDB preferences, UWPHook will try to find matching images for any exported games, giving you the following result:
- **Steam Controller isn't working**
- Another limitation by Steam, some people reported it works with "Desktop Mode" configuration, but i can't verify this.
![](https://i.imgur.com/mlvVdwb.png)
You can refine the images by using filters for animated images, blurred, no logo or memes for example, but it will always pick the first it finds for the filters automatically.
Special thanks to @FusRoDah061 for implementing the base feature!
# Troubleshooting #
- **Steam's Overlay isn't working!**
- Unfortunately, it's a Steam limitation, Valve has to update it in order to work properly with UWP, DXTory is a recommended overlay for UWP games.
- **Using Steam Link**
- Check the option "Streaming" mode inside the settings screen
- **Steam Deck?**
- This app is not compatible with the Steam Deck in any way.
If you are facing an error of any kind, please check the contents of the file
- **I have shortcuts from other application that broke when i used UWPHook**
- You can find a backup of your `shortcuts.vdf` file in `%appdata%\Roaming\Briano\UWPHook\backups`, each file in this directory is a backup of the original `shortcuts.vdf` before manipulation by UWPHook, the files are renamed `{userid}_{timestamp}_shortcut.vdf`, you can restore these files to their original location for usage.
- **My question isn't listed here!**
- Drop by our subreddit and ask a question over there, maybe someone will help you, i surely will as soon as i can
- Drop by our subreddit and ask a question over there, maybe someone will help you, i surely will as soon as i can:
- Please also paste the contents of the file `%appdata%Roaming\Briano\UWPHook\application.log` so i can try to understand better the problem.
----------
# Building
- Clone project or forked project.
- Install Visual Studio 2022 with .NET Framework 4.8.
- Install [SharpSteam by BrianLima](https://github.com/BrianLima/SharpSteam/releases/) and [VDFParser](https://github.com/brianlima/VDFParser) and build.
- If the project asks for the references for VDFParser and Sharpsteam, point it to the most recent build.
- Press run!
## Installer
The installer is built with [NSIS](https://nsis.sourceforge.io/Download), just run the script `UWPHook.nsi` and things **should** work. Modify any hardcoded paths to suit your setup.
The installation consists of zipping the application and creating some of the paths for the user, since the application is mostly static/dynamic and does not depend a lot on where it is installed, the installer is made for convenience.
----------
# About #
# About
This software is open-source under the MIT License.
It will mostly likely break withouth any heads up, since any API, file format, script and many other things used by it may be changed by Valve or Microsoft withouth prior notice.
I am not responsible if anything breaks.
If you like what i did with it and want to suport me, you can cheer me up at my [Twitter](http://www.twitter.com/brianostorm "Twitter") or [pay me a coffee via Paypal, it will help me to continue to build amazing open source tools for you!"](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9YPV3FHEFRAUQ")
If you like what i did with it and want to suport me, you can cheer me up at my [Twitter](http://www.twitter.com/brianostorm "Twitter") or [pay me a coffee via Paypal, it will help me to continue to build amazing open source tools for you!"](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9YPV3FHEFRAUQ)
<Label x:Name="label1" Content="Welcome to UWPHook, the easier way to add UWP games and apps to Steam!" HorizontalAlignment="Left" Margin="172,-14,0,0" VerticalAlignment="Top" Foreground="#DDFFFFFF"/>
</materialDesign:ColorZone>
<Image x:Name="image" HorizontalAlignment="Left" Width="178" Height="80" VerticalAlignment="Top" Source="Resources/WhiteTransparent.png" Stretch="UniformToFill" ToolTip="Welcome to UWPHook, add your UWP apps and games to Steam!"/>
<TextBlock HorizontalAlignment="Left" Margin="10,9,0,0" Grid.Row="2" TextWrapping="Wrap" Text="Made for you with <3, code and coffee by Brian Lima @brianostorm, do you like my work? Support me by downloading my other projects or by paying me a coffee via paypal!" VerticalAlignment="Top" Width="633" Height="47" TextAlignment="Justify"/>
<Label x:Name="label1" Content="Welcome to UWPHook, the easier way to add UWP games and apps to Steam!" HorizontalAlignment="Left" Margin="172,-14,0,0" VerticalAlignment="Top" Foreground="#DDFFFFFF"/>
<Label x:Name="label1" Content="Welcome to UWPHook, the easier way to add UWP apps and XGP games and apps to Steam!" HorizontalAlignment="Left" Margin="172,-14,0,0" VerticalAlignment="Top" Foreground="#DDFFFFFF"/>
</materialDesign:ColorZone>
<Image x:Name="image" HorizontalAlignment="Left" Width="178" Height="80" VerticalAlignment="Top" Source="Resources/WhiteTransparent.png" Stretch="UniformToFill" ToolTip="Welcome to UWPHook, add your UWP apps and games to Steam!"/>
<Label x:Name="label" Content="Press 'Load installed apps' to get a list of installed apps on your system." HorizontalAlignment="Left" Margin="0,-10,0,0" VerticalAlignment="Top"/>
<Label x:Name="label" Content="Press 'Load installed apps' to get a list of installed titles." HorizontalAlignment="Left" Margin="0,-10,0,0" VerticalAlignment="Top"/>
//When length is 1, the only argument is the path where the app is installed
if(Environment.GetCommandLineArgs().Length>1)
{
Launcher();
}
// When length is 1, the only argument is the path where the app is installed
_=LauncherAsync(args);// Launches the requested game
}
else
{
//auto refresh on load
LoadButton_Click(null,null);
}
}
privatevoidLauncher()
/// <summary>
/// We have to wait a little untill Steam catches up, otherwise it will stream a black screen
/// </summary>
/// <returns></returns>
asyncTaskLaunchDelay()
{
this.Title="UWPHook: Playing a game";
awaitTask.Delay(10000);
}
/// <summary>
/// Main task that launches a game
/// Usually invoked by steam
/// </summary>
/// <param name="args">launch args received from the program execution</param>
/// <returns></returns>
privateasyncTaskLauncherAsync(string[]args)
{
FullScreenLauncherlauncher=null;
//So, for some reason, Steam is now stopping in-home streaming if the launched app is minimized, so not hiding UWPHook's window is doing the trick for now
if(Settings.Default.StreamMode)
{
this.Hide();
launcher=newFullScreenLauncher();
launcher.Show();
awaitLaunchDelay();
launcher.Close();
}
else
{
this.Title="UWPHook: Playing a game";
this.Hide();
}
//Hide the window so the app is launched seamless making UWPHook run in the background without bothering the user
thrownewException("Error while trying to write your Steam shortcuts"+Environment.NewLine+ex.Message);
Log.Error("Error: Program failed while trying to write your Steam shortcuts"+Environment.NewLine+ex.Message);
thrownewException("Error: Program failed while trying to write your Steam shortcuts" +Environment.NewLine+ex.Message);
}
}
catch(Exceptionex)
{
Log.Error("Error: Program failed while trying to clear your Steam shortcuts:"+Environment.NewLine+ex.Message+ex.StackTrace);
MessageBox.Show("Error: Program failed while trying to clear your Steam shortcuts:"+Environment.NewLine+ex.Message+ex.StackTrace);
}
}
MessageBox.Show("All non-Steam shortcuts has been cleared.");
}
MessageBox.Show("Your apps were successfuly exported, please restart Steam in order to see your apps in it.","UWPHook",MessageBoxButton.OK,MessageBoxImage.Information);
}
/// <summary>
/// Fires the Bwr_DoWork, to load the apps installed at the machine
varboxResult=MessageBox.Show("Do you want to automatically import grid images for imported games?","UWPHook",MessageBoxButton.YesNo,MessageBoxImage.Question);
<Image x:Name="image" HorizontalAlignment="Left" Width="178" Height="80" VerticalAlignment="Top" Source="Resources/WhiteTransparent.png" Stretch="UniformToFill" ToolTip="Welcome to UWPHook, add your UWP apps and games to Steam!"/>
<Label ToolTip="Some apps use the system language to choose what language to display, this setting will store your current language, change it so you can play in another language and then revert your system back to your default display language." x:Name="label1" Content="Set system language when launching an app*" Margin="5,48,0,0" VerticalAlignment="Top" Height="29" Grid.Column="1" Grid.ColumnSpan="2"/>
<ComboBox ToolTip="Some apps use the system language to choose what language to display, this setting will store your current language, change it so you can play in another language and then revert your system back to your default display language." x:Name="cultures_comboBox" Margin="0,48,10,0" VerticalAlignment="Top" Height="31" Grid.Column="3" HorizontalAlignment="Right" Width="93"/>
<Label ToolTip="Some apps use the system language to choose what language to display, this setting will store your current language, change it so you can play in another language and then revert your system back to your default display language." x:Name="label_cultures" Content="Set system language when launching an app*" VerticalAlignment="Center" Height="29" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1"/>
<ComboBox ToolTip="Some apps use the system language to choose what language to display, this setting will store your current language, change it so you can play in another language and then revert your system back to your default display language." x:Name="cultures_comboBox" Margin="0,0,10,0" VerticalAlignment="Center" Height="32" Grid.Column="3" HorizontalAlignment="Right" Width="92" Grid.Row="1"/>
<Label x:Name="label_seconds" ToolTip="If 0, UWPHook will not run in the background and will not update the in-game status" Content="Check if the launched app is running every" VerticalAlignment="Center" Height="29" Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="2"/>
<Label ToolTip="Add these tags to exported games, use comma separated values" x:Name="label_tags" Content="Export with these tags:" Margin="0,0,8,0" VerticalAlignment="Center" Height="29" Grid.Column="1" Grid.Row="5"/>
<Button x:Name="key_Button" Content="{materialDesign:PackIcon Key}" ToolTip="Go to SteamGridDB.com to generate a new key" Grid.Row="8" Height="Auto" Click="key_Button_Click" HorizontalAlignment="Center" VerticalAlignment="Center" />
<Label ToolTip="SteamGridDB API key used to download Steam's library artwork. Leave it blank if you don't want to download artwork." x:Name="label_apiKey" Content="Api Key" VerticalAlignment="Center" Height="29" Grid.Row="8" Grid.Column="1"/>
<Label ToolTip="The main style of the artwork." x:Name="label_artworkStyle" Content="Artwork Style" VerticalAlignment="Center" Height="29" Grid.Row="9" Grid.Column="1"/>
<TextBlock TextWrapping="WrapWithOverflow" x:Name="textBlock" Text="Developed by Brian Lima, @brianostorm, if you like my work cheer me up at my Twitter or pay me a coffee via Paypal, this way i can keep building amazing open-source tools for you!" TextAlignment="Justify" VerticalAlignment="Center" Grid.ColumnSpan="1" Grid.RowSpan="1" Grid.Row="2" HorizontalAlignment="Center"/>
<TextBlock TextWrapping="WrapWithOverflow" x:Name="textBlock" Margin="0,185,0,0" Text="Developed by Brian Lima, @brianostorm, if you like my work cheer me up at my Twitter or pay me a coffee via Paypal, this way i can keep building amazing open-source tools for you!" TextAlignment="Justify" Height="91" VerticalAlignment="Top" Grid.ColumnSpan="3"/>
<TextBlock TextWrapping="WrapWithOverflow" x:Name="textBlock_Copy" VerticalAlignment="Top" Height="59" Text="This project uses the MaterialDesignXAMLToolkit. Special thanks to /r/Forza community at Reddit." TextAlignment="Justify" Grid.Row="4" Grid.ColumnSpan="3"/>
<TextBlock TextWrapping="WrapWithOverflow" x:Name="textBlock_Copy" Height="59" TextAlignment="Justify" Grid.Row="6" Grid.ColumnSpan="1" VerticalAlignment="Top" Margin="0,10,0,0"><Run Text="Special thanks to /r/Forza and /r/Steam communities at Reddit"/><Run Text=", and to all the "/><Hyperlink NavigateUri="https://github.com/BrianLima/UWPHook/graphs/contributors"> contributors </Hyperlink><Run Text=" who have dealt with my bad code"/><Run Text="."/><Run Text=" "/><Run Text=":)"/></TextBlock>
<TextBlock Margin="116,0,0,0" TextWrapping="Wrap" Text="Checkout OverFy, my new app, it add Spotify's now playing status into Rivatuner/MSI Afterburner overlay, Free and Open Source!" VerticalAlignment="Top" Height="63" TextAlignment="Justify" HorizontalAlignment="Left" Width="341"/>
MessageBoxResultresult=MessageBox.Show("This action will remove ALL shortcuts from non-Steam games."+Environment.NewLine+" Are you sure you want to continue?","Warning",MessageBoxButton.YesNo,MessageBoxImage.Warning);
MessageBox.Show(messageBoxText:"You are being redirected to SteamGridDB website!\r\n"+
"Log-in, or create your account, go to your profile preferences and click 'Generate API Key', then paste the key back on UWPHook.","Attention!",MessageBoxButton.OK,MessageBoxImage.Information);