• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

I want to move "Program Files"

_33

New Member
Joined
Mar 25, 2006
Messages
1,248 (0.18/day)
Location
Quebec
System Name BEAST
Processor Intel Core i7 920 C0 Quad Core Processor LGA1366 2.66GHZ Bloomfield 8MB LGA batch 3844A509
Motherboard ASUS P6T Deluxe V2 X58 ATX LGA1366 DDR3
Cooling CoolIt ECO A.L.C. 120mm radiator
Memory G.SKILL F3-12800CL8TU-6GBPI PC3-12800 6GB 3X2GB DDR3-1600 CL8-8-8-21
Video Card(s) Sapphire Radeon HD 4890 1GB 850MHZ 1GB 3.9GHZ GDDR5 PCI-E 2XDVI HDTV
Storage SAMSUNG SPINPOINT F1 750GB X 2, WD2500KS 250GB, WD15EARS 1.5TB, WD20EARS 2.0TB
Display(s) LG W2361V-PF Monitors 23” Widescreen LCD Monitor (23.0” diagonal)
Case Cooler Master CM 690 II Advanced
Power Supply Thermaltake Toughpower 600W Power Supply ATX V2.2 20/24PIN EPS12V Qfan 140MM Fan Active PFC
Software Windows 7 Pro 64bit
Hello,

In an attempt to optimize my system, I wish to move the folder "Program Files" to another disk. Has anyone got an idea how to inform windows of where that directory is located? Usually it's in C:, but I'll use F: .

Ideas, thoughts welcome.
 
Your application installs decide where they will live, not Windows. So to overstate the obvious, when you run and install - tell it to install to F:\Whatever

Oh and if you are trying to move programs already installed, good luck! :)
 
Oh and if you are trying to move programs already installed, good luck!
Ditto, it is possible but u then have go through every registry entry to point to the new location. I just uninstalled everything, editted the registry to tell the installer where the new program files folder is then reinstalled it all again(was much quicker):)
 
"So to overstate the obvious"....
Very good. May your ubber godly logic guide you well ;)
 
Ditto, it is possible but u then have go through every registry entry to point to the new location. I just uninstalled everything, editted the registry to tell the installer where the new program files folder is then reinstalled it all again(was much quicker):)

So there is a registry entry to state where is "Program Files" located. Thanks.
 
So there is a registry entry to state where is "Program Files" located. Thanks.

It totally depends on the application, and in most cases there are NUMEROUS places you would need to change the path (including the launch icon!).

Be quicker to install again - but finding saved games and other files can be tricky - nowadays, most are under current user, or "my documents"
 
Your application installs decide where they will live, not Windows. So to overstate the obvious, when you run and install - tell it to install to F:\Whatever

Oh and if you are trying to move programs already installed, good luck! :)

No there is options in the "system" part in "Control Panel" you can also change it for 1 login via "SET %ProgramFiles% 'your path here' " (Without either set of quotes.
 
I haven't got time to scan them in detail for you, but THIS may be a starting point...

Slater's on the RIGHT track, because if you open up a Windows Command Prompt/DOS prompt, & type SET (which displays the "systemwide environment", a sort of 'in-memory .ini file' every program gets while it runs, with things like the %PATH% in it & far more, including locations of folders that the OS uses like %ProgramFiles%) & hit enter?

You'll see the ProgramFiles environmental variable... equated USUALLY by default, as ProgramFiles=C:\Program Files

You can probably alter that using Control Panel-> System Icon-> Advanced Tab-> Environment variables button (@ Bottom of popup dialog screen)...

Then, in there, you MAY be able to "override" the default value of "C:\Program Files" that a SET statement in a DOS prompt session shows you as the %ProgramFiles% environment value, but, if you're looking for a more PERMANENT solution?

You'll want to find those values in the registry & edit them...

I know that PART of it is easily found, here (current user ENVIRONMENT, & top part of the Control Panel System Icon Advanced Environment variables section I showed you above):

HKEY_CURRENT_USER\Environment

BUT, the lower & more extensive section used by the system, in the registry? You'll have to 'scout that out' for yourself, provided it exists & it most likely does.

APK

P.S.=> HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

or

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders

:)

