-1

Back from my Windows XP days I remember that you could do registry hacks to change the default "Program Files" folder to be on a separate disk.

With NTFS I learned that you can mount disks not only as drive letter but also into an EMPTY folder.

Is it possible to mount a second disk to the Program Files folder? So that it would not require any registry hacks potentially.

2 Answers 2

1

Enter Disk Management by right clicking the start button and going to Disk Management - Alternatively go Windows+Rand type diskmgmt.msc.

Next scroll to the external drive and right click on the partition you want to use. Select Change drive letter and path and click Add. You can now specify the location of the folder you want to mount the drive to.

Be aware, the drive must be formatted to the same file system as the drive your Program Files folder is on (I.e. if Program Files is on a NTFS drive then the external drive must also be NTFS).

0

Also another trick (i will try in future) is to MKLINK the folder.

So Program Files folder points to another directory on any other partition/disk subfolder.

In my mind i am thinking on an multi-windows (more than dual-boot) with two SSD:

  • SSD1: Windows A, with program files pointing to SSD2:\WinA\Program_Files\, and program files (x8&) pointing to SSD2:\WinA\Program_Files_x86\
  • SSD1: Windows B, with program files pointing to SSD2:\WinB\Program_Files\, and program files (x8&) pointing to SSD2:\WinB\Program_Files_x86\
  • SSD1: Windows C, with program files pointing to SSD2:\WinC\Program_Files\, and program files (x8&) pointing to SSD2:\WinC\Program_Files_x86\

... and so on.

Since with \pagefile.sys and swapfile.sys it works, why not with such folders? I must try

For pagefile.sys and swapfile.sys i had done this:

  1. Configure Windows to not use any virtual ram and reboot
  2. With notepad create an empty file where you want pagefile.sys, when saving use double quotes, like "pagefile.sys", same for swapfile.sys (no need to be on the same place)
  3. Open a command prompt (CMD) with admin rights
  4. run mklink command to create a link between system partition root folder files pagefile.sys and swapfile.sys pointing to where you create them with notepad, i will put an example later
  5. Configure virtual ram on system disk as you wish (i preffer fixed size, btoh min and max to same value)

And voila, your pagefile.sys is on root of system partition, but it is stored on other place, mini-dumps and full-dumps works well.

Example commands for system partition be C: and place i want such files reside as M:\MyWindows\VirtualMemory\ can be:

MKLINK C:\pagefile.sys M:\MyWindows\VirtualMemory\pagefile.sys

MKLINK C:\swapfile.sys M:\MyWindows\VirtualMemory\swapfile.sys

Not to mention you can set different filenames, so this would also be ok:

MKLINK C:\pagefile.sys M:\MyWindowsA\VirtualMemory1\MyPageFile.DAT

MKLINK C:\swapfile.sys M:\MyWindowsB\VirtualMemory2\MySwapFile.DAT

The trick is to replace System root folder pagefile.sys and swapfile.sys with symbolic links to other files, so the data really resides away the system partition.

Very usefull in multi-boot, since such linked files can be the same for all windows, so you use theat space only once, see this sample:

  • On each Windows A,B,C...N, you create links pointing to the same files:

MKLINK C:\pagefile.sys M:\CommonToAllWindows\VirtualMemory\PageFile.DAT

MKLINK C:\swapfile.sys M:\CommonToAllWindows\VirtualMemory\MySwapFile.DAT

So when booting any Windows it will use the same file as other Windows (such files are initialized at boot, so not any problem.

Warning: This 'common' can not be used for program files and so on, since they must stay differenced from one Windows to another... but there is no reason to have all of them on the same partition with different names and such partition reside on different SSD to improve performance.

So i think it could the trick could be better to MKLINK rather than NTFS folder mount.

IMPORTANT: For MKLINK be able to do its job, both (source and dest) must reside on NTFS; and yes, FAT32 and exFAT will not be valid.

REMEMBER: If you UpGrade the Windows10 it will delete susch links and create normal files, so after UpGrade you must re-do the process for Linking them.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .