Moving Windows Folders
April 21, 2006 3:54 PM   Subscribe

How can I move Windows folders without messing up my system config?

I would like to move my folders one down like this:

d:/Program Files/MyFiles



I would like to do this without messing up shortcuts already in place. Can it be done?

Thanks in advance.
posted by Knigel to Computers & Internet (16 answers total)
No. You'd need to change, not only every shortcut, but every registry entry tool.
posted by IronLizard at 3:58 PM on April 21, 2006

Are the files applications, or data?

Shortcuts are supposed to be automatically updated if you move files using the windows GUI, but as IronLizard says, the hardcoded paths in the registry pointing to applications and application components are going to stay fixed.
posted by Good Brain at 4:02 PM on April 21, 2006

Do you mean changing your Program Files folder from being D:/Program Files to just being D:/ ?

If so, why do you want to do this? IronLizard is right, it seems like a lot of effort.

However, you can easily change the default location for future program installations. Go to Start > Run, type regedit, and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion and change the value of the key ProgramFilesDir. Omit the trailing slash.
posted by matthewr at 4:06 PM on April 21, 2006

If you attempt this, some of your software will probably break. It may be because some of it is badly written, but it will break nonetheless. It's not worth it.
posted by grouse at 4:16 PM on April 21, 2006

Doing this for something already installed will be a PITA, but if you don't mind uninstalling and reinstalling, it shouldn't be an issue. Some programs bitch about a different location, but in my experience, I haven't had much of an issue. I usually install large programs to a secondary drive.
posted by cellphone at 4:21 PM on April 21, 2006

TweakUI, a MS powertoys control panel, lets you change the location of "special folders" like "Program Files", but you'll need to edit shortcut properties by hand.
posted by TimeFactor at 4:32 PM on April 21, 2006

When you install a program it usually also installs a number of items -- registry keys, configuration files, shortcuts. Any or all of these can contain paths, and if you just move the physical files the stored paths in these configuration entities will not be updated. Welcome to random breakage. To do this properly you need to reinstall all the programs, choosing the new location. You might be able to hack it up with a registry tool that does a search and replace, but that leaves the possibility for really oddball breakage and random failure. And that would not cover paths stored in configuration files.
posted by Rhomboid at 5:36 PM on April 21, 2006

Listen to what grouse says. Don't do it. But if you want to do such a thing, you need to do it at installation with a customized installation script. And even then, a few apps will break because the developers hard-coded the "program files" location assuming it couldn't be anywhere else.

Secondly, and maybe this is trivial, but I don't understand moving "program files" to "myfiles". "Myfiles" implies user data files but "program files" are where windows actually intalls the application excutables and supporting files. MyApps makes more sense. Which is probably what you meant.

Anyway, the reason that someone would want to do this, and why some people have done this, is because the "program files" location, which is the application installation location, is for many people not a statically-sized location. You can install apps until you run out of room, which is bad. You can also run out of room because some other part of the OS is consuming space. There's good reasons to move the application installation location to a seperate partition (logical drive), as most people's UNIX filesystems do.

I very much don't recommend taking matthewr's advice about changing the location of an in situ windows installation because, essentially, you'll already have broken your installation. To do this with tweakxp or whatever, you'd be changing the places in your registry that define the program files location. But if you still have some apps at the old location, then basically your registry is "lying". Windows shortcuts, which are not bidirectional (a serious windows design flaw in my opinion) will be the least of your problems because shortcuts are so badly broken in windows in the first place they're not that important. They're important to the end-user for running apps in a gui, but otherwise they don't do much else.

The biggest problem here is that the windows registry is a decent idea executed badly. In theory, the registry is a single, all-inlclusive repository of OS and application configuration. In practice, partly because of backwards compatibility with win3, it is not the only place OS and app configuration is stored.

In the end, and I say this as someone who tried to customize Windows via registry changes of Win95 in '94 (I believe) and have been working with it since, also professionally, it's best to just leave it alone.
posted by Ethereal Bligh at 5:58 PM on April 21, 2006

