Tuesday, June 14, 2011

Junctions = An SSD owner's best friend

My main home computer is a Windows PC. Custom built, fancy graphics card, fancy power supply, the works. Built to outperform any system designed in Cupertino... but I digress.

I have a small 40GB SSD drive which I bought to be the boot drive for my system. It works fantastically. My Windows 7 system boots from cold boot up to login screen in under 10 seconds. (That includes the BIOS delay.)

Unfortunately, the more stuff I install, the more I have to be careful. I had a second folder on a second drive in my system for installing programs which wouldn't fit comfortably on the 40GB drive. Windows doesn't really like you moving things like the "Users" folder or the "Program Files" folder.

That doesn't mean you can't do it.

Note: these instructions are only valid for Windows users, and they are specific to Windows 7 but probably apply to at least Vista.

Here is my relatively fool-proof process for moving folders off your SSD without your system even knowing. A few caveats are listed below. Most importantly, you should back up your whole system before you try this.

1) For files which may be in use while your system is running (e.g. the Program Files or the Users folder), you'll want to boot into recovery mode. In Windows 7, you can do this by hitting F8 at startup and choosing "Repair your computer". When the System Recovery Options window displays, choose the last option to launch a command prompt.

For files which aren't in use while your system is running (e.g. the MSOCache folder created by Office 2007/2010), you can just launch a command prompt with administrative privilege.

2) Copy the files from your small drive to your larger, second drive using xcopy. This is the set of switches that work best for me:

xcopy c:\Users d:\Users /s /e /h /r /k /o /x /b


3) Delete the files from your small drive. (You did a backup, right?) Easy method for this is:

rmdir /s c:\Users


4) Make a junction point from your small drive to your larger drive:

mklink /j c:\Users d:\Users


Hurrah! You're finished! Well, unless you moved your Program Files and/or Common Files (including x86) folders. In that case, you need to launch your registry editor. Inside HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion you need to update the values to the actual physical drive locations. Note that the "Common Files" directory exists within the "Program Files" directory, so if you move Program Files, you have to edit the Common Files entry too.

Currently, I've redirected my Users, Program Files, Program Files (x86), and MSOCache folders to my second drive, and everything "just works". Windows and all the applications are as happy as can be because they think they are all stored in C:\Program Files, when in reality, they aren't.

Labels: , , , ,

1 Comments:

At 9:58 PM, Blogger Unknown said...

An alternative for moving the user folders:

in explorer, right click on the folders inside the user directory and select "Properties". Select the "Locations" tab, then select "Move". When it asks if you would like to move all the current files, select "Yes". Done.

This doesn't work on the root user folder, just all the sub folders (Documents, Pictures, etc) it also doesn't work on the "Program Files" directories. But still a nice easy shortcut.

 

Post a Comment

<< Home