Modify Program Files Path?, Part 2

Dennis Faas's picture


Almost all applications (downloaded off the Internet / run from CD) need to be installed onto Windows using a program installer (commonly known as Setup.exe). In most cases, the program setup will attempt to install a program to the base folder C:\program files\.

Yesterday, I asked Readers if it was possible to change the Windows default program installation folder to something other than C:\program files\.

Rodger D. and many other users recommended using TweakUI to perform such a task:

" Microsoft's TweakUI program [http link below] is able to change the default program installation path. To do this, install and launch TweakUI. Under the My Computer tab, use the drop-down box under Special Folders and select Program Files. Click the Change Location button, and browse to your preferred new location. TweakUI will display a warning: Click Apply and OK. "

Side note: As far as I understand, this setting is a "shortcut" and is referred to (in computer lingo) as the %ProgramFiles% variable. It works something like this: %ProgramFiles% points to a folder location on your system (ie: C:\program files) and is definable using TweakUI. Once a program installation is launched, the variable folder %ProgramFiles% is referenced.

If an installed program is still using the soft reference (shortcut) to %ProgramFiles% -- *and* the %ProgramFiles% variable has been changed -- this may cause the program to stop functioning properly.

In this case, the user would either have to edit all Windows Registry entries pertaining to the said program and change all referenced paths, or use a program such as PC Magazine's Change Of Address (COA) which can quickly search through the Windows Registry and update references automatically.

On another note, I have been recently informed that Ziff Davis and affiliate web sites (PC Magazine / Extreme Tech) now require a yearly subscription to transfer files from their web site. I tried searching Google for a secondary reference to COA, but came up empty-handed.

With respect to Rodger's suggestion, Microsoft's TweakUI (which is also bundled with PowerToys), may be downloaded from Microsoft's web site.

To start TweakUI, use the TweakUI shortcut in your Start Menu (not the Control Panel), or run \windows\system32\tweakui.exe.

Rodger D. also went on to say that the %ProgramFiles% reference can also be changed using the Windows Registry:

" You can also modify a key in the Windows Registry to change the ProgramFilesDir value: Click Start -> Run. Type in regedit, and scroll to [HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft Windows \ CurrentVersion]. Change the value of "ProgramFilesDir" to the desired directory. Restart Windows for the change to take effect. "

Side note: The same rules apply here as they do above with respect to changing the 'ProgramFilesDir' key.

So, can the Program Files path be changed -- without repercussion?

The short answer is: Yes, but, it requires a bit of work. In the long run, it's well worth the effort!

If you plan to install all your program files to another drive letter (IE: D:\program files instead of C:\program files) and don't want all the worries of breaking reference links to other installed programs, the safest bet is to reinstall Windows, as Joe P. suggests:

Format and partition your drive, if necessary. I have partitioned my 60GB drive into 4 drive letters -- C drive is Windows, D drive is my Programs and Common Files, E drive is for My Documents and Settings, and F is for my temporary files.

Install Windows onto the freshly formatted C drive. [At this point] do *not* install any other software!

Once you have installed Windows, [use TweakUI or the Registry Editor to change the %ProgramFiles% value, as described above].

[Proceed to install all third-party applications. Remember that not all setup programs are the same and you may need to look around to find and change the destination folder (if necessary)].

If you own disk imaging software such as Acronis True Image, I would also recommend creating an image backup of the operating system before any applications are installed (IE: between steps 3 and 4 above).

This backup can be referred to as your "bare-bones operating system" backup and will certainly come in handy, especially if your application hard drive goes corrupt, or if you decide to do some spring cleaning on your application drive by formatting it. This way, the operating system will remain in tact and there won't be any references to installed applications.

Rate this article: 
No votes yet