Windows 7, WINDOWS10 System directory Migration, modifying the default path for installation: Users,program Files,programdata

Source: Internet
Author: User
Tags safe mode

Tips: This article has been tested only for Win7, Windows 10 systems, and other systems have not yet been tested, but you may want to try. This experiment was a new thing I did.

WIN7_32-bit system to test, WINDOWS10 of course 64-bit system is also available. At least for now, my system is.

"Modify the default path for Windows Software Installation"

㈠ Opening the Registry

You must use the Administrator (Administrator) login system, press the Windows+r key, enter Regedit.

㈡ to modify the key value of the "ProgramFilesDir" entry in the registry

As an example of a win7_32-bit system, the registry path that needs to be modified is as follows

32-bit:"hkey_local_machine\software\microsoft\ windows\ CurrentVersion"

64-bit:"hkey_local_machine\software\wow6432node\microsoft\windows\currentversion";

The same is the PROGRAMFILESDIRZ item in the ProgramFilesDir and ProgramFilesDir (x86) to the path you want to set, the others do not change.

Here I also changed this item to the following path: "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion"

㈢ Small Summary

According to my personal computer habits, even if the default path of the software is changed, there will be some small imperfections. So here I'm going to talk about how to

The Program Files folder is transferred to a different drive letter, including the Program Files (x86) folder

"How to move the program Files directory to a non-system disk"

㈠ Copy Program Files folder to other disk

As you know, the C:\Program files directory and the C:\Program files (x86) directories are simply not removable by ordinary copy-pasting. Let me introduce a method here! There may be other methods on the Internet, but I personally think this is more practical.

Enter the command prompt interface input xcopy "C:\Program Files" "D:\Program files\"/e/h/k/x/y

The results after execution are as follows:

The above is only 32-bit operating system, if 64-bit operating system can also execute this command to move C:\Program Files (x86) to other drive letter.

㈢ Modifying a registry key

This step is the same as modifying the default installation path of the software but a little more.

The values that need to be modified are as follows:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion]
"ProgramFilesDir" = "D:\Program Files"
"CommonFilesDir" = "D:\Program Files\Common Files"

64-bit operating system will be slightly modified a little more, the path to write it! The picture is not cut.

"Hkey_local_machine\software\wow6432node\microsoft\windows\currentversion";

"ProgramFilesDir" = "D:\Program Files" (x86)

"ProgramFilesDir (x86)" = "D:\Program Files (x86)"

"CommonFilesDir" = "D:\Program files (x86) \common Files"

"CommonFilesDir (x86)" = "D:\Program files" \common files "

㈣ Restart the system and turn off the IPHLPSVC service

Enter CMD to hit the command line window, enter net stop iphlpsvc, return.

㈤ Delete the "C:\Program Files" directory

Some people say that in PE can be deleted directly, but I did not succeed, here I introduce a way to modify folder permissions to delete the "C:\Program Files" directory.

⑴ Right-click the Program Files folder property to find security-advanced-Owner

⑵ change the owner to Admnistrator, the legendary administrator. When changing the owner, check the Replace child container and object owner and then OK.

⑶ to the administrator to add Full control of the Program Files folder permissions, the practice is still right-click the Program Files folder properties to find security, this time we choose to edit. Give the administrator full control of the permissions.

⑷ Right-click the Program Files folder property to find security-advanced-permissions

⑸ Select the Administrator, and tick to replace all child object permissions with permissions that can be inherited from this object , select Apply OK.

⑹ Delete Program Files folder (if there is still a part of the file can not be deleted, then the boot press F8 into Safe mode, all can be deleted, I do this test when it appears "IEProxy.dll can not be deleted, Because the file is already open in Windows Explorer ")

⑺ Create a folder map, point to "C:\Program files" to "D:\Program files". Just enter the following command here to get it done.

Mklink/j "C:\Program Files" "D:\Program files"

Effects such as:

You can see clearly that the C:\Program files directory is just a shortcut, essentially a link to the D drive. Well, it's done here. It is primarily a modification of permissions.

Windows 7, WINDOWS10 System directory Migration, modifying the default path for installation: Users,program Files,programdata

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.