Inno Setup Compiler: SWBF2 directory auto-detect code

Releasing the source files for your mod or map? Post em' here. (Applies to both SWBF1 & SWBF2)

Moderator: Moderators

Post Reply
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Inno Setup Compiler: SWBF2 directory auto-detect code

Post 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.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

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

Post by Maveritchell »

Smart! I'd done the first step with some installers, but had never known/thought about the second (Steam config.vdf).
Post Reply