|
|
(with all its registry tentacles taken care of)
Related to
this question but somewhat different (using Win7 RC)
I would like to move the user folders for all family members to E:\
What is the best way?
When I cut and paste, I am warned about a bunch of system folders. Also, I don't see the LOCATION tab when I click properties.
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:\
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<FolderLocations>
<ProfilesDirectory>d:\Users</ProfilesDirectory>
<ProgramData>d:\ProgramData</ProgramData>
</FolderLocations>
</component>
</settings>
<cpi:offlineImage cpi:source="wim:h:/sources/install.wim#Windows 7 ULTIMATE" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>
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.)
5. 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
Related to this question but somewhat different (using Win7 RC)
I would like to move the user folders for all family members to E:\
What is the best way?
When I cut and paste, I am warned about a bunch of system folders. Also, I don't see the LOCATION tab when I click properties.
Walkthrough: Build an Answer File for BIOS-Based Computers
Hi, this thread is great. Unfortunately I have already installed Win7 and prefer to avoid doing so again, so unattend.xml would be my least preferred choice. However, I am still confused as to what constitutes best practice. In my search for the answer I found 3 possible approaches. I have appended links to the threads I found most useful (some of these discuss Vista; apparently Windows 7 behaves the same way). I am looking for the most reliable set up in the case of a total hard drive failure. Ideally I should be able to load an image of my operating system and program files onto a new hard drive and be up and running immediately with full access to all my data and documents that reside on an external hard drive (also backed up of course). No having to fiddle with program settings in skype, firefox, outlook, to name a few. Also there should be no impairment of windows ability to index data and no restrictions impact on future updates/upgrades.
To date I have been using Ghost 14 for image backups on XP (and I have heard that it works on Win 7 despite what Symantec would have you believe) but I may be able to rely on the inbuilt imaging capability in Win 7.
1 - Use the Location tab to change the location of the User sub folders. Pros - easy; cons - doesnt work for all user folders, especially those that contain your .pst files
http://www.w7forums.com/change-location-my-documents-folder-t338.html
http://hubpages.com/hub/Windows-7_-_Moving_My_Documents
http://www.sevenforums.com/tutorials/18629-user-folders-change-default-location.html
http://www.edbott.com/weblog/?p=1371
2 - Use regedit to change the location of the user sub folders and the root users folder. Pros - referenced by most as the way to go; cons - sounds very fiddly (Joshua Mouch did lots of copying and pasting); unclear impact on indexing and windows upgrades
http://joshmouch.wordpress.com/2007/04/07/change-user-profile-folder-location-in-vista/
http://www.windows7hacker.com/index.php/2009/05/how-to-change-user-profile-default-location-in-windows-7/
3 - Use symbolic linking to change the location of various user folders - pros - looks easy, cons - unknown reliability
http://www.windows7home.net/how-to-move-user-data-folder-to-non-system-partition-in-windows-7vista/
http://www.starkeith.net/coredump/2009/05/18/how-to-move-your-windows-user-profile-to-another-drive/
http://tuts4tech.net/2009/08/05/windows-7-move-the-users-and-program-files-directories-to-a-different-partition/
Has anyone compared updating registries vs the symbolic link approach? On further reflection what is the downside of the operating system image including the Appdata folder? If there is no downside then approach 1 probably works fine. Can I undo any of the above approaches and try a different one? or is it a case of new install each time?
Thanks, Marco
With all due respect, this seems like a complex and backward approach when dealing with PST files. Using the settings wizard in Outlook, why not either create a new PST file in a folder in your Documents folder, or move the current ones to it from the Appdata\local\Microsoft\Outlook folder? Its very easy to do, you just point Outlook to the new location, which can be on any drive.
I've used this method for years with no problem, so that my Outlook files will be easily backed up along with the rest of the contents of my Documents folder.
There is even a simple workaround for the OST files used by Exchange or Hotmail connector. You create a new PST in your Documents folder, then, within Outlook, create a Rule to send all mail from the account to the new PST that you have created, which will empty the OST files in the Appdata folders. You can't reliably move the OST files, but they will remain empty and very small, since they will only be used fleetingly for data transit.
As for data backup and restore, Windows 7 has made this a dream compared to earlier versions. I found that rather than make a separate image and data backup, all I need is to make a system image file on an external USB drive. You can back up the data separately, but there is a little known feature of that image that makes the time- and space-consuming dual backups uneccesary.
You can mount the image, which is seen as a .VHD (Virtual Hard Drive) file in a subfolder of the WindowsImageBackup folder. In the Computer Management console, if you right click on the Disk Management, you can mount that .VHD image as an extra hard drive. You now are capable of copying anything to and from that duplicate of your system drive, provided you don't make it read-only when mounting it.
I schedule a Windows Image backup once a week, but if there are any important files to backup in the meantime, I just copy them to the mounted VHD. If you have to replace any corrupt system files on your C: drive, you can choose a restore point that is located in the VHD, or if you have an hour or so, restore your whole system, including the data, with this same image.
This is one of the main reasons that I'm lovin' Windows 7.
Enter the thread ID of the thread you are merging into
To report abuse, sign in or continue without signing in
Thank you.
|
|
|
|
Don't have one of the above accounts?