GameFinder.RegistryUtils
1.2.0
See the version list below for details.
dotnet add package GameFinder.RegistryUtils --version 1.2.0
NuGet\Install-Package GameFinder.RegistryUtils -Version 1.2.0
<PackageReference Include="GameFinder.RegistryUtils" Version="1.2.0" />
paket add GameFinder.RegistryUtils --version 1.2.0
#r "nuget: GameFinder.RegistryUtils, 1.2.0"
// Install GameFinder.RegistryUtils as a Cake Addin #addin nuget:?package=GameFinder.RegistryUtils&version=1.2.0 // Install GameFinder.RegistryUtils as a Cake Tool #tool nuget:?package=GameFinder.RegistryUtils&version=1.2.0
GameFinder
.NET 5 library for finding games on Windows.
Supported Stores
- Steam
- GOG
- Bethesda.net Launcher
- Epic Games Store
OriginTODO
Example
var steamHandler = new SteamHandler();
steamHandler.FindAllGames();
foreach (var steamGame in steamHandler.Games)
{
Console.WriteLine($"{steamGame} is located at {steamGame.Path}");
}
When to use this Library
This library is best used when you have to find multiple different games from different game stores. If you build a tool for only one game then you might better be off finding it via the registry (common method is looking for the Uninstaller). You could still use this library to only find that one game but it's a bit overkill.
If you build some sort of game library manager like Playnite or LaunchBox then you could make massive use of this library.
How it works
Finding Steam Games
Source: SteamHandler.cs
Steam games can be easily found by searching through "Steam Universes". An Universe is simply a folder where you install Steam games. You can find all Universes by parsing the config.vdf
file in Steam/config
. We can get the Steam folder by opening the registry key HKEY_CURRENT_USER\Software\Valve\Steam
and getting the SteamPath
value.
The config.vdf
file uses Valve's KeyValue format which is similar to JSON:
"InstallConfigStore"
{
"Software"
{
"Valve"
{
"Steam"
{
"BaseInstallFolder_1" "F:\\SteamLibrary"
"BaseInstallFolder_3" "E:\\SteamLibrary"
}
}
}
}
What we want to look for are these BaseInstallFolder_X
values which point to a Universe folder. The steamapps
subdirectory contains the appmanifest_*.acf
files we need. .acf
files have the same KeyValue format as .vdf
files so parsing very easy:
"AppState"
{
"appid" "8930"
"Universe" "1"
"LauncherPath" "C:\\Program Files (x86)\\Steam\\steam.exe"
"name" "Sid Meier's Civilization V"
"StateFlags" "4"
"installdir" "Sid Meier's Civilization V"
"LastUpdated" "1600350073"
"UpdateResult" "0"
"SizeOnDisk" "9235434479"
"buildid" "4390913"
"LastOwner" "76561198110222274"
"BytesToDownload" "20736"
"BytesDownloaded" "20736"
"BytesToStage" "26039"
"BytesStaged" "26039"
}
Important in this file are the appid
, name
and installdir
fields. Note: installdir
is the name of the folder in Universe/steamapps/common/
where the game is installed. It is not absolute but relative to the common
folder.
Finding GOG Games
Source: GOGHandler.cs
GOG stores all information in the registry. This can either be at HKEY_LOCAL_MACHINE\Software\GOG.com\Games
or HKEY_LOCAL_MACHINE\Software\WOW6432Node\GOG.com\Games
. Simply open the registry key and get all sub-key names. Each sub-key in GOG.com\Games
is an installed game with the ID being the name of the sub-key:
Now you can iterate over all sub-keys to get all the information you need:
Important fields are path
, gameID
and gameName
.
Finding BethNet Games
Source: BethNetHandler.cs
Finding games installed with the Bethesda.net Launcher was very rather tricky because there are no config files you can parse or simple registry keys you can open. I ended up using a similar method to the GOG Galaxy Bethesda.net plugin by TouwaStar: GitHub. The interesting part is the _scan_games_registry_keys
function in betty/local.py
:
- open the uninstaller registry key at
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall
- iterate over every sub-key:
- find the sub-keys that open the Bethesda Launcher with
bethesdanet://uninstall/
as an argument
- find the sub-keys that open the Bethesda Launcher with
With this you can find all games installed via Bethesda.net. The important fields are DisplayName
, ProductID
(64bit value) and Path
.
Finding EGS Games
Source: EGSHandler.cs
The Epic Games Store uses manifest files, similar to Steam, which contain all information we need. The path to the manifest folder can be found by opening the registry key HKEY_CURRENT_USER\SOFTWARE\Epic Games\EOS
and getting the ModSdkMetadataDir
value. Inside the manifest folder you will find .item
files which are actually just JSON files with a different extension.
See 8AAFB83044E76B812D3D8C9652E8C13C.item
for an example file. Important fields are InstallLocation
, DisplayName
and CatelogItemId
.
Finding Origin Games
TODO
Contributing
See CONTRIBUTING for more information.
License
GPLv3.0, see LICENSE for more information.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net5.0-windows7.0 is compatible. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Microsoft.Win32.Registry (>= 5.0.0)
-
net5.0-windows7.0
- Microsoft.Win32.Registry (>= 5.0.0)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on GameFinder.RegistryUtils:
Package | Downloads |
---|---|
GameFinder.StoreHandlers.Steam
Library for finding games installed with Steam. |
|
GameFinder.StoreHandlers.GOG
Library for finding games installed with GOG Galaxy. |
|
GameFinder
Package Description |
|
GameFinder.StoreHandlers.EGS
Library for finding games installed with the Epic Games Store. |
|
GameFinder.StoreHandlers.Origin
Library for finding games installed with Origin. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
4.3.3 | 3,342 | 10/31/2024 |
4.3.2 | 3,021 | 10/7/2024 |
4.3.1 | 913 | 10/1/2024 |
4.3.0 | 349 | 9/28/2024 |
4.2.4 | 29,957 | 7/4/2024 |
4.2.3 | 896 | 6/25/2024 |
4.2.2 | 4,966 | 6/6/2024 |
4.2.1 | 179 | 6/5/2024 |
4.2.0 | 13,872 | 1/28/2024 |
4.1.0 | 3,944 | 1/8/2024 |
4.0.0 | 8,076 | 9/3/2023 |
3.2.2 | 2,735 | 8/11/2023 |
3.2.1 | 2,030 | 7/25/2023 |
3.2.0 | 852 | 7/25/2023 |
3.1.0 | 3,028 | 5/23/2023 |
3.0.2 | 1,241 | 5/10/2023 |
3.0.1 | 823 | 5/10/2023 |
3.0.0 | 913 | 5/9/2023 |
2.6.0 | 2,458 | 3/7/2023 |
2.5.0 | 4,192 | 1/17/2023 |
2.4.0 | 121,107 | 1/13/2023 |
2.3.0 | 2,350 | 12/16/2022 |
2.2.2 | 8,633 | 11/11/2022 |
2.2.1 | 30,332 | 10/21/2022 |
2.2.0 | 1,594 | 10/21/2022 |
2.1.0 | 1,427 | 10/21/2022 |
2.0.1 | 1,462 | 10/19/2022 |
2.0.0 | 1,900 | 10/15/2022 |
1.8.0 | 7,470 | 6/27/2022 |
1.7.3 | 80,110 | 5/14/2022 |
1.7.2 | 58,444 | 11/10/2021 |
1.7.1 | 24,452 | 8/19/2021 |
1.7.0 | 31,308 | 8/9/2021 |
1.6.4 | 1,662 | 8/3/2021 |
1.6.3 | 2,843 | 7/30/2021 |
1.6.2 | 1,883 | 7/17/2021 |
1.6.1 | 2,308 | 7/10/2021 |
1.6.0 | 1,691 | 7/10/2021 |
1.5.3 | 25,714 | 6/13/2021 |
1.5.2 | 1,760 | 6/9/2021 |
1.5.1 | 1,711 | 6/6/2021 |
1.5.0 | 16,956 | 5/29/2021 |
1.4.1 | 36,379 | 3/26/2021 |
1.4.0 | 1,691 | 3/26/2021 |
1.3.1 | 1,714 | 3/14/2021 |
1.3.0 | 1,808 | 3/13/2021 |
1.2.0 | 1,821 | 3/13/2021 |