"Program Files" is a path pointed to by the environment variable %PPROGRAMFILES%. It isn't some kind of secret voodoo magic rocket surgery. I changed my "Program Files" location to another folder (using TweakUI linked above but it's easy enough to do manually with a single registry edit) on another drive three years ago and haven't had a single program install (or un-install for that matter) incorrectly since then. Office, Photoshop, Visual Studio, etc. are very happily residing in E:\Programs\.

I would not, however, recommend moving an existing Program Files folder. I did the above on a new OS install. Things will break (uninstall info if nothing else) if you try to move existing applications.
posted by TimeFactor at 7:02 PM on April 21, 2006

The environment variable is set by the registry setting, not the other way around. And I'd bet you money that the Windows installer doesn't look to the environment to determine where to install apps, it queries the registry. So your mention of the environment variable is beside the point.

Windows will install its own apps in the default program files directory. So if you change the path after an install, you'll still have those apps there, and in a sense they're orphaned: they are apps installed somewhere different from where apps are supposed to be installed. Does anything break because of this? Who knows? That one user has gone three years without problems doesn't tell you much.

I know for a fact that there were lots of problems using a non-default program files directory. I suspect that many problems have gone away now that there's the "documents and settings" tree to store stuff that previously would have likely been hardcoded into the app's program files directory.

If you really want to do this, see if you can find instructions on customizing an install beforehand to place the apps where you want them. If not that, then do what TimeFactor did, and do a clean install and then immediately change it with TweakUI and install all your apps there (leaving the stuff Windows installs alone). The less apps you tend to install, and the less you tend to change your system configuration, the more likely you'll have no subsequent problems.
posted by Ethereal Bligh at 11:57 PM on April 21, 2006

(Oh, particularly you might have trouble with the "common files" directory that lies under the program files directory, for example.)
posted by Ethereal Bligh at 12:01 AM on April 22, 2006

Change of Address can do this. It will point Program Files, My Documents, root drives, whatever to a new location. It looks pretty much everywhere to change the location. Note you have to deal with making the files appear there.

I move Program Files and most user folders to another partition (and names with no spaces) with it after a fresh install. Note I've never used COA except after a fresh install though. I don't trust it that much.

My basic procedure: use COA, copy the contents of the folder to the new location, reboot, and finally, delete the old folder.

You can get COA from PC Magazine's site or from here.
posted by easyasy3k at 12:03 AM on April 22, 2006

I'd bet you money that the Windows installer doesn't look to the environment to determine where to install apps, it queries the registry.

Actually I'd bet you money that it doesn't do either, but uses SHGetFolderPath. Mucking about in the registry for this sort of stuff is discouraged. I agree that the source of the data in current Windows versions is the registry, but %PROGRAMFILES% comes from the same source.

posted by grouse at 1:07 AM on April 22, 2006

Ethereal Bligh: My bad. I thought changing the registry key would only affect future program installations, by determining the default location.
posted by matthewr at 4:08 AM on April 22, 2006

My bad. I thought changing the registry key would only affect future program installations, by determining the default location.”–matthewr

Given that TimeFactor hasn't had any problems, I'll assume that possible problems are not that likely. The “common files” directory makes me wonder, though.
posted by Ethereal Bligh at 5:21 AM on April 22, 2006

I won't be doing this as it's too late from what everyone is saying, but I also wanted to say that I keep all of my apps on its own partition. To clearify, I meant "MyFiles" not as a directory itself, I meant changing it to d:/ to get rid of the extra folder itself as it's just another unnesessary step. When I do my next fresh install I'll change things then. I wasn't thinking about it when I did the recent instal and entered "Program Files" when I was installing programs. Technically it wasn't even there until I entered it manually. I would assume then that it isn't going to be the default "My Programs". Thank you all for the help, I appreciate it.
posted by Knigel at 8:03 AM on April 22, 2006

« Older The ugly side of traffic court   |   Website modifications Newer »
This thread is closed to new comments.