Redirecting c:\user structure to D drive

Posted on 2011-10-12
Last Modified: 2012-05-12
I am looking to build a windows 7 image and having the users boot to a vhd instead of the hard drive.
So now when I boot from the VHD I have C drive (OS) and D drive that currenly only contains the booted vhd file.

How can a redirect the c:\users directory to d:\users. I want this to happen automatically whenever a new user logs into the machine.

I know I can click on my docs folder and redirect it to d but I don't want to have to do that for every folder.

I idea here is if the user gets a virus or corrupts something in the vhd, I can have the user boot from a usb stick replace the corrupt vhd with a new one and their data is still intact on the d drive.

All help will be appreciated.

Question by:maquet
    LVL 66

    Expert Comment

    I personally don't see the point, as a lot of the viruses nowadays specifically target the User's Profile... I don't think you are gaining anything with this....

    You can relocate the profile to another drive, autoatically, though, maybe by indicating a Roaming Profile path in their ad profile. Manually under the ProfileList key in the registry...

    Not sure of a Fully Auto way to relocate c:\Users though so it covers new profiles created.... Hopefully snother person will have an idea...
    LVL 28

    Expert Comment

    I don't have any profound ideas to add, but I did want to echo John's advice.

    Although there certainly isn't anything wrong with your plans, I believe that there really isn't any compelling reason to perform such an elaborate juggle.  As long as your end-users are utilizing a Standard account (without admin privileges), you have an antivirus application installed, and your Windows/application patching is up-to-date, the chances of encountering a virus or malware problem are very small.  If you encounter problems with the user data or the operating system itself, there are many tools at your disposal to recover gracefully:  Restore Previous Versions to recover files, SFC scans on the operating system, etc.

    Just my 2¢-worth.
    LVL 13

    Expert Comment

    From a command prompt run set | findstr C:\Userst' - you will then see all environment variables which reference the C:\Users location

    You can update these by doing a robocopy then updating junction point:

    >robocopy c:\Users d:\Users /mir /xj /copyall

    >mklink c:\Users d:\Users /j

    Author Comment

    The thought behind this is not just virus issues. 75% of my users are remote with laptops.  It would be less expense and quicker  to ship a usb stick with a current vhd image to the user instead of user shipping me his unit, backup the data, reimage, ship back out to user.  This is a 3-4 day turn around. VHD on the stick would allow me not to worry about users data, I can update the vhd with new apps, security updates etc and user  would have his unit back up in a day.

    I am looking for some sort local group policy setting to make d:\users the default place when users log into the machine.
    LVL 13

    Expert Comment

    I dont believe a GPO exists for this - you would need to set the command above in a logon script if you want to apply to multiple systems
    LVL 28

    Expert Comment

    Maquet, it sounds like your plan is solid enough, but under the circumstances I still think that it may be a bit too elaborate.

    If your primary goals are to alleviate potential virus vulnerability issues and update the OS as well as the applications on remote machines, have you considered Windows Intune?  The newest version launches in just a few more days, and in addition to Windows updates and security software it includes the ability to support third-party application updates.  It's a terrific product, and for a rather nominal cost, it could save you a great deal of time and effort:

    Microsoft to deliver next Windows Intune release on October 17

    Windows Intune Getting Started Guide
    LVL 4

    Accepted Solution

    You can find instructions here:

    and also here:

    Beware that this move can be problematic - but if you're using virtual machines you can always go back if you mess things up (remember to snapshot or make a copy of the VM!).

    Assisted Solution

    I found the answer at

    What this allowed me to do is move my users data directory outside of the VHD file.  I can now boot interchange 2 different vhd file on a users machine without having to worry about their data.

    Author Closing Comment

    With this procedure in place I can make a copy of the vhd before the unit ships out.  If a user ever corrupts their hard drive. I can boot the machine into pe mode.  and rename the vhd file so that I can boot up from the secondary windows 7 vhd.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    I. Introduction In a previous article ( (now deprecated), I discussed how to upgrad…
    The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
    The goal of the tutorial is to teach the user the full work flow of how to use flash media encoder to stream onto YouTube.
    The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now