16

Since the incredibly fascinating (re-)installation of some DirectX and VC-Redistributable files takes a bit longer than I'm willing to stare at my screen, I'd like to be able to do something else, e.g. watch youtube. But of course when the first time setup is done, the new game starts, usually directly with an intro which now ends up being mixed with some video I've just been watching or whatever.

Can the first time setup be started in such a way that the game that requires it is not automatically started after said setup?

arghtype
  • 13,915
  • 15
  • 64
  • 107
Zommuter
  • 11,867
  • 22
  • 93
  • 152

3 Answers3

14

It's possible, but it's not pretty.

The first-run tasks are described in a file called installscript.vdf (or runasadmin.vdf) inside the game's folder, in steamapps somewhere. This script file is interpreted by SteamService.exe. A typical call would look like this (example here: Jamestown):

"C:\Program Files\Steam\bin\SteamService.exe" /installscript "C:\Program Files\Steam\steamapps\common\jamestown\installscript.vdf" 94200

As I said, it's not pretty, and it would require you to locate the installation script and look up the game's app ID (in this example, it's 94200). The app ID is not optional, and the Steam service will crash if it's omitted.

a cat
  • 25,880
  • 31
  • 154
  • 189
8

Old post, but I came across this while googling for things to deal with an installer for Steam games, just figured I'd throw in an answer for the last question asked.

Running the redistributables won't inform steam that they're installed, because when Steam actually does a "First Launch" install it also writes entries to the registry to inform itself that they have been installed.

So, for instance, with Alan Wake, which has an AppID of 108710, Steam does a first launch and it creates the key (On Windows 7 x64):

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Valve\Steam\Apps\108710

Under this key it creates two values:

DirectX
VCRedistributable

Each with a DWORD value of 1, indicating they've been installed (0 meaning it hasn't). The keys vary for different games as well, sometimes even using a different value name for the same type of redist install, and others (given they do or don't have more redists to install) have a lot more than just those two.

I've actually, in my true nerd form, created an installer with Inno Setup for all of my Steam games that I've backed up. I have the installer let me chose whether I want to install the redist files, and if so it automatically writes these entries to the registry. So that way after installing my backup, I can play the game straight from the get go.

It's dumb, but I miss the days of having a physical disc with an installer, so that's really why I made the installer for my Steam backups.

kalina
  • 75,172
  • 162
  • 439
  • 628
jmwhitman
  • 81
  • 1
  • 1
  • 1
    Thanks for that information, sounds like Steam does a real mess, also with the registry... Would you be willing to share that installer? If you even made the source available, e.g. at http://github.com (it's free) others could amend other games' values. – Zommuter Oct 29 '12 at 07:58
  • @Zommuter I'll be happy to share the IS script when I get home. Nothing fancy really, other than the splash screen shown prior to the Setup launching it's just a normal installer. Currently I've only made the installer for Alan Wake, to learn the program and what not. But the script has variables that are defined at the start of the script and it fills in the info automatically for the most part. I still want to add some other things to it, like a custom installer interface that also displays screenshots while installing and possibly a music loop, but those are purely aesthetic. – jmwhitman Oct 29 '12 at 18:29
2

If you look in the Program Files\Steam\steamapps\ directories you may find folders for VCRedist, DirectX and etc. These are the program's run during first time setup. Unfortunately, there is no common folder structure for instance Delve Deeper has everything in a folder redists but Civ 5 has separate folders for DirectX and VCRedist. Also, I don't know if just running these ahead of time will avoid the first time setup step when launched in Steam.

Matt Haley
  • 121
  • 3