Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

There's no API from Windows to specifically get installed games. However you can programmatically grab the currently installed programs:

string registry_key = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; using(Microsoft.Win32.RegistryKey key = Registry.LocalMachine.OpenSubKey(registry_key)) { foreach(string subkey_name in key.GetSubKeyNames()) { using(RegistryKey subkey = key.OpenSubKey(subkey_name)) { Console.WriteLine(subkey.GetValue("DisplayName")); } } } 

SourceSource

You will also want to do this for the key:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall

Then, from there, you will need to grab a list from any potential game store front.

For Steam, you want to check for a SteamPath key in: HKEY_CURRENT_USER\Software\Valve\Steam

This will give you the path to the Steam install directory. From here, you are looking for Config\config.vdf. This file can contain several keys in the format BaseInstallFolder_#, which are the individual Steam Library paths. These paths will be where all of Steam's games are stored, although it won't help with 3rd-party games added into Steam manually. Please consult this helpful wiki article for parsing the .vdf file.

There's no API from Windows to specifically get installed games. However you can programmatically grab the currently installed programs:

string registry_key = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; using(Microsoft.Win32.RegistryKey key = Registry.LocalMachine.OpenSubKey(registry_key)) { foreach(string subkey_name in key.GetSubKeyNames()) { using(RegistryKey subkey = key.OpenSubKey(subkey_name)) { Console.WriteLine(subkey.GetValue("DisplayName")); } } } 

Source

You will also want to do this for the key:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall

Then, from there, you will need to grab a list from any potential game store front.

For Steam, you want to check for a SteamPath key in: HKEY_CURRENT_USER\Software\Valve\Steam

This will give you the path to the Steam install directory. From here, you are looking for Config\config.vdf. This file can contain several keys in the format BaseInstallFolder_#, which are the individual Steam Library paths. These paths will be where all of Steam's games are stored, although it won't help with 3rd-party games added into Steam manually. Please consult this helpful wiki article for parsing the .vdf file.

There's no API from Windows to specifically get installed games. However you can programmatically grab the currently installed programs:

string registry_key = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; using(Microsoft.Win32.RegistryKey key = Registry.LocalMachine.OpenSubKey(registry_key)) { foreach(string subkey_name in key.GetSubKeyNames()) { using(RegistryKey subkey = key.OpenSubKey(subkey_name)) { Console.WriteLine(subkey.GetValue("DisplayName")); } } } 

Source

You will also want to do this for the key:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall

Then, from there, you will need to grab a list from any potential game store front.

For Steam, you want to check for a SteamPath key in: HKEY_CURRENT_USER\Software\Valve\Steam

This will give you the path to the Steam install directory. From here, you are looking for Config\config.vdf. This file can contain several keys in the format BaseInstallFolder_#, which are the individual Steam Library paths. These paths will be where all of Steam's games are stored, although it won't help with 3rd-party games added into Steam manually. Please consult this helpful wiki article for parsing the .vdf file.

Source Link
user39686
user39686

There's no API from Windows to specifically get installed games. However you can programmatically grab the currently installed programs:

string registry_key = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; using(Microsoft.Win32.RegistryKey key = Registry.LocalMachine.OpenSubKey(registry_key)) { foreach(string subkey_name in key.GetSubKeyNames()) { using(RegistryKey subkey = key.OpenSubKey(subkey_name)) { Console.WriteLine(subkey.GetValue("DisplayName")); } } } 

Source

You will also want to do this for the key:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall

Then, from there, you will need to grab a list from any potential game store front.

For Steam, you want to check for a SteamPath key in: HKEY_CURRENT_USER\Software\Valve\Steam

This will give you the path to the Steam install directory. From here, you are looking for Config\config.vdf. This file can contain several keys in the format BaseInstallFolder_#, which are the individual Steam Library paths. These paths will be where all of Steam's games are stored, although it won't help with 3rd-party games added into Steam manually. Please consult this helpful wiki article for parsing the .vdf file.