Try those 2 locations in the registry, maybe? They may help as well... apk
 
Last edited:
tell it to install to F:\Whatever

that´s how i did it, works fine. however, some apps/games store their savegames/settings/profiles in "c:\documents+settings\username\AppData\Whatever"
...

afaik, this can only be changed in the program itself...
 
I think your answer for a more "permanent" solution (better than using temporary SET statements in DOS prompts etc.) are here:

First, the one I omitted above...

SYSTEM WIDE ENVIRONMENT VARIABLE VALUES:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment

&

Second, the one I did get above...

CURRENT USER'S ENVIRONMENT VARIABLE VALUES:

HKEY_CURRENT_USER\Environment

:)

* That OUGHT to be where to make PERMANENT alterations... because of the rationale of SET (press enter after typing it in a DOS prompt) statements showing a:

ProgramFiles=C:\Program Files

in their output...

APK

P.S.=> This MIGHT override the default by current user logged on, OR systemwide, simply by adding that value to override the default of %ProgramFiles% = C:\Program Files... apk
 
that´s how i did it, works fine. however, some apps/games store their savegames/settings/profiles in "c:\documents+settings\username\AppData\Whatever"
...

afaik, this can only be changed in the program itself...

I don't mind having "My Documents" on the C: and having the savegames going there actually. But the Level Loading, game loading etc I was thinking of shifting that on another drive and remove that from the system HDD. That is basically the reason I want "Program Files" on another drive. It's pretty logical also for people having one or two WD RAPTOR as the main system drive and having a RAID0 or RAID5 also where that would be used for various big file storage/access. The smaller drives will serve windows well as the bigger RAID partition will ease off game file manipulation.

Let's just say Microsoft didn't simplify that for us.
 
I think your answer for a more "permanent" solution (better than using temporary SET statements in DOS prompts etc.) are here:

First, the one I omitted above...

SYSTEM WIDE ENVIRONMENT VARIABLE VALUES:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment

&

Second, the one I did get above...

CURRENT USER'S ENVIRONMENT VARIABLE VALUES:

HKEY_CURRENT_USER\Environment

:)

* That OUGHT to be where to make PERMANENT alterations... because of the rationale of SET (press enter after typing it in a DOS prompt) statements showing a:

ProgramFiles=C:\Program Files

in their output...

APK

P.S.=> This MIGHT override the default by current user logged on, OR systemwide, simply by adding that value to override the default of %ProgramFiles% = C:\Program Files... apk

Is it possible to put a shortcut as C:\Program Files and the real one in F:\Program Files ? This is common in unix env.
 
Hello,

In an attempt to optimize my system, I wish to move the folder "Program Files" to another disk. Has anyone got an idea how to inform windows of where that directory is located? Usually it's in C:, but I'll use F: .

Ideas, thoughts welcome.

First, I gave you what you need to alter it permanently/MOST LIKELY, earlier above in that which you quoted from me... as it was first stated which I quote from you now above, & based partially on what Slater was alluding to.

That's simple enough to change or "hardcode" in your registry.

Is it possible to put a shortcut as C:\Program Files and the real one in F:\Program Files ? This is common in unix env.

Not sure what you're asking here, but will give it a go (your UNIX statement clued me in pretty much, & Symbolic/Soft Links & junctions + reparse points on NTFS are the key here)...

Lookup reparse points, junctions (the more likely of the two, vs. the former in reparse points), & Symbolic Links (w/ NTFS in your search term on GOOGLE as well)!

This may help you more on this next point you wish to try to do & NOW state, above!

