90

I just built a PC because my son wants to play PC games. I installed Windows 7, and created 2 user accounts, one for each of us. Within my Windows user account I installed Steam, and downloaded some games from my catalogue.

I was expecting that when the other Windows user account was logged in, it would see the Steam application, but would be required to log in again, thus allowing my son to use his own account. But when he logged in, Steam had retained my account details and was still logged in as me.

I don't want to share games. In fact I want the opposite, as I do not want my 12 year old to have access to 18 certificate games etc, and also I want to keep my achievements and friends lists to be just my own.

How can I tell Steam to use a different Steam account when logged into a different Windows account?

1
  • Is there a way to install steam into a user folder and just have multiple installations of steam on one machine? Kind of like how chrome does it.
    – l I
    Commented Dec 8, 2011 at 16:02

7 Answers 7

77

Because of the way that steam does things it's not able to have multiple auto sign in configurations per installation. You'll have to resort to trickery:

  • Disable account credential saving in the settings dialog.
  • Create a shortcut for Steam on each windows account, edit the properties and give it these launch options -login %u %p. This logs into Steam with the specified Username and Password combination. Replace %u with the username, and %p with the password you want to login with (Steam must be off for this to work).

Source.

If you still want Steam to automatically startup, while logging in to the appropriate account, disable automatic startup within Steam and place the shortcuts in the Start menu → Programs → Startup folders of each windows account.

10
  • 32
    Wow, that is incredibly insecure, as the password is essentially stored in the clear. It's not too much of a stretch to think the kid will be able to find that shortcut and use it to log into the dad's account.
    – MBraedley
    Commented Dec 8, 2011 at 16:05
  • 13
    It's also not too much of a stretch to think that the kid could install a keystroke logger on the system and find his dad's password for steam, email, credit card purchasing, etc.
    – Sanjamal
    Commented Dec 8, 2011 at 16:46
  • 7
    Thanks for your comments. I'm not overly worried about him working around the solution, I know it will be possible, trivial even, but it's more to stop him logging into mine by accident and messing my account up, than any real concern.
    – stuffe
    Commented Dec 8, 2011 at 19:46
  • 5
    @MBraedley A rudimentary obfuscation is simply to make each account shortcut for each user only (i.e. not "for all users"), and make sure the folder where the shortcut is stored (e.g. the Desktop) is set to private so that other Windows accounts cannot see them from within Windows. This still leaves the password in the clear on the hard disk, but at least it is harder to get to from within the installed operating system.
    – jw013
    Commented Sep 29, 2014 at 4:03
  • 2
    It would seem this answer is outdated, at least from my experience: I have a machine with 3 windows account, and each has its own steam credentials saved, although I did not set the auto-start steam option. Commented Jul 10, 2017 at 18:44
32

I had the same issue, and while there are some good solutions here, none were quite right for me. I wanted to save my password for offline mode options, I didn't like the idea of relying on the Steam shortcut to do the work (they might launch Steam another way, like at startup), and I also didn't want to have multiple copies of Steam (since that wastes a lot of space).

Here's what works for me:

  1. Open the Steam directory, then the config subdirectory. Sort by date modified.
  2. For each Steam account:
    1. Sign into Steam, saving the login details.
    2. Quit Steam.
    3. Copy SteamAppData.vdf to SteamAppData_username.vdf (where username is the Windows user name you'll use for that Steam account).
  3. Create a new text file in the Steam directory (not the config subdirectory) called ChangeLoginPerUser.cmd with the following contents:

    @echo on
    move config\SteamAppData.vdf config\SteamAppData_backup.vdf
    copy "config\SteamAppData_%USERNAME%.vdf" config\SteamAppData.vdf
    
  4. Add a shortcut to this script in the All Users Startup folder. This is where to put it:
    1. Press Win+R
    2. The Run dialog pops up
    3. Enter this: shell:common startup

This means whenever a user logs on to Windows, it will move the old saved login out of the way (just in case an unanticipated user account logs in) and then copy your account's saved login as the current one in the directory.

If your other user accounts are not administrators, you may need to set the permissions of SteamAppData.vdf and the SteamAppData_username.vdf files to be full control by anyone. On my system, all 3 of the accounts are administrators, so I didn't have to do this.

7
  • 3
    +1 - Excellent solution. Am building a HTPC that will be launching Steam from MediaPortal. Since we have mutliple Steam accounts, being able to associate them to the Windows login this way makes the most sense. Commented Aug 14, 2013 at 12:21
  • 3
    With a little scripting know-how, you can make this a little more secure: 1. Create a folder under %AppData% for each user to hold their own SteamAppData.vdf file 2. Modify the script to copy from the %AppData% location Also, make sure to disable the "Automatically start" setting and instead add a line to the script: "Steam.exe -silent" If auto-start is enable, Steam will likely try to start before the script runs, and you'll either get a login prompt or the previous user's account. Commented Feb 10, 2016 at 4:09
  • What happens if the users lock the screen instead of log out when someone else wants to use the PC? Won't this fail to detect when users switch around like that?
    – ekolis
    Commented Aug 21, 2016 at 12:00
  • 1
    I don't have SteamAppData.vdf file at all...
    – cubuspl42
    Commented May 23, 2017 at 17:44
  • 1
    @Raptor007 AFAIK it's HKEY_CURRENT_USER\Software\Valve\Steam\ActiveProcess\ActiveUser
    – cubuspl42
    Commented Jun 9, 2017 at 18:37
13

It doesn't seem like Steam was really designed with this use case in mind. (There's no such thing as Steam Parental Controls, for instance, although both my Xbox 360 and my Wii have parental controls, if I remember correctly.) I've found several threads where people were having similar issues with their kids.

