Moving default path to other partition

Beliskner

Weaksauce
Joined
May 1, 2003
Messages
72
Good day!

I was wondering how I could change the default path, (let's say it's C:\Program Files) to my other partition? Basically I want to just have my OS on one partition and my programs on another. Other than the obvious of just telling it where to put it during the install, (say f:\Program Files) is there a way to set the default to be that directory? I keep thinking it's in the registry but I can't remember.

Thanks!
 
You can change it, using the advanced options of My Computer, but anytime I've seen it done, it's resulted in many problems.
 
TweakUI, from MS PowerToys, will remap all special folders.

However, particularly with Prog Files, you'll run into occasional problems from poorly-written software.
 
TweakUI has versions back as far as 98 if not earlier. I'm certain there's a version for 2K, I just can't give you the URL offhand.
 
Found this using Google searching for "move program files"

http://www.x-setup.net/forum/showthread.php?t=543

1st.- Uninstall EVERYTHING you don't need on your computer or EVERYTHING you can reinstall after the reallocation. "Program Files" folder reallocation could imply a lot of broken links, registry keys that doesn't point to the new drive.
2nd .- Copy the folder using the robocopy tool (from resource kit) if you are using NTFS file system; this way you will keep the original permissions:
"robocopy "c:\Program Files" "d:\Program Files" /sec /r:1 /w:1 /e

3rd.- Do it in three steps;
1st .- Copy the whole folder.
2nd.- Change the registry keys mentioned above and reboot the compurter.
3rd .- Try to rename the old Program File folder in order to ensure that the new folder is actually being used. Check the enviroment, the links, and so on... If you find problems to rename or delete the old Program Files folder due to in use files, try to share the whole C drive, reboot your system and try to delete/rename througth other computer. (without logging on the target computer, of course).
This tweack could enhace your PC performance if you are moving your Program File folder to a raid set of disks!!

and this:
http://www.kellys-korner-xp.com/xp_shell_folders.htm
How to Move Shell Folders (and contents)

by Kent W. England MS-MVP

Shell folders are special folders that Windows uses to indicate the default location for many types of settings and data. These shell folders may be moved in a bewildering variety of ways: by a right-click Move Here in Windows Explorer, by a registry key edit, or by using TweakUI for XP.

Be certain that no documents are open before you start a move process, otherwise the move will be incomplete and your old folder will not be deleted. You will have to close open processes and then manually move any files that were not moved in the move operation. Best to do this right after a logon.

One way to move My Documents is to right-click the My Documents folder under Desktop in Windows Explorer and select Properties. Move the folder with the Move button. This is the only shell folder that can be moved from its properties tab. Be careful to enter the path to the new "My Documents" folder, not to its parent. In other words, if you want the new "My Documents" folder to be D:\My Documents, then you must enter that string in the Target box.

To change most shell folder locations immediately and move the contents, right-click the shell folder in Windows Explorer, drag the folder to the new location, release the mouse button, and select the Move Here item. If Windows Explorer complains, then you must use the registry to move the folder location and manually move the contents.

The default user shell folders location is in %USERPROFILE% which is "C:\Documents and Settings\user".

Administrative Tools system utilities folder (Shell Folders)
Application Data location for applications to store user settings
CD Burning location for temporary storage of files for ISO burn
Cookies IE cookie folder
Desktop desktop shortcuts
Document Templates default location for application new document templates
Favorites IE URL links
My Documents Application default document folder
\My Music default music file folder
\My Pictures default graphic file folder
\My Videos default movie file folder (Shell Folders)
SendTo right-click context menu item
Start Menu user All Programs menu
\Programs user All Programs shortcuts
\Startup user logon startup folder

The shell folder locations are in the Registry at HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders and/or in \Shell Folders. Edit the key in User Shell Folders if present. If not, edit the key in Shell Folders. There is no need to edit both keys if both keys are present.

Changing these keys will change the shell folder location but will not move contents. The Administrative Tools and My Video shell folders are located at HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders and are not present in User Shell Folders.