This may help you in my P.S. (editing): Data about Symbolic Links/SoftLinks, & HOW to do them on NTFS & for folders/directories, which is what you are asking for... BUT, it needs a reskit tool!

(Thus, why I was "@ a loss" immediately @ least, on HOW to do these in NTFS (as there is no native facility in the OS for it))

HOWEVER, there is ways to implement junctions on NTFS & tools for it, see my P.S. below!

APK

P.S.=> I think this will do it for you:

==============

linkd: Create a Link

Windows 2000 introduces a new filesystem construct known as reparse points in its new version of NTFS. These entities are somewhat similar to Unix symbolic links, although they operate only on directories (folders) and not on individual files. The linkd command may be used to create such a link to a folder or drive, taking the link name and then the target directory as its arguments. For example, the following command creates C:\RK as a link to C:\Program Files\Resource Kit:

C:\> linkd c:\rk "c:\program files\resource kit"

RK looks like this in directory listings:

Volume in drive C is System Volume Serial Number is 40F8-C78D

Directory of C:\

04/09/2001 04:10p <DIR> Documents and Settings
04/09/2001 04:18p <DIR> Program Files
04/12/2001 09:48a <JUNCTION> RK
04/11/2001 04:10p <DIR> temp
04/11/2001 03:34p <DIR> WINNT
0 File(s) 0 bytes
5 Dir(s) 1,459,015,680 bytes free

(A junction is the name given to a reparse point linking to a subdirectory.)

Be aware that you must use the delrp command to remove a reparse point and not the normal del command (which is interpreted as applying to the target in most contexts)

==============

apk
 
Last edited:
First, I gave you what you need to alter it permanently/MOST LIKELY, earlier above in that which you quoted from me... as it was first stated which I quote from you now above, & based partially on what Slater was alluding to.

That's simple enough to change or "hardcode" in your registry.



Not sure what you're asking here, but will give it a go (your UNIX statement clued me in pretty much, & Symbolic/Soft Links & junctions + reparse points on NTFS are the key here)...

Lookup reparse points, junctions (the more likely of the two, vs. the former in reparse points), & Symbolic Links (w/ NTFS in your search term on GOOGLE as well)!

This may help you more on this next point you wish to try to do & NOW state, above!

This may help you in my P.S. (editing): Data about Symbolic Links/SoftLinks, & HOW to do them on NTFS & for folders/directories, which is what you are asking for... BUT, it needs a reskit tool!

(Thus, why I was "@ a loss" immediately @ least, on HOW to do these in NTFS (as there is no native facility in the OS for it))

HOWEVER, there is ways to implement junctions on NTFS & tools for it, see my P.S. below!

APK

P.S.=> I think this will do it for you:

==============

linkd: Create a Link

Windows 2000 introduces a new filesystem construct known as reparse points in its new version of NTFS. These entities are somewhat similar to Unix symbolic links, although they operate only on directories (folders) and not on individual files. The linkd command may be used to create such a link to a folder or drive, taking the link name and then the target directory as its arguments. For example, the following command creates C:\RK as a link to C:\Program Files\Resource Kit:

C:\> linkd c:\rk "c:\program files\resource kit"

RK looks like this in directory listings:

Volume in drive C is System Volume Serial Number is 40F8-C78D

Directory of C:\

04/09/2001 04:10p <DIR> Documents and Settings
04/09/2001 04:18p <DIR> Program Files
04/12/2001 09:48a <JUNCTION> RK
04/11/2001 04:10p <DIR> temp
04/11/2001 03:34p <DIR> WINNT
0 File(s) 0 bytes
5 Dir(s) 1,459,015,680 bytes free

(A junction is the name given to a reparse point linking to a subdirectory.)

Be aware that you must use the delrp command to remove a reparse point and not the normal del command (which is interpreted as applying to the target in most contexts)

==============

apk

I thank you for the first suggestion, and thank you even more with the more interesting second suggestion, where I won't need to play with registry entries and messing around with the various ways windows is organized from it's root structure.

