Steam – Fixing steam installs

steamwindows 7

I have this problem with a lot of games on Steam and was wondering if there is a general fix. What happens is I go to install a game, it asks for admin permission, does it's thing, installs and runs fine. Then next time I try to run, it pops up with an admin permission box and asks for permissions again. Now usually here, it doesn't actually matter whether I hit "OK" or "Cancel", the game still runs. The game was installed correctly, but Steam doesn't recognize it as such.

It's a minor annoyance, but I'd like to be able to get rid of it. I think one of the main culprits are the c++ redistributables and direct x redistrutables. If I go into the folder where the games are "installed" I can double click to run those installers again and it will tell me newer versions of those are already installed and thus skip installing the older version. However, I think this is what's tripping Steam up. Steam sees that as a failure to install (which it isn't).

Recent examples of games giving me this problem include Assassin's Creed 3 (which asks for admin rights twice(!) once for the game and once for uplay) and Mafia 2.

Edit: Should add, this is Windows 7 64-bit.

Edit 2: Searching around some more, this seems very similar (although I don't play DOTA 2):
First Time Setup runs every time I click Play

I could try hacking around in the registry, but I have a lot of games which do this and I can't believe there isn't an easier solution somewhere.

Best Answer

Ok, it does seem that going through the installscript.vdf and looking for everything under Run Process and putting that in the registry seems to get rid of the prompt. For example, for Assassin's Creed III I have this:

"Run Process"
{
    "DXSetup"
    {
        "process 1"     "%INSTALLDIR%\\Support\\DirectX\\DXSETUP.exe"
        "command 1"     "/silent"
        "NoCleanUp"     "1"
    }
    "VCRedist"
    {
        "HasRunKey"     "HKEY_LOCAL_MACHINE\\Software\\Valve\\Steam\\Apps\\208480"
        "process 1"     "%INSTALLDIR%\\Support\\VCRedist\\vcredist_x86.exe"
        "command 1"     "/q"
        "NoCleanUp"     "1"
    }
    "Punkbuster"
    {
        "process 1"     "%INSTALLDIR%\\Support\\Punkbuster\\pbsvc.exe"
        "command 1"     "/i --no-prompts --no-display --skip-tests --i-accept-the-pb-eula"
        "NoCleanUp"     "1"
    }
    "uplaylauncher"
    {
        "process 1"     "%INSTALLDIR%\\Support\\GameLauncher\\UplayInstaller.exe"
        "command 1"     "/S"
    }
    "kb971512_x86"
    {
        "Requirement_OS"
        {
            "OSType"        "Windows Vista"
            "Is64BitWindows"        "0"
        }
        "process 1"     "%WinDir%\\system32\\wusa.exe"
        "command 1"     "\"%INSTALLDIR%\\Support\\KB971512-x86.msu\" /quiet "
        "IgnoreExitCode"        "1"
    }
    "kb971512_x64"
    {
        "Requirement_OS"
        {
            "OSType"        "Windows Vista"
            "Is64BitWindows"        "1"
        }
        "process 1"     "%WinDir%\\system32\\wusa.exe"
        "command 1"     "\"%INSTALLDIR%\\Support\\KB971512-x64.msu\" /quiet /norestart "
    }
}

Adding each (DXSetup, VCRedist, ...) of those to the registry under Computer\HKLM\SOFTWARE\Wow6432Node\Valve\Steam\Apps\208480 as a DWORD with a value of 1 leaves me with only the UPlay prompt (which I think is a uplay problem and not a Steam problem). The whole process could probably be automated except that I don't see an easy way to find the number (208480) for the app. It's not contained in the install file itself, so I had to find it by searching for Assassin's Creed in the store.

If it has to be done manually like this, then it probably isn't worth the effort.