Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More reliable way to detect steam app folder #1056

Open
BenRQ opened this issue Feb 10, 2019 · 1 comment
Open

More reliable way to detect steam app folder #1056

BenRQ opened this issue Feb 10, 2019 · 1 comment

Comments

@BenRQ
Copy link
Collaborator

BenRQ commented Feb 10, 2019

In order to obtain a Steam games folder you have to follow this steps:

  1. find Steam installation folder
  2. check Steam acf files and libraryfolders.vdf

You can find Steam InstallPath in windows registry:

  • 32-bit: HKEY_LOCAL_MACHINE\SOFTWARE\Valve\Steam
  • 64-bit: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Valve\Steam

You can read a Value from a Registry Key using this code:

Dim strSteamInstallPath as String = My.Computer.Registry.GetValue(
    "HKEY_LOCAL_MACHINE\SOFTWARE\Valve\Steam", "InstallPath", Nothing)

MsgBox("The install path is " & strSteamInstallPath)

Once you have Steam main folder (the one containing steam.exe) you can read games installation folder from appmanifest_<steamappid>.acf files contained in \steamapps subfolder.

For example, appmanifest_2280.acf contains informations about Ultimate Doom.

You can search for a particular steamappid or analyze every files and get game name from name key.

Also check libraryfolders.vdf in \steamapps subfolder for other game installation folders.

For example I have some games in D:\mygames so my libraryfolders.vdf is:

"LibraryFolders"
{
	"TimeNextStatsReport"   "xxxxxxxxxxx"
	"ContentStatsID"        "xxxxxxxxxxx"
	"1"                     "D:\\mygames"
}

Once you have this alternative folder, check for acm files contained in \steamapps subfolder.

https://stackoverflow.com/questions/34090258/find-steam-games-folder/34091380#34091380

This method would be much more reliant.

Originally posted by @redwolf2 in #656 (comment)

@BenRQ BenRQ added this to the 2.3 milestone Feb 10, 2019
@chrismaliszewski
Copy link

chrismaliszewski commented Feb 10, 2019

I checked the instruction.

The beginning, the Steam installation folder, is fine.

libraryfolders.vdf file also contains what the instruction says.
Additional info: each installation folder has its own increasing stringify ID number beginning from "1", i.e.:

"LibraryFolders"
{
	"TimeNextStatsReport"		"XXXX"
	"ContentStatsID"		"XXXX"
	"1"		"D:\\Gry\\Steam"
	"2"		"P:\\Gry\\Steam"
}

The location of the appmanifest_XXXXXX.acf files isn't right. The files are not stored inside the Steam main folder but instead separately inside each Library Folder. So in my case, inside D:\Gry\Steam\steamapps\ I have several *.acf files. A structure of a file type is as follows:

"AppState"
{
	"appid"		"APP_ID"
	...
	"name"		"NAME_OF_A_GAME"
	"StateFlags"		"4"
	"installdir"		"NAME_OF_A_DIR_WHERE_THE_GAME_IS_INSTALLED_INSIDE_\common\_CATALOGUE"
	"LastUpdated"		"1549341958"
	"UpdateResult"		"0"
	...
	"buildid"		"753362"
	...
	"UserConfig"
	{
		"language"		"english"
	}
	...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Valkyrie version 2.4
  
Low priority
Development

No branches or pull requests

3 participants