Windows files on two drives

Antti Luukkonen 0 Reputation points
2023-08-28T16:27:28.0866667+00:00

I am currently trying to migrate my windows drive (C:) to a larger drive (L:) using a system image recovery like in https://helpdeskgeek.com/windows-10/how-to-migrate-windows-10-to-a-new-hard-drive/. However, it seems that Windows has installed some files on another drive (E:) as well. I would like all of my windows system files to be on the same drive (L:). The recovery does not allow me to migrate files unless the HDD is connected, but I would like to format the HDD for other use.

How can I get rid of the windows files and ensure that windows won't install any system files into the drive anymore? I already deleted most of the files (Something related to the windows store and Xbox apps which I don't use) but I can't delete the remaining folders: Program Files (not the main program files, this one only contains an empty folder called ModifiableWindowsApps), WindowsApps and WpSystem. Is it safe to forcefully delete them? Windows says it requires permission from TrustedInstaller when trying to delete them.

Thanks for your help,
Antti

Edit: I would like to keep my windows installation intact and not have to completely reinstall

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,812 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 44,431 Reputation points
    2023-08-29T10:11:14.29+00:00

    Hello there,

    To change the default installation path, just follow below steps:

    1. Press Windows key + R and type gpedit.msc
    2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion.
    3. At the right panel, look for ProgramFilesDir.
    4. Double click on it to change the value to your desired path. For example, change the value from C:\Program Files to D:\Softwares.

    Hope this resolves your Query !!

    --If the reply is helpful, please Upvote and Accept it as an answer--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.