Inno Setup Compiler: SWBF2 directory auto-detect code
Posted: Wed Aug 01, 2018 3:11 pm
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.
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.