Go Back   TechArena Community > Software > Operating Systems
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 13-01-2010
Member
 
Join Date: Sep 2009
Posts: 143
Install Users folder to separate drive during windows setup

Well I know it is possible, but don't know how to do it. I want to move the Users folder to a separate folder after setup, but it still leaves behind a users folder with some items.
I have heard from some of my friends that it is possible but have to run some scripts and is possible only during clean installation.
So is any one aware of it.?
Reply With Quote
  #2  
Old 13-01-2010
Member
 
Join Date: Apr 2008
Posts: 3,518
Re: Install Users folder to separate drive during windows setup

Yeah, it is possible to change the drive of User's folder during installation of Windows. But then there is a very big script which you have to follow and then only it will work.
And it is impossible without very serious modifying and even parsing install.wim and editing all setup dll files inside boot.wim, because Windows 7 installation is like applying a whole image from install.wim to a physical partition. It's totally different from windows XP installation method, so i don't see how folders and files from one image inside install.wim can be moved to different root locations during setup.
Reply With Quote
  #3  
Old 13-01-2010
Member
 
Join Date: Sep 2009
Posts: 143
Re: Install Users folder to separate drive during windows setup

Well I have heard it is possible to do so. But yes I know there is a very big risk, because then my operating system may go corrupt and I then have to install it all over again. I have heard from my friends that by making some changes in the registry it can be done without any problem.
And I do know what to edit in the dll files and changing install.wim, but have no clue of what to do in registry.
Anyone aware of this.?
Reply With Quote
  #4  
Old 13-01-2010
Member
 
Join Date: May 2008
Posts: 2,676
Re: Install Users folder to separate drive during windows setup

Yeah, it is possible but then you have to use Autounnatend.xml, and that will help you out.
The code for Autounnatend.xml is as follows.:

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" 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>E:\users</ProfilesDirectory>
</FolderLocations>
</component>
</settings>
<cpi:offlineImage cpi:source="catalog://server/wim/pro x86/install_windows 7 professional.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>

You don't need to make any changes in registry but make this file.
Reply With Quote
  #5  
Old 13-01-2010
Member
 
Join Date: Sep 2009
Posts: 143
Re: Install Users folder to separate drive during windows setup

Hey thanks a lot for that code.
I tried it out and it did worked also, but had to make some changes in the code.
As I am using Windows 7 Ultimate edition so I had to just make a change of from Professional to Ultimate. And it worked.
Thanks once again.
Reply With Quote
  #6  
Old 13-01-2010
noltyx
 
Posts: n/a
Re: Install Users folder to separate drive during windows setup

mmm....interesting...
Reply With Quote
  #7  
Old 29-06-2010
Member
 
Join Date: Jun 2010
Posts: 2
Re: Install Users folder to separate drive during windows setup

I am having trouble getting this working.

I have autounattend.xml on the root of a USB stick imaged with 7 Pro 64 DVD and the following contents in said file :

<?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>E:\users</ProfilesDirectory>
</FolderLocations>
</component>
</settings>
<cpi:offlineImage cpi:source="catalog:/sources/install_windows 7 professional.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>

I am getting the following errors from the install console (Shift-F10) at X:\Windows\setupact.log :
Determining if we are in WDS/Unattend mode

[setup.exe] UnattendSearchExplicitPath: Found unattend file at [G:\autounattend.xml]; examining for applicability.

[setup.exe] UnattendSearchExplicitPath: [G:\autounattend.xml] does not meet criteria to be used for this unattend pass.

At first I thought the cpi:offlineImage cpi:source part was incorrect but if I exclude it I still get the same error.

Is the problem that I need to modify the install.wim file using the Automated Installation Kit?

I merely made a bootable USB stick and did an xcopy of all the files from the DVD and than just added the autounattend.xml file.

Thank you to anybody that can reply.
Reply With Quote
  #8  
Old 29-06-2010
Member
 
Join Date: Jun 2010
Posts: 2
idea Re: Install Users folder to separate drive during windows setup

I was able to get this working by running setup /unattend:autounattend.xml from within Windows but this is sloppy, I would rather get this working from a clean boot environment.

Last edited by joeys : 29-06-2010 at 03:57 PM. Reason: Accidental re-post
Reply With Quote
  #9  
Old 10-02-2011
Member
 
Join Date: Feb 2011
Posts: 1
Re: Install Users folder to separate drive during windows setup

When creating a clean install, there is a way to "move" the Users folder (normally, C:\Users) and the hidden ProgramData folder (normally C:\ProgramData) to a second partition or disk -- a data drive -- using an answer file, or unattend.xml, for an unattended installation, as mentioned above. This can be especially useful if you want to use a small SSD as a bootdrive and a big conventional drive to store your stuff.

I've included the contents of such a file, which I've used successfully when installing "Ultimate" x64, but it is basically the same as already provided by another commenter. I found that it is also useful to know about "Audit Mode" and describe that below.

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 for the system boot drive, 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/hardlinks...kshellext.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
Reply With Quote
  #10  
Old 04-08-2011
Member
 
Join Date: Aug 2011
Posts: 1
Re: Install Users folder to separate drive during windows setup

Thank you, BrianWild7 for an excellent walk through of the process! I followed your instructions and it worked great for me.
Reply With Quote
  #11  
Old 20-01-2012
Member
 
Join Date: Jan 2012
Posts: 1
Re: Install Users folder to separate drive during windows setup

Thank you for such a clearly written walkthrough. I know this is an older thread, but I'm hoping you can tell me what I'm doing wrong.

All of your steps work perfectly, until I exit audit mode. As the system boots for the first time, and error pops up saying that the folders.xml will not parse and is not valid. I then have to begin the installation over again. Here is my folders.xml code:

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="intel64" 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/sources/install.wim#Windows 7 PROFESSIONAL" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>

thank you.
Reply With Quote
Reply

  TechArena Community > Software > Operating Systems
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Install Users folder to separate drive during windows setup"
Thread Thread Starter Forum Replies Last Post
Windows unable to install on RAID drive (RAID0 Vertex setup) when intel DP67BG UEFI is enabled. 1-matra Motherboard Processor & RAM 7 13-04-2012 04:45 PM
How to install Windows 7 from USB flash drive for Windows XP users Dianiysom Guides & Tutorials 1 16-11-2011 05:43 PM
How do I put user directories on a separate drive in windows 7? chyarte Operating Systems 3 17-01-2011 07:09 PM
Can i install windows on separate internal drive Loyalpalm Windows Software 4 04-11-2010 07:47 AM
Move Users Profile folder in Windows 7 BYRNE Windows Software 4 02-08-2009 03:33 AM


All times are GMT +5.5. The time now is 08:10 AM.