I haven't yet got the courage to MOVE my programs files to another drive but the setup I'm in is ready to do so. Thoe, the idea of creating a shortcut on the C: for the Program Files that would be located on another drive really seemed like something simple, and that could work. It's like those programs that are located on the start menu, they are shortcuts to the executable. Or the various folders that are shortcuts to other folders. I can see that in Program Files where some microsoft folders are just shortcuts to the real content located on the Windows directory.

If I need to try this tool you are talking about, then I'll do it tomorrow. I'll put this on the ice for now. But it's all interesting stuff none the less.

EDIT: I just tried something. I created a shortcut on the C: of a directory located on my F: drive called _stuff. I now have C:_stuff which is a shortcut to the real directory on the F:. I move a file from C: called ip.txt into the shortcut C:_stuff. That works. Yet, if I search my C: drive for ip.txt, it will not find it in the shortcut.
 
Last edited:
and thank you even more with the more interesting second suggestion, where I won't need to play with registry entries and messing around with the various ways windows is organized from it's root structure.

Right... & I think it will do the job JUST AS YOU FINALLY HAVE GOTTEN AROUND TO ASKING FOR, & once you said "UNIX Commonplace"?

I knew it had to be Junctions & Reparse Points... to implement Symbolic/Soft Links on NTFS!

(I couldn't recall the tool needed, because it's NOT a "native tool" @ all, but a resource kit one that WILL/SHOULD do the job you ask for now... basically, making a 'shortcut pointer' (softlink) to the folders you need to 'repoint' to another location!)

I thank you for the first suggestion,

That MIGHT work, but would be a hell of a 'rigjob' imo... now, what I found "odd" about it is if you type SET in a DOS prompt? You WILL SEE ProgramFiles=C:\Program Files... this shows %ProgramFiles% IS an environment variable... albeit, 'hardcoded' to the system imo!

WHY DO I SAY THAT? Because neither area (registry path) above shows it in them, & yet it comes out as that in a SET statement!

I say it is risky/touchy to try hardcoding it as I noted in the SessionManager ENVIRONMENT area for the SYSTEM itself (not just the currently logged on user), as it may not reflect this change ALL thru the system & registry!

If I need to try this tool you are talking about, then I'll do it tomorrow. I'll put this on the ice for now. But it's all interesting stuff none the less.

Based on your needs that you stated above & I quoted? Should "fit the bill" nicely... doing what UNIX/Linux can do natively using Symbolic Links/Soft Links... basically what YOU called it: A redirected shortcut from one folder to another...

APK

P.S.=> Again, for your reference, I think this will do it for you:

==============

linkd: Create a Link

Windows 2000 introduces a new filesystem construct known as reparse points in its new version of NTFS. These entities are somewhat similar to Unix symbolic links, although they operate only on directories (folders) and not on individual files. The linkd command may be used to create such a link to a folder or drive, taking the link name and then the target directory as its arguments. For example, the following command creates C:\RK as a link to C:\Program Files\Resource Kit:

C:\> linkd c:\rk "c:\program files\resource kit"

RK looks like this in directory listings:

Volume in drive C is System Volume Serial Number is 40F8-C78D

Directory of C:\

04/09/2001 04:10p <DIR> Documents and Settings
04/09/2001 04:18p <DIR> Program Files
04/12/2001 09:48a <JUNCTION> RK
04/11/2001 04:10p <DIR> temp
04/11/2001 03:34p <DIR> WINNT
0 File(s) 0 bytes
5 Dir(s) 1,459,015,680 bytes free

(A junction is the name given to a reparse point linking to a subdirectory.)

Be aware that you must use the delrp command to remove a reparse point and not the normal del command (which is interpreted as applying to the target in most contexts)

==============

apk
 