Recent (My Recent Documents) cannot be moved in Windows Explorer, but must be moved in the registry. It is best to leave the Local Settings shell folders alone or change the location in the registry at User Shell Folders. The Temporary Internet Files can be moved in the Internet Options control panel.

The following shared shell folders are located in the All Users profile and are in the Registry at HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders or \Shell Folders. These shell folders are available to any user, but are not network shared. The path is %ALLUSERSPROFILE% and is "C:\Documents and Settings\All Users" by default. Some of these common folders may be moved in Windows Explorer.

Common Admin Tools (Shell Folders)
Common AppData
Common Desktop
Common Documents cannot be moved in Windows Explorer
\Shared Music cannot be moved in Windows Explorer (Shell Folders)
\Shared Pictures cannot be moved in Windows Explorer (Shell Folders)
\Shared Video cannot be moved in Windows Explorer (Shell Folders)
Common Favorites
Common Programs
Common Start Menu
Common Startup
Common Templates

To change the location of some fifteen shell folders without moving contents, use TweakUI for Windows XP; go to My Computer>Special Folders, select the shell folder, and change the location. Contents may then be copied or moved in Windows Explorer.

CD Burning
Desktop
Document Templates
Favorites
Installation Path Windows Installer default install folder location
My Documents
My Music
My Pictures
Programs
SendTo
Shared Documents
Shared Music
Shared Pictures
Start Menu
Startup

Probably the easiest way to approach moving shell folders is to try to move the folder in Windows Explorer. If that doesn't work, then try TweakUI and if it isn't available in TweakUI, then edit the appropriate registry key. Don't forget to move the contents manually if you use TweakUI or the registry to change the location.

Windows Explorer puts special labels on the "My Documents" folder for each user account. For example, if an account full-name is "Marion Robertson" as displayed on the Welcome Screen, the My Documents folder is labeled "Marion Robertson's Documents".

The path for each "My Documents" folder is controlled by account-named keys in HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\DocFolderPaths. Windows Explorer also special-labels the account Recent folder to "My Recent Documents", but I have been unable to find the registry key that controls this behavior in order to restore this special status to Recent folders that have lost the magic.

Remembering the Shell Folder locations

If you move your user shell folders, you should save the registry keys in case you need to re-do the changes after a reinstall. The following commands can be used to save these changes to .reg files that can be right-clicked and "merged" into the registry after a reinstall. The following command will backup the current account user shell folders:

C:\>reg "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" UserShellFolders.reg

and to backup the common shell folder locations:

C:\>reg "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" CommonShellFolders.reg

After a re-install, your user shell folders will be in their default location and empty. You need only merge these .reg files to repoint the shell folders to the location where the files are. No files are moved, nor need to be moved.

Taking Ownership of Folders after a re-install

When you reinstall XP, new accounts are created and you may need to "take ownership" of the old shell folders with the new account(s). This is another KWE help file and more information is available in the XP Help and Support Center. You may need to take ownership of your shell folders before you can access the files.


XP Support- 01/01/2005 12:42 AM - Home Page WinXP
© Copyright Kelly Theriot MS-MVP(DTS) 2005. All rights reserved.
 
lomn75 said:
TweakUI has versions back as far as 98 if not earlier. I'm certain there's a version for 2K, I just can't give you the URL offhand.

I knew about the one back for 98 but the last I heard was that they were going to stop making it for 2k and up. Cool that they have it. I'm sure I can find it some where.
 
Kewl, thanks Met-AL! I'll give those a try.

BTW I'm trying all this out on an old PC first! Who said that P200 wouldn't come in handy!
 
At one time I had a freeware progy that did all this automaticaly. For the life of me I can't remember what it was called or find it on google.

It was pretty slick, you told it where you wanted your new program files and clicked apply and sat back and waited. It would copy all the files, modify the registry keys and shortcuts to the programs. Everything would work just fine after too. Intalls would default to the new location also.
 
Back
Top