Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect whether KSP was installed with Steam #5

Open
Majiir opened this issue Jun 13, 2014 · 8 comments
Open

Detect whether KSP was installed with Steam #5

Majiir opened this issue Jun 13, 2014 · 8 comments

Comments

@Majiir
Copy link
Owner

Majiir commented Jun 13, 2014

I'm not sure how to reliably detect this.

@blizzy78
Copy link

We could simply check if there is a SteamApps\common\ folder above the KSP folder. For example, my KSP Steam install (which I never use) lives at D:\Programme\Steam\SteamApps\common\Kerbal Space Program\

@Majiir
Copy link
Owner Author

Majiir commented Jun 13, 2014

This works for a lot of cases, but what if the user's installed Steam in a different library? (Steam allows for multiple game libraries so you can install on multiple HDDs.)

@blizzy78
Copy link

Does anyone ever use this?

@NeoXant
Copy link

NeoXant commented Jun 14, 2014

Look to registry for key HKEY_CURRENT_USER\Software\Valve\Steam\Apps\220200 and check if Installed is 1

@blizzy78
Copy link

That doesn't prove KSP was started from Steam. I have a Steam and a store install on my computer - using this check it would always be Steam=true, but I never use the Steam install.

@NeoXant
Copy link

NeoXant commented Jun 14, 2014

You can grab location of running KSP.exe process and check whether full path have SteamApps\common. Even if user installed KSP in custom library, then will always have SteamApps\common in path to process

@Majiir
Copy link
Owner Author

Majiir commented Jun 14, 2014

A running instance of KSP has the IsSteam flag, which indicates whether it was started from Steam. The question here is whether KSP was installed with Steam. If someone copies their KSP installation out of the Steam folder and launches it elsewhere, I consider that self-installation. If they run KSP directly but use Steam for updating the game, that's useful information for understanding how people tend to update.

@Majiir
Copy link
Owner Author

Majiir commented Jun 19, 2014

You can grab location of running KSP.exe process and check whether full path have SteamApps\common. Even if user installed KSP in custom library, then will always have SteamApps\common in path to process

This seems like a good solution. I'll add this in the next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants