Posted: Wed Jul 01, 2020 3:05 am Post subject:
Finding game path and installed mods programmatically?
Does anyone know of a way to identify the game path programmatically (e.g. reading something from registry) or how I can identify the installed mods and their paths programmatically? QUICK_EDIT
Also Known As: banshee_revora (Steam) Joined: 15 Aug 2002 Location: Brazil
Posted: Wed Jul 01, 2020 4:36 am Post subject:
That is... not... easy at all. The easiest solution is to ask the user. Really. But if this is not an option....
Steam:
1) You need to find out where Steam is originally installed.
Registry -> HKEY_CURENT_USER/SOFTWARE/VALVE/Steam
Then, read SteamPath.
2) In Steam Install directory, look for config directory. There is a file called config.vdf.
It is a text file, but you shouldn't bother about most of its content.
Focus on anything like BaseInstallFolder_X (where X is a number). Then, get the installation directory there. Then look for "1213210" and check if you find it before the next BaseInstallFolder_.
3) From that you add steamapps/CnCRemastered to the directory you have found and voila!
Origin:
Note: I do not have C&C: Remastered Edition on Origin, so I'll try to emulate it for another game and you may need to figure out how to use this information to find C&C Remastered there.
1) Find Origin game's directory.
Go to the current user directory on Windows (I.e.: C:\Users\MyUser
Inside it, look for AppData\Roaming\Origin\local.xml
And there's a line there that should give you the dir on Settings -> <Setting type="10" key="DownloadInPlaceDir" value="TheDirectoryIsHere!!!!"/>
2) Go to that directory and add \CnCRemastered to it.
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum