Page 1 of 1

Inno Setup Compiler: SWBF2 directory auto-detect code

Posted: Wed Aug 01, 2018 3:11 pm
by Marth8880
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.

Re: Inno Setup Compiler: SWBF2 directory auto-detect code

Posted: Thu Aug 02, 2018 12:56 pm
by Maveritchell
Smart! I'd done the first step with some installers, but had never known/thought about the second (Steam config.vdf).