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.
- 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.
- When the "Windows Setup" screen appears, press Shift + F10 keys together.
This will open the command prompt.
- 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:.
- 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.
- Delete your current C:\Program Files folder.
- 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.
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options: