Set "Users" to be on drive D: instead of drive C: during installation of Windows 7

4

2

Possible Duplicate:
Moving users folder on Windows Vista/Seven to another partition

I am planning on doing a re-installation of my Windows 7 (Home Premium) computer and I would like to set it up in a way that:

  1. System and "Program Files" are on drive C: partition
  2. "Users" will be on drive D: partition

What I basically want to have is to set the system up into something similar to what I usually do on my Linux installations; i.e. / will be the root partition and /home will be for the users.

Is this possible?

baktin

Posted 2011-07-08T17:38:16.780

Reputation: 173

Question was closed 2012-07-26T13:54:21.273

I believe you can use RT7Lite to do this, but I cannot check right now - I will check later this evening. – Breakthrough – 2011-07-08T18:31:21.690

check out my post which i was in the same boat the other day, my answer also tackle's some issues that the problems arises when changing registry values while data is present etc. Windows Installation and user profile path

– Edhen – 2012-05-08T01:50:07.887

Answers

3

There IS a way to do this. Someone had already mentions that this is possible with the WAIK (Windows Automation Image Kit). But that's a lot of work for just one install. Here is a better solution, albeit, unsupported. Also make sure to add the symlink that he mentions at the end, for programs foolish enough to hardcode their paths.

http://answers.microsoft.com/en-us/windows/forum/windows_7-files/win7-how-do-i-move-user-folder-to-a-different/565f16a5-e5ed-43c9-8422-4f56aebb296e

I'll cut and paste the instructions also, to prevent link rot.

When creating a clean install, using the combination of an SSD system drive and a conventional disk drive, as a data drive, there is a way to "move" the Users folder (normally, C:\Users) and the hidden ProgramData folder (normally C:\ProgramData) to the conventional disk, or data drive, using an answer file, or unattend.xml, for an unattended installation, as mentioned above. For an individual doing a single, one-off installation, trying to figure out how to create an answer file for a completely unattended installation, just to accomplish this one small task, is way, way too much trouble. It's also not necessary.

It is possible, during the course of a conventional, interactive installation from an installation disc or USB thumbdrive, to enter what is called, "Audit Mode", before the Computer is named or a Username created, and accomplish the necessary re-assignment.

1.) Do a conventional installation. If you are using an SSD, at the point in the installation process where you are asked where you want to install Windows, you should use Drive Options to remove any partitions on the SSD, before selecting the SSD as the target. Do not manually partition or format the drive, prior to installation. Windows 7 will do this, and must do this, because Windows needs to align the logical format with characteristics of the physical drive, and, also, Windows wants a small system partition for its own purposes.

2.) When the installation stops, waiting for you to give the computer a username and a computer name, DON'T! Press Ctrl+Shift+F3, and the computer will restart in . . . (wait for it!) "Audit Mode"!. Basically, Windows will create a throwaway Administrator account and sign you in, as this throwaway Administrator. Nothing you do, with regard to this temporary user will survive finalizing the installation, but the computer operates normally, and you can install drivers and software. Whenever the computer starts in Audit mode (you are allowed to restart), a GUI version of Sysprep.exe will pop up, offering to restart the computer in OOBE (out of box experience). OOBE is where you were a moment before -- that is, where you create a username and computer name and the installation is finalized. Don't choose to restart in OOBE until you are ready to finalize the installation.

3.) You need to know what drive letter (or folder location) is going to be assigned to your Datadrive disk. So, this would be the time, in audit mode, to figure that out. If you need to partition or format the datadrive, do it now. On the Start Menu, right-click on "Computer" and choose Manage from the context menu, to get to the Computer Management console. In the Computer Management console, under Storage/Disk Management, you will find the tools to change drive letters, partition, etc.

4.) You need only a minimal answer file. This is an xml file (a text file), created in the Windows System Image Manager application. You can call it whatever you like. I'd suggest: folders.xml. Here's the content of a folders.xml file, which will re-locate Users and ProgramData to D:\ d:\Users d:\ProgramData I am going to imagine a scenario, where you make this file on another computer, and transfer it to the computer, where the installation is being done, using a USB flashdrive, which, when plugged in, to the computer in Audit Mode, is assigned the driveletter U: You could probably just copy the text above into notepad and save it as a textfile with the extension, .xml and be good to go, provided you wanted to use d:\Users and d:\ProgramData as your Datadrive locations. (I've used this answer file, successfully; I don't guarantee that it will work for others.)

  1. To use the folders.xml, located in the root directory of your USB flashdrive, plugged in and visible as U:\, you need to open a command prompt, navigate to c:\windows\system32\sysprep and give this command: sysprep.exe /audit /reboot /unattend:U:\folders.xml This will cause the computer to reboot, but you will end up right back in Audit Mode. As long as you are still in Audit Mode, the re-location of these folders will not be complete, because the temporary Administrator useraccount still has its stuff in C:\Users and there are still some active databases in C:\ProgramData.

6.) Now, you need to say goodbye to Audit Mode. Remember that a GUI for using Sysprep to initialize the OOBE shows up, each time you re-boot into Audit Mode. So after you reboot in 5.) you will have your chance to run it. (If this is your personal computer, don't check the "Generalize" box in the Sysprep GUI.)

7.) Finish your Windows installation, create a permanent username and giving the computer a name, etc. When you are finally up and running, go look at C:\ C:\Users should be gone. C:\ProgramData is probably still there, but it's normally hidden, so you won't see it, until you go into Folder Options and check Show Hidden Files and Folders. D:\Users and D:\ProgramData (hidden) should also exist.

8.) I like the idea of using Junctions to intercept any program foolish enough to hardcode to c:\users or c:\programdata You'll need to delete or move C:\ProgramData, before creating a Junction at C:\ProgramData pointing to D:\ProgramData. The command line tool, mklink, is useful here. Open a command prompt, and type mklink /? for instructions. If you prefer a right-click GUI tool, check out:http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html After having created the Junctions, I believe you could use regedit to edit the ProfileList key back to the original C:\ locations. folders.xml will have modified the Folderlist key, so that everything points to D:\ instead of %systemdrive%\ or C:\ I'm not sure what the point would be, but you could.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

surfasb

Posted 2011-07-08T17:38:16.780

Reputation: 21 453

2

As far as I know you can't change the way Windows installs - but you can move the Users directory afterwards.

How to do that has been explained very well on Serverfault:

Serverfault: What's the best way to move c:\users to d:\users under vista/W7

Robert

Posted 2011-07-08T17:38:16.780

Reputation: 4 857

You could PROBABLY do this with WAIK in some fashion, but it would be incredibly ugly and not worth your time. Just move it after the fact. (Personally, I don't think there's any good reason to move it - if you want to just put the user document directories elsewhere Windows 7 already supports moving them natively whenever and whereever you want, no black magic required. This is the second answer on the linked question.) – Shinrai – 2011-07-08T18:05:19.177

But that has to be done for each user and the "user document directory" is only a small part of the user profile directory. No Desktop, no AppData, no Temp,... – Robert – 2011-07-08T18:11:12.570

You're exactly right...but as I said, I don't see a compelling reason to move that stuff. Your mileage may vary, of course. – Shinrai – 2011-07-08T18:17:23.237