How to change the default Program Files installation directory location in Windows 8 and Windows 7

Program Files is the one of most important directories in Windows. Usually it is located on the system drive and serves as the default installation location for all software. It is recommended by Microsoft to use this folder to store installed apps. In more recent versions of Windows, the Program Files folder is protected by special file system access rights so only administrators with elevated permissions can write to it when UAC is on. The default path to this folder is C:\Program Files. 64-bit versions of Windows additionally have the C:\Program Files (x86) folder which is used to store 32-bit programs. In this article, we will see how to change the location of the Program Files default installation directory used by app installers.

Note that you can always change the location where software will be installed, almost all software installers have this option. Personally, I never change this location and do not recommend you to change it unless you know exactly what you are doing. Microsoft does not support this way officially.

  1. Insert your bootable media and boot your PC from USB. (You may need to press some keys or change BIOS options to boot from USB.). See how to create bootable USB stick with Windows.
  2. When the "Windows Setup" screen appears, press Shift + F10 keys together.

    This will open the command prompt.
  3. Type notepad and hit Enter. Do not close the command prompt window.

    When Notepad opens, open the File menu -> Open... item. Click "This PC" in the left pane of the Open dialog to see your PC drives. Note the proper drive letter of your Windows partition where you have the Program Files directory. In the picture below, it is disk D:.
  4. Close the Open dialog and then close Notepad and type the following in the command prompt:
    xcopy  "D:\Program Files" "E:\Program Files" /e /i /h /s /k /p

    I assumed that drive E: is the desired new location for your Program Files folder.

  5. Delete your current C:\Program Files folder.
  6. Create a symbolic link from the new folder to the new folder:
    mklink /D "D:\Program Files" "E:\Program Files"

Now you can reboot your PC and start using Windows normally. I would like to warn you once again, that this trick can lead to unexpected behavior of the operating system - use it only if you exactly know what you are doing.

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

6 thoughts on “How to change the default Program Files installation directory location in Windows 8 and Windows 7

    1. Sergey Tkachenko Post author

      you need to turn it on in Explorer->Folder options first. It will affect the open/save dialog.

      Reply
      1. MDJ

        I mean when having that dialog opened from Windows installation setup. Can you launch File Explorer from there too? What‘s the point of launching Notepad then at all?

        Reply
        1. Sergey Tkachenko Post author

          Ah
          You cannot launch file explorer from there.
          And you cannot actually see those files in WinPE. But you can launch some alternative file manager like Total Commander and enable the ability to show those hidden files there.

          Reply
          1. MDJ

            Thanks for clearing things up! Looks like I‘ll need to have a copy of file manager in one of my partitions in case I‘ll need to repair my OS one day.

Leave a Reply

Your email address will not be published.