One suggestion was to change the shortcut to Steam so that it supplies a username and password from the command line, like so:

-login %u %p - This logs into Steam with the specified Username and Password combination. Replace %u with the username, and %p with the password you want to login with (Steam must be off for this to work.)

However, this seems like it could be worked around, especially if you tend to forget to log out of steam when you lock your computer. The account credentials might still be cached, and then you'd end up giving your kid access to your games without your knowledge. That's just one possible attack vector, there may be many others, not to mention storing your passwords in this manner is incredibly insecure.

There's also all manner of "free" games that are probably inappropriate for children, but which can be downloaded into any Steam account. Team Fortress 2 contains quite a bit of violence (not all of it cute and cuddly) and bad language, among other things. It's kind of a personal parenting decision as far as what you consider to be "off limits" - but there are free rated-M games on Steam, and TF2 is one of them.

I found this thread over at Gamers With Jobs to be illuminating. They suggested limiting the access rights to certain applications and/or other files (violent games included) using the Group Policy Editor and file permissions settings in Windows 7. This would ensure that your child's Windows account could not access the games in question, even if your Steam account was properly logged in and authorized.

Another thing that was brought up in that thread that I think needs to be said is this:

Whatever barriers you put in his way, are just puzzles between him and the prize, and the more you put barriers in his way the more he will discover ways around them. You're teaching him how to hack in the most effective way possible.

They go further to suggest that in addition to protecting the content, you should also realize that kids with unsupervised access to computers will figure out a way around any level of protection - regardless of how foolproof, given enough time. (I was a living example of this as a child, sorry Mom & Dad!) You might consider putting the machine somewhere public in addition to these security measures, so that it's more likely that their computer time will be more closely supervised.

Don't look at this just as a technical problem that needs a technical solution; it's a complex psychology problem with a technical manifestation.

1
  • 2
    Thanks, great answer. I realise there is practically no measure I can take that will prevent someone determined enough to find a workaround. this is more of a convenience thing more than anything, we both have seperate accounts, and want to use them without accidentally users each others accounts. Especially games like Bastion which we both own, and could start accidentally if it was left logged in as each other. The computer lives in the main living area and is fully shared, but all your points are valid and good to share for future readers of the question.
    – stuffe
    Commented Dec 8, 2011 at 19:49
12

I managed to have it like this:

When steam installs, it asks you "install for every user" or similar. Install only for you. And keep the installed data in your account. When your account is password protected, no other user except for admin should have access to your orders or account.

Then install steam again on your kids account. Again password protect it. Again click install only for this user. Again store all data in the users orders.

This is how I managed to separate mine and my brothers steam accounts. Oh and I also unmarked "automatically log in" but let "save password / remember me" simply press log in and you're good to go.

Hope this will word for you too.

3
  • I tried this, but no luck: at least if I'm an administrator, I'm never asked to create for all users or a single user. Word of warning: uninstalling means any games in the default steam library get uninstalled too.
    – pforhan
    Commented May 11, 2015 at 14:35
  • I can't install for a single user either, but what you can do is install in e.g. C:\Users\YourName\Steam, and Windows should handle file permissions so no one else can access your install and log in as you. You can even set up a shared library (check Steam settings -> downloads to set a custom library location; make it the same for all users) if you and the other users have games in common (eg F2P games or family sharing); Steam should handle the permissions on that.
    – ekolis
    Commented Aug 23, 2016 at 14:57
  • Does does not ask me "install for every user". When did it show that?
    – Sawtaytoes
    Commented Sep 2, 2021 at 1:20
7

Raptor007's solution is great, but it has one problem: it does not work when you switch users without logging off. I have improved it by using Windows Task Scheduler.

