I've finally managed to set up some custom code for Inno Setup install scripts to auto-detect SWBF2's game directory!
Specifically, it tries to find the registry entry for the game, and if it can't find it it checks Steam's config.vdf file for the user's Steam library locations, then checks each of those until it finds SWBF2. If it's still not found, it just defaults to the normal Program Files location.
The code (and usage notes) can be found HERE.
Inno Setup Compiler: SWBF2 directory auto-detect code
Moderator: Moderators
-
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
- Maveritchell
- Jedi Admin
- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Inno Setup Compiler: SWBF2 directory auto-detect code
Smart! I'd done the first step with some installers, but had never known/thought about the second (Steam config.vdf).