none
Relocation of ProgramFilesDir

    Question

  •  
    I know that relocation of the "C:\Program Files" and "C:\Program Files (x86)" (for 64-bit Vista) folders is not officially supported in Vista, and I strongly feel that Windows really should support relocation not only of "C:\Users" and "C:\ProgramData", but also of "C:\Program Files". In fact, some of the beta versions of Vista supported this, but for some reason the capability was removed in the final versions.

    So, my question is, will this shortcoming be fixed in Windows 7? Anybody know? Anybody able to tell someone who matters that this feature really, absolutely, positively must be in Windows 7? ;-)
    Tuesday, January 13, 2009 9:04 PM

Answers

  • Relocation of the "Program Files" directory is not supported in Windows Vista/7.  This feature is not currently planned.

    Relocation of the "Users" folder is supported through unattend.xml ("ProfilesDirectory" setting).

    Why is "Program Files" redirection not supported while "Users" is?  It's not just meant to be frustrating. :)  We encountered a number of technical hurdles with servicing components when they were in redirected locations.  We felt that without significat design changes, Setup would not be able to redirect folders without cause data loss scenarios and unservicable images.

    Thank you for the feedback!

    Stephen Lodwick [MSFT]
    Tuesday, January 13, 2009 11:59 PM

All replies

  • Hi

    Relocation is not supported but if you use an unatend.txt file at installation then you can change the original place.

    Nevertheless I agree that this should be an option (advanced option) at installation !

    (But I can understand it's not so easy with a WIM installation)

    Laurent Gébeau
    ______________________________________
    http://www.toutwindows.com/
    Tuesday, January 13, 2009 9:42 PM
  • Ahah! Are you sure this is now supported with an unattended.txt (wasn't this an xml file, iow, unattended.xml)? I ask because early Vista betas did have that option (of designating a different location for the Program Files folder at installation time), but released versions of Vista do not allow moving the folder referred to by ProgramFilesDir to any location other than C:\Program Files, neither at installation time nor later. I know how I can move the folder in Vista nevertheless, but that causes various kinds of problems, including, but not limited to, non-working filesystem virtualization, Windows Update issues, Volume Shadow Copy Service issues, etc. Vista only supports moving C:\ProgramData and C:\Users, but not C:\Program Files.

    So, Windows 7 now officially allows us to do this? This would be wonderful news indeed!

    Tuesday, January 13, 2009 11:49 PM
  • Relocation of the "Program Files" directory is not supported in Windows Vista/7.  This feature is not currently planned.

    Relocation of the "Users" folder is supported through unattend.xml ("ProfilesDirectory" setting).

    Why is "Program Files" redirection not supported while "Users" is?  It's not just meant to be frustrating. :)  We encountered a number of technical hurdles with servicing components when they were in redirected locations.  We felt that without significat design changes, Setup would not be able to redirect folders without cause data loss scenarios and unservicable images.

    Thank you for the feedback!

    Stephen Lodwick [MSFT]
    Tuesday, January 13, 2009 11:59 PM
  • O.k., I can accept that, to a point: One might still feel that the fundamental design of the OS should be such that these kinds of changes would not cause the kind of problems they are causing now. At the same time, it is understood that the realities of developing an operating system of the complexity of Windows today, with the multitude of boundary conditions involved, are quite different from the ideals of purity one might wish for. Yet, technical hurdles are there to be overcome, not to be used as excuses.

    I might also mention that I tried curcumventing these limitations of Vista by moving the contents of C:\Program Files to a different partition, and then pointing to that location via a reparse point. The idea was that now things would look exactly as before, and C:\Program Files would still be a valid address for ProgramFilesDir. Unfortunately, as you know, Vista (and Windows in general, even at the filesystem level) has various kinds of problems with these kinds of filesystem constructs. One major issue that I never fully understood is due to the fact that Windows Update implements some of its updates via hardlinks into the WinSxS hierarchy. Of course, that strategy will fail if C:\Program Files resides in a partition that is different from the one holding the WinSxS folder. The part about this that I do not understand is that, in principle, Windows Update will circumvent this issue when ProgramFilesDir points to a different partition, and will perform a file copy operation rather than a hard link in this situation. However, if ProgramFilesDir still reads "C:\Program Files", then Windows Update attempts to do a hardlink, and fails, of course. Why is it not possible for Windows Update to simply figure out that C:\Program Files is on a different partition, and react accordingly? And why, while we are at it, can we not implement all operations of the OS in such a way that it would not matter where various parts of the filesystem reside?

    You may recognize that questions like the above are natural for somebody familiar with Unix systems, which have always been designed in such a way that sub-trees of the filesystem can reside on different volumes without any issues. To me, this is the natural way to design things. Windows really should make an effort, and a serious effort at that, to leave those childish drive letters behind.

    Anyway, enough rambling for now... ;-)

    Thanks very much for your reply!
    Wednesday, January 14, 2009 2:23 AM
  • I disagree with hard coding paths & for an OS especially!

    I am a MS Developer and am scolded by MVPs for doing it in applications so why do the "experts" whom write the OS (& UPDATES for goodness sake) do so?

    Now that Solid State Drive are available and disk space limited, of course, the ability to install OS to any directory and lesser important Program files should be an imperative.  Other OSes do it!

    Vista introduced those "unavailable" directories as a step towards redirecting files a.k.a links so why hasn't Win7 made them fully moveable.


    Regards,

    I am an unimpressed expert user/developer/system admin whom might not take up Win7 even though I have an expensive MSDN Premium Subscription.

    Friday, June 12, 2009 12:15 AM
  • Relocation of the "Program Files" directory is not supported in Windows Vista/7.  This feature is not currently planned.

    Relocation of the "Users" folder is supported through unattend.xml ("ProfilesDirectory" setting).

    Why is "Program Files" redirection not supported while "Users" is?  It's not just meant to be frustrating. :)  We encountered a number of technical hurdles with servicing components when they were in redirected locations.  We felt that without significat design changes, Setup would not be able to redirect folders without cause data loss scenarios and unservicable images.

    Thank you for the feedback!

    Stephen Lodwick [MSFT]


    Well! NOT supporting a change of the ProgramFilesDir i IS FRUSTRATING..

    I strongly disagree with the "Install and run everything form one gigantic partition"-thinking..

    There are multifirous problems that arise when doing so...

    First of all you have an extreme fragmantation of the filesystem when both Swapfile and all temporary files are created on the same partition... And then you add all the temporary internet files to that... (It´s just not a proper way of handling your operatingsystem today!)

    So In XP I have (for many years now) installed Windows (As is) to a C-drive om 15GB, then run my configuration files and so on..

    And by that way having my programs (All of them) installed to Partition P: (For programs) My profiles and documents to D:\ (For Documents) and then my Temp files To T:\ (UserTemp has been T:\UserTemp) and put my major Swapfile om Partition Z: (For ZwapFile) I do keep a 100mb swapfile on C:\ for the services that require so!

    That Way I can Partition my two disks properly and reduce filefragmentetion to the minimum!

    (C:, P: and Temp are all on Disk0 While Disk 1 contains partitions D:, and Z:  It works GREAT..
    I do not suffer from the usual "Windows sickness" of a computer that works more and more slower for every day I use it!
    My computer i practically as fast to day as it was when i Installed it years ago!! And i would install my servers that way, if I decide to run a proper server at home or so..)

     And if that does not work i Windows 7 Pro... I see no other option than sticking to XP...
    And hope that microsoft adds that support to next windows version..

    The hardcoded problems are easy to fix for microsoft.. And if ProgramfilesDir are set during installation by the use of a AutoUnAttend.xml file then all registry pointers would point to the programfilesDir folder.. (And NOT be hardcoded to C:\Program files)

    If redirecting ProgramFilesDir creates problems in Windows 7, then it is because Microsoft knowingly created the problems for some "religious" reason.. That is plain stupid! Simply by not supporting installations where ProgramFilsDir point anyware else than C:\Program files is sufficent. There is no need to block the ProgramFilesDir-option i AutoUnAttend.xml

    Microsoft should realize that modern people simply do not find the "All in one partition installation" sufficient anymore..

    Beeing able to install programs properly to an other physical disk is a requirement for Windows 7´s next Service Pack! That is when you should add the support for changing programFilesDir in AutoUnattend.xlm

    A search for "changing Programfiles" or ProgramFilesDir will show you that we who have advanced away from one gigantic partition-installations are in great numbers today... So many infact that NOT listening to our demands are futile!

    Microsoft knows that we are looking forward to upgrading our installations from XP to Windows 7. So are Microsoft I suppose!??

     

    /Your Dick

    Wednesday, October 13, 2010 12:23 PM
  • My gripe is that since the Windows NT and 95 days I always wished that the program location would be "Programs" instead of "Program Files". Everything is a file of some type so the "Files" part is redundant and it ould have been more compatible with older DOS programs when Windows 95 was introduced. I typically make that change using the sif file on XP but looking for a similar way with Windows 7.

    At least they gor rid of "Documents and Settigns\<user>\My Documents" and a cleaner \Users\<user>\Documents tree.

     

    Friday, January 28, 2011 4:58 PM