EDIT: I just tried something. I created a shortcut on the C: of a directory located on my F: drive called _stuff. I now have C:_stuff which is a shortcut to the real directory on the F:. I move a file from C: called ip.txt into the shortcut C:_stuff. That works. Yet, if I search my C: drive for ip.txt, it will not find it in the shortcut.

This won't work for files afaik, but it WILL for folders... the 2nd question you asked for here.

(I mention that above iirc, in this QUOTE: "These entities are somewhat similar to Unix symbolic links, although they operate only on directories (folders) and not on individual files." when using the linkd resource kit tool facility for the creation & use of soft/symbolic type Unix links, for redirection of folder locations inside shortcuts, etc.)...

@ this point, you are on your own... perhaps others can help you here, but I think I have given you the tools you need to satisfy either one of your first 2 requests, & I would stick by using Reparse Points & Junctions for symbolic/softlink type UNIX folder access on NTFS in Windows... it fits what you wanted to do eventually, @ a folders level!

APK

P.S.=> You keep "changing gears" on us, & shifting your requirements... @ this point? ell, I know you have enough to do what it is you wanted to do in your first 2 questions/points you needed-wanted to do (either literally MOVE %ProgramFiles% (as in if you did an echo %ProgramFles% in a DOS prompt) OR, to create a softlink to its folder for use in batches & or other things on your part))...

NOW, if others wish? They can carry you the rest of the way here... & THEY MAY CONSIDER THE POTENTIAL USE OF ALTERNATE DATASTREAMS TO MAKE THIS WORK ON FILES AS WELL AS FOLDERS (since we know we can do symbolic links to folders already by now & the command to do it)...

