For an upcoming LAN party I finally got around to writing a script to find the path where Company of Heroes is installed so I can spend less time helping people install Blitzkrieg and more time actually playing this fantastic mod. Once the script finds CoH's install path it copies the path to the clipboard so you can paste the path into the Blitzkrieg installers without digging through your directory structure to find the location manually.
I wrote it using AutoHotkey. The script engine can be downloaded here: https://autohotkey.com/
While it is possible to bind the script and engine together into an executable I've chosen to give you the script source code instead so you can see for yourself what it does: https://github.com/RellHaiser/GetCoHPath/blob/master/GetCoHPath.ahk
Hopefully this helps someone here, I know I expect to get some good use out of it shortly.
Script to find RelicCoH.exe
-
- Posts: 19
- Joined: 23 Mar 2016, 20:52
- Location: Edmonton, Canada
-
- Posts: 1107
- Joined: 07 Jan 2015, 15:05
Re: Script to find RelicCoH.exe
But each time I was installing BK the patch was already found by the installer. I doesn't work for others?
Also isn't the BK folder always in the same place?: X:\Program Files (x86)\Steam\steamapps\common\Company of Heroes Relaunch
Also isn't the BK folder always in the same place?: X:\Program Files (x86)\Steam\steamapps\common\Company of Heroes Relaunch
-
- Posts: 19
- Joined: 23 Mar 2016, 20:52
- Location: Edmonton, Canada
Re: Script to find RelicCoH.exe
But each time I was installing BK the patch was already found by the installer. I doesn't work for others?
It does work, but not for fresh installs.
Also isn't the BK folder always in the same place?: X:\Program Files (x86)\Steam\steamapps\common\Company of Heroes Relaunch
Yes, after (correct) installation Blitzkrieg always resides within the Company of Heroes Relaunch directory. However a common practice amongst gamers, at least from what I've seen, is to store Steam games in a separate location from the OS drive in order to preserve them through OS re-installs. That is where loading Steam's libraryfolders.vdf config file and getting a list of library locations from it comes in.
Here is mine for reference:
Code: Select all
"LibraryFolders"
{
"TimeNextStatsReport" "1470175626"
"ContentStatsID" "7781434410905659454"
"1" "S:\\Games\\Steam"
}
That entry pointing to my S: drive is in addition to the default library created for Steam's actual default install location in C:\Program Files (x86)\etc...
I'll also add that a longer term goal for this script is to expand it to automatically run and manipulate user interfaces in the Blitzkrieg installers for 1) The last full release, 2) The current patch release, and 3) The map pack in order to completely automate mod installation.
-
- Posts: 1107
- Joined: 07 Jan 2015, 15:05
Re: Script to find RelicCoH.exe
Oh, I get it. Thanks
-
- Posts: 19
- Joined: 23 Mar 2016, 20:52
- Location: Edmonton, Canada
Re: Script to find RelicCoH.exe
I'll also add that a longer term goal for this script is to expand it to automatically run and manipulate user interfaces
Turns out I don't have to do that. I've worked out that the Blitzkrieg installers are made using Inno (more of an NSIS guy myself, anyway...) I can pass the discovered directory to them as a command line argument instead of using the relatively hacky method of using AutoHotkey to manipulate their user interfaces.