Moving (non-C:) Program Files from soon-to-be-nuked partition to another

1

Problem

I have near-critically low levels of free space on the Windows' partition. I have a bigger partition right next to it, and a new disk with enough space to move it. Bigger partition has a lot of programs on it, and I don't want/can't reinstall them all.

Details

My PC is operating on a single 500GB hard drive disk. It has three NTFS partitions: C:, E: and G:.

C: is a 98GB Windows partition with around 94GB of space used.

E: is a 150GB partition with 113GB of space used, of which 58GB are Program Files (for 106 applications), ie. installation folders of various applications that would normally go to C:\Program Files or C:\[regional name for Program Files] (x86). It is a regular folder, manually created on the disk, no redirection/symlink/junction wizardry.

G: is going to stay completely unchanged and will contain a system restore point.

The new disk is a ready-to-be-formatted 500GB hard drive disk.

What I think I should do

I backup the system, format the new hard drive disk with partitions X: and Y:, close every running program, copy everything from E: to X:, and using Windows' Disk Manager delete E:, append the resulting free space to C:, and...

...do something so all these applications will still work as normal, without having to hunt down the installer, download it, run it and wait until it finishes, repeated 106 times. That's the problematic part, and I came up with two solutions.

Perceived solution - variant A

I use Disk Manager to rename X: to E: and all the software behaves as if nothing happened.

Perceived solution - variant B

I carefully and manually edit the registry and all the shortcuts, replacing "e:" with "x:" and "E:" with "X:".

Common solutions that won't work here

  • Using a popular "application mover" software, like SteamMover - as far as I'm aware, all of them work by moving the desired folders to another location and leaving a junction behind. But in this case there's nowhere to put the junction, since E: is going to be assimilated.

  • Instead of deleting E:, reduce it to a ~1GB stump containing only symbolic links, hard links or junction points - instead of deleting the whole drive, Windows' Disk Manager can remove an unused part from one partition for use in another. However, the resulting free space only appears after the partition, and can be only attached to the original partition or the one after it. Since E: is after C:, I wouldn't be able to attach the space to it. And while there is software that enables moving that space before a partition, after a very thorough examination I did 10 months ago, all of them either do not work for NTFS or explicitly say it's exclusive to premium version (I'm looking at you, EaseUS).

Question

Is any of the solutions I came up with is going to work? Is there actually an obscure free/libre/open-source application just for that? Or is there an easier solution that I can't see?

Dragomok

Posted 2016-05-01T11:00:38.933

Reputation: 183

Answers

1

Variant C:

Get a copy of GParted from www.gparted.org.
Put the ISO on a USB-stick or CD.
From a CMD-prompt with admin-rights run chkdsk /f on your C: and E: drives to make sure they are both without any problems.

Install the new disk as an extra disk in your system.
Boot GParted from CD or USB stick
Copy, using GParted your existing E: to the new disk.
Then increase its size to the full disk. Delete the original E:
And last, but not least, increase C: so it takes the space previously occupied by old E:
When all this is done boot Windows in SAFE MODE. (Keep F8 pressed will start up, it should give you a menu where you can select SAFE MODE.)
Go into disk administrator and re-assign whatever drive-letter now given to the new E: drive so it actually is going to be E:
(The Safe Mode is just to prevent any non-essential software from starting before the drive-letter is fixed.)
Reboot and you're done.

Even though the GParted folks don't give any guarantees about using it on NTFS drives I have done so hundreds of times without issues.
It works and is free. (It also does moving NTFS partitions. No need to pay for something commercial as you mentioned in variant B.)

Tonny

Posted 2016-05-01T11:00:38.933

Reputation: 19 919

The problem with GParted is that it shows /dev/sda1 (restricted by system) 992.5KB, /dev/sda2 (label for C:) 100MB, /dev/sda3 (label for E:) 98GB (size of C:) and /dev/sda4 (label for G:) 368GB (size of E: and G: combined). And it shows Used/Unused only for the last one, which are 187GB/34GB and correspond to G:. IIRC Win7 installer sees the partition the same way. I wasn't the one to do the first format on my drive, and have no way to contact that person. Is it something I should make another question about? – Dragomok – 2016-05-02T09:21:00.563

While using GParted wasn't necessary in my case as I presented it (although I did use it as to save my not-really-needed Ubuntu from wipe), this answer provides a step-by-step solution and mentions SAFE MODE, about which I have completely forgotten and planned to turn everything off manually, so I feel this is the better of two answers. – Dragomok – 2016-05-02T16:22:40.220

2

Variant A of your perceived solutions should work perfectly on the condition that the folder structure that currently exists on E is maintained on X (the new E).

When you think about it, all the computer will "see" by the time you have finished is that partition E will be slightly smaller and partition C will be slightly bigger - as long as the registry paths to the relevant program files are maintained (which will be the case if you rename X to E), your system shouldn't care.

I believe variant B would also work in theory, it's just highly prone to error.

On a side note, great job with the formatting of your question, +1 for that.

Sam3000

Posted 2016-05-01T11:00:38.933

Reputation: 2 730