I am too busy right now & have been for the past week now (thus, why I haven't been around) to keep up with the changes you're putting out man, & this last one? Afaik, can't be done "right" on NTFS & Windows @ least w/ linkd ONLY...

As linkD reskit tool only works on folders, not files, & this is a 'weakness' of NTFS implementation of symbolic links/reparse points & junctions... but, alternate datastream work here MIGHT help, for files.

IMO, you have enough to do the job, good luck experimenting, & have @ it! apk
 
Last edited:
OK thanks to all for helping. I'll come back with a test tomorrow and results.
 
that´s how i did it, works fine. however, some apps/games store their savegames/settings/profiles in "c:\documents+settings\username\AppData\Whatever"
...

afaik, this can only be changed in the program itself...

You can change it by changing the %APPDATA% enviorment variable.
 
Firstly, thanks to DanTheBanjoman to *state the obvious* FIRST thing I should have done.

Second, for anyone who would like the Windows 2003 Pro Ressource Kit.

Third, I'll be back shortly!
 
Second, for anyone who would like the Windows 2003 Pro Ressource Kit

That should allow for your 2nd requirement of:

Is it possible to put a shortcut as C:\Program Files and the real one in F:\Program Files ? This is common in unix env.

& doing that?

The reskit tool below can do for you @ a folders/directories capacity level emulating symbolic/softlinks which UNIX & its derivants have as best Windows NT-based OS' can using reparse points & junctions to do so in NTFS filesystems.

APK

P.S.=> Again, for your reference, I think this will do it for you:

==============

linkd: Create a Link

Windows 2000 introduces a new filesystem construct known as reparse points in its new version of NTFS. These entities are somewhat similar to Unix symbolic links, although they operate only on directories (folders) and not on individual files. The linkd command may be used to create such a link to a folder or drive, taking the link name and then the target directory as its arguments.

For example, the following command creates C:\RK as a link to C:\Program Files\Resource Kit:

C:\> linkd c:\rk "c:\program files\resource kit"

RK looks like this in directory listings:

Volume in drive C is System Volume Serial Number is 40F8-C78D

Directory of C:\

04/09/2001 04:10p <DIR> Documents and Settings
04/09/2001 04:18p <DIR> Program Files
04/12/2001 09:48a <JUNCTION> RK
04/11/2001 04:10p <DIR> temp
04/11/2001 03:34p <DIR> WINNT
0 File(s) 0 bytes
5 Dir(s) 1,459,015,680 bytes free

(A junction is the name given to a reparse point linking to a subdirectory.)

Be aware that you must use the delrp command to remove a reparse point and not the normal del command (which is interpreted as applying to the target in most contexts)

==============

apk
 
That should allow for your 2nd requirement of:



& doing that?

The reskit tool below can do for you @ a folders/directories capacity level emulating symbolic/softlinks which UNIX & its derivants have as best Windows NT-based OS' can using reparse points & junctions to do so in NTFS filesystems.

APK

P.S.=> Again, for your reference, I think this will do it for you:

==============

linkd: Create a Link

Windows 2000 introduces a new filesystem construct known as reparse points in its new version of NTFS. These entities are somewhat similar to Unix symbolic links, although they operate only on directories (folders) and not on individual files. The linkd command may be used to create such a link to a folder or drive, taking the link name and then the target directory as its arguments.

For example, the following command creates C:\RK as a link to C:\Program Files\Resource Kit:

C:\> linkd c:\rk "c:\program files\resource kit"

RK looks like this in directory listings:

Volume in drive C is System Volume Serial Number is 40F8-C78D

Directory of C:\

04/09/2001 04:10p <DIR> Documents and Settings
04/09/2001 04:18p <DIR> Program Files
04/12/2001 09:48a <JUNCTION> RK
04/11/2001 04:10p <DIR> temp
04/11/2001 03:34p <DIR> WINNT
0 File(s) 0 bytes
5 Dir(s) 1,459,015,680 bytes free

(A junction is the name given to a reparse point linking to a subdirectory.)

Be aware that you must use the delrp command to remove a reparse point and not the normal del command (which is interpreted as applying to the target in most contexts)

==============

apk

Yes and that early post by you actually is helping me, which you have quoted again here. It was a good call and I didn't void it. Just a little slow in giving results.

What I'll do is copy the whole tree structure of "Program Files" to F: and then rename the original. Then I'll use the linkd and see if that will work. Yet I am not 100% confident about renaming it because it is possible that windows will change the shortcuts accordinly, making those shortcuts point to the newly renamed "Program Files, and not to the new link proposed in C:. So it is very possible that a rename of "Program Files" will void my plans.

Also the proposition found on google which has 19 steps, which I have read, seems to make a relation between "Program Files" and "Documents an Settings". I don't know if I missed something critical in notion from that document.

I'll come back here soon.
 
OK the steps as I have performed them (note that F: was my destination drive):

#1 Install "Windows 2003 Pro Ressource Kit".

#2 Go to DOS prompt and perform the following: xcopy /s /e /h /r /k /o /x "c:\program files" "f:\program files". This will take a while as it copying quite a massive amount of data from one disk to the other.

#3 Compare both "c:Program Files" and "f:Program Files" for bytes count and files count for a match.

#4 Reboot in safe mode as system administrator

#5 In dos prompt, enter rd /s "c:\Program Files". It worked, except for around 10 files (NERO and Acrobat) that I got an "Access Refused".

#6 Perform a rename "c:\Program Files" "c:\_p" to fix temporarely the situation, before linking the newly created "F:\Program Files".

#7 Now go to where the new tool resides by typing cd "F:\Program Files\Windows Resource Kits\Tools\", still in dos prompt.

#8 linkd "C:\Program Files" "F:\Program Files" (link the newly created "Program Files" back to C: drive)

#9 Reboot Windows

#10 Finally, delete the last bits of the previous setup located in "C:\_p" using Windows Explorer

Tada

It seems to work. I will try see if when I install new programs, that it will effectively put them in F:. The way I will see that is if I install a program, will the disk space in C: reduce as much as the install files or will it be the F:.

Anyway, for anyone else who would be tempted to do this, it seems rather simple and doesn't break the configuration.
 
Last edited:
Back
Top