The first 3 step is exactly the same as Raptor007's ones, except one thing: for some reason it doesn't work with relative paths when called from Task Scheduler, so need to specify absolute paths:

  1. Open the Steam directory, then the config subdirectory.
  2. For each Steam account:
    1. Sign into Steam, saving the login details.
    2. Quit Steam.
    3. Copy SteamAppData.vdf to SteamAppData_username.vdf (where username is the Windows user name you'll use for that Steam account).
  3. Create a new text file anywhere you want (for example, in the Steam directory) called ChangeLoginPerUser.cmd with the following contents (replace C:\Program Files (x86)\Steam by your path to Steam directory):

    @echo on

    move "C:\Program Files (x86)\Steam\config\SteamAppData.vdf" "C:\Program Files (x86)\Steam\config\SteamAppData_backup.vdf"

    copy "C:\Program Files (x86)\Steam\config\SteamAppData_%USERNAME%.vdf" "C:\Program Files (x86)\Steam\config\SteamAppData.vdf"

  4. Open Task Scheduler (Control Panel -> System and Security -> Administrative Tools -> Task Scheduler).‌ You need administrative rights for that.

  5. For each Steam account:

    1. Click Create Task (not Create Basic Task).
    2. When running this task, use the following user account: select Windows user that will use that Steam account.
    3. Open Triggers tab, click New, select trigger type At log on and select Windows user that will use the Steam account.
    4. Add another trigger with trigger type On connection to user session, select the same Windows user and Connection from the local computer.
    5. Open Actions tab, click New, select Start a program action and specify path to ChangeLoginPerUser.cmd file in Program/script.

That's all! Now it should change Steam user even if you switch users without logging off.

2
  • 1
    There is no SteamAppData.vdf. Has it moved?
    – ekolis
    Commented Aug 21, 2016 at 12:08
  • @ekolis I don't see SteamAppData.vdf too, maybe it's moved or renamed or Steam's file structure is changed. Can not help you, I don't use multiple Steam accounts on a single computer anymore... Commented Aug 23, 2016 at 14:41
3

Many of the above solutions work great, but I believe I've found a way that incorporates a different version of the above that focuses on closing steam out for inactive users, and will work better than the other proposed solutions as it:

  • Does not require you to save your password in a file
  • Does not require you to copy/move the steam profile each time
  • Does not require multiple installs of Steam
  • Works when two users are logged on at the same time (the "move" solution can still confuse Cloud Sync)
  • NOTE: This does not work to keep users out of your account. It's an alternate solution that makes it easy for multiple users to access their accounts and games

Here's how:

Step 1: Create the shutdown shortcut

Create a file called "CloseSteam.cmd" in a directory of your choosing with the following contents:

@echo on

"C:\Program Files (x86)\Steam\Steam.exe" -shutdown

Step 2: Force Steam to start in Big Screen mode

Doing this next step will force Steam to start in Big Screen mode. This will bring up the user switcher by default automatically on start. As long as you've logged in before and saved password, no user will need to enter their password again. To do this:

  • Hit the start menu and find your Steam shortcut
  • Right click on the shortcut and go to properties
    • In Windows 8, you must right click, open file location, then right click, and go to properties
  • Change "C:\Program Files (x86)\Steam\Steam.exe" to "C:\Program Files (x86)\Steam\Steam.exe" -bigpicture (Pay attention to the location of the quotes)
  • Save

Step 3: Create tasks to kill Steam at session exit

This will close steam whenever you either log off or switch out of your user to another user.

  • Open Task Scheduler as administrator (Control Panel -> System and Security -> Administrative Tools -> Task Scheduler)

  • For each user account who may start steam

    • Click Action then Create Task (not Create Basic Task).
    • When running this task, use the following user account: select Windows user that will use that Steam account.
    • Open Triggers tab, click New, select trigger type On disconnect from user session and select Windows user that will use the Steam account.
    • Open Actions tab, click New, select Start a program action and specify path to CloseSteam.cmd file in Program/script.
2

You can uninstall all of steam and reinstall it in a folder separate then the other users profile and that works

2
  • 1
    Additionally, now that Steam supports custom library folders, if you don't want duplicate game installs due to multiple users owning the same games (or using family sharing), you can move your games to a folder separate from all Steam installs and point everyone's game libraries to that folder. Steam should automatically handle permissions so everyone can only play the games they have in their personal libraries, even if they are located in the same folder.
    – ekolis
    Commented Aug 23, 2016 at 14:54
  • @ekolis Since Steam no longer uses SteamAppData.vdf I might try this your way next time. :¬)
    – Raptor007
    Commented Jun 11, 2017 at 8:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .