Friday, February 12, 2016

Install Steam games to a different folder WITHOUT setting up another install location on your Steam account (Windows)

This is a small idea I had when using Steam In-Home Streaming which came from some previous experience with using different folders to store mods.

So, with IHS, one of the features Valve offers is to install games remotely. You click on "Install" on your laptop's screen and choose another machine to install your games in.

However, there's a catch: for some reason, Valve doesn't allow you to choose where in the host machine you'll install your games to, so Steam automatically installs them to "C:\Program Files (x86)\Steam\steamapps\". This is obviously frustrating.

You need not worry, though, for there's a quick solution for that. Make a junction!

A junction in Windows is one of three ways in which folders and even files can be related to each other. When you join one folder with another, the latter is the one that will hold all the data, while the former remains as a path. Both still exist independently, but the first forwards all the content to the latter, so that if you store a file in the former, it gets sent to the latter instead.

To create a junction, you can follow some easy steps:

1) Open the Windows' command prompt with administrator privileges.
2) Type mklink. It'll give you a list of parameters you can use with the command. mklink is the Windows command for symbolic links, which a junction is a type of.


/D - Creates a symbolic link. This can also work, but we won't use it due to something I'll explain later.
/H - Creates a true link.
/J - Creates a junction.


1) Navigate to your Steam client folder (if it's in "Program Files (x86)" you'll need administrative privileges to modify its content!).
2) Open the "steamapps" folder and copy all content inside it.
3) Create a folder where you want to store your Steam games, then paste all the content from "steamapps" you copied in the previous step. This new folder MUST exist before you create the junction!
4) Go back to the Steam folder and delete (yes, delete!) your steamapps folder.
5) Open the command prompt again (with administrative privileges if necessary). Now type the following:

mklink /J [path to Steam folder]\Steam\steamapps\ [new folder you created with the content from "steamapps" inside]

For example, if your Steam folder is in C:\Program Files (x86)\ and the folder you want to store your games in is D:\Steam\, the command will be:

mklink /J C:\Program Files (x86)\Steam\steamapps\ D:\Steam\

And done.

Now the junction with the path of C:\Program Files (x86)\Steam\steamapps\ will be treated as the regular "steamapps folder", but whenever you add content to it, it gets sent to D:\Steam\ instead. Since remote installation only allows you to install to the standard steamapps folder, this is a way to circumvent this limitation and allow you to remote install to a different folder in the host.

Please note that moving/renaming/deleting the junction does NOT alter the location it links to in any way. Your games will still be stored in the new folder the junction links to.

But... Why junction instead of symbolic link?

The reason is that, when you create a junction and access the joined folder (D:\Steam\ in our example) from a remote computer, it gets treated as a folder inside the host computer. On the other hand, if you had created a symbolic link, the folder would be treated as belonging to the remote computer itself.

No comments:

Post a Comment