Attaching and linking (assign and mklink) -- disk partition planning for Windows 7

Source: Internet
Author: User

Unfinished -- CurrentArticleNot finished. Write again when you are free.

During Linux installation, you can set the mount point of the partition.

This can also be done in windows.

Windows 7 directory structure:

C: \ directory

2010/01/30 08:14 <dir> $ recycle. Bin
2010/01/30 08:02 <dir> boot
2009/07/14 <junction> Documents and Settings [c: \ Users]
2009/07/14 :37 <dir> perflogs
2009/07/14 16:41 <dir> Program Files
2010/01/30 08:13 <dir> programdata
2010/01/30 08:13 <dir> recovery
2010/01/30 08:08 <dir> system volume information
2010/01/30 08:13 <dir> Users
2010/01/30 08:10 <dir> Windows

10 Directories

The meanings of these directories in c: \ are as follows:

<Junction> Documents and Settings [c: \ Users] // link (to be compatible with XP)

<Dir> program files //Program(For All Users)
<Dir> programdata // Program-generated data (for all users, such as MySQL database files)

<Dir> Users // data of each user
<Dir> Windows // System File

C: \ Users directory structure:

2010/01/30 08:57

.
2010/01/30 08:57 ..
2009/07/14 all users [c: \ programdata]
2010/01/30 08:13 default
2009/07/14 Default User [C: \ Users \ default]
2009/07/14 Public
2010/01/30 08:56 tester
C: \ users the meanings of these directories are as follows:

2009/07/14 <symlinkd> all users [c: \ programdata] // link (to be compatible with XP)
2010/01/30 <dir> default // user's default settings (copy a default value here when creating a user, including the desktop, Start Menu, and program configuration file)
2009/07/14 <junction> Default User [c: \ Users \ default] // link (to be compatible with XP)
2009/07/14 <dir> Public // files shared by all users (shared music, program configuration files effective for all users)
2010/01/30 <dir> tester // The user I created when installing the system

You cannot select a mount point when installing Windows XP or Windows 7, but you can modify it after installation.

There are two ideas:

1. Move the folder to disk D, and create a link on disk C pointing to disk D.

Use the linkd command in XP (which must be downloaded separately) and the mklink command in Vista and Windows 7 (which comes with the system ).

The directory structure of the newly installed Windows 7 is as follows:

2. the hard disk is divided into multiple zones, but there is only one drive letter for drive C. If there is no drive letter for other partitions, use NTFS mount to mount the drive C folder. (After more than 26 drive letters, remember to manually mount them)

@ Echo off

@ REM set/P partition_old = enter the drive letter (such as C) of the previous users, program files, and programdata ):
Set/P partition_new = enter the drive letter (such as D or E) of the current program files, programdata, and users ):
Set/P user_name = enter your username (see the folder under users ):
Echo.
@ REM echo % partition_old %
@ REM echo % partition_new %

Echo ------------ fixed symlinkd ------ In % partition_new %: \ programdata ------
Rd % partition_new %: \ programdata \ "Application Data"
Mklink % partition_new %: \ programdata \ "Application Data" .. \ programdata/d
Rd % partition_new %: \ programdata \ Desktop
Mklink % partition_new %: \ programdata \ Desktop .. \ Users \ public \ Desktop/d
Rd % partition_new %: \ programdata \ Documents
Mklink % partition_new %: \ programdata \ Documents .. \ Users \ public \ Documents/d
Rd % partition_new %: \ programdata \ favorites
Mklink % partition_new %: \ programdata \ favorites .. \ Users \ public \ favorites/d
Rd % partition_new %: \ programdata \ "Start Menu"
Mklink % partition_new %: \ programdata \ "Start Menu". \ Microsoft \ Windows \ "Start Menu"/d
Rd % partition_new %: \ programdata \ templates
Mklink % partition_new %: \ programdata \ templates. \ Microsoft \ Windows \ templates/d
Rd % partition_new %: \ programdata \ "Start Menu"
Mklink % partition_new %: \ programdata \ "" start "menu". \ Microsoft \ Windows \ "Start Menu"/d
Rd % partition_new %: \ programdata \ "favorites"
Mklink % partition_new %: \ programdata \ "favorites" .. \ Users \ public \ favorites/d
Rd % partition_new %: \ programdata \ "desktop"
Mklink % partition_new %: \ programdata \ "desktop"... \ Users \ public \ Desktop/d
Echo ^ ^
Echo.

Echo ------------ fixed symlinkd -------- in % partition_new %: \ Users --------
Rd % partition_new %: \ Users \ "Default User"
Mklink % partition_new %: \ Users \ "Default User" % partition_new %: \ Users \ default/d
Echo ^ ^
Echo.

Echo ------------ fixed symlinkd ------ In % partition_new %: \ Users \ % user_name % ------
Rd % partition_new %: \ Users \ % user_name % \ "Application Data"
Mklink % partition_new %: \ Users \ % user_name % \ "Application Data". \ appdata \ roaming/d

Rd % partition_new %: \ Users \ % user_name % \ cookies
Mklink % partition_new %: \ Users \ % user_name % \ cookies. \ appdata \ roaming \ Microsoft \ Windows \ cookies/d

Rd % partition_new %: \ Users \ % user_name % \ "Local Settings"
Mklink % partition_new %: \ Users \ % user_name % \ "Local Settings". \ appdata \ Local/d

Rd % partition_new %: \ Users \ % user_name % \ "My Documents ents"
Mklink % partition_new %: \ Users \ % user_name % \ "My Documents ents". \ Documents ents/d

Rd % partition_new %: \ Users \ % user_name % \ nethood
Mklink % partition_new %: \ Users \ % user_name % \ nethood. \ appdata \ roaming \ Microsoft \ Windows \ "Network shortcuts"/d

Rd % partition_new %: \ Users \ % user_name % \ printhood
Mklink % partition_new %: \ Users \ % user_name % \ printhood. \ appdata \ roaming \ Microsoft \ Windows \ "Printer shortcuts"/d

Rd % partition_new %: \ Users \ % user_name % \ recent
Mklink % partition_new %: \ Users \ % user_name % \ recent. \ appdata \ roaming \ Microsoft \ Windows \ recent/d

Rd % partition_new %: \ Users \ % user_name % \ sendto
Mklink % partition_new %: \ Users \ % user_name % \ sendto. \ appdata \ roaming \ Microsoft \ Windows \ sendto/d

Rd % partition_new %: \ Users \ % user_name % \ templates
Mklink % partition_new %: \ Users \ % user_name % \ templates. \ appdata \ roaming \ Microsoft \ Windows \ templates/d

Rd % partition_new %: \ Users \ % user_name % \ "Start Menu"
Mklink % partition_new %: \ Users \ % user_name % \ "" start "menu". \ appdata \ roaming \ Microsoft \ Windows \ "Start Menu"/d
Echo ^ ^
Echo.
@ REM pause

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.