Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Redirecting c:\user structure to D drive

Posted on 2011-10-12
Medium Priority
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
  • 3
  • 2
  • 2
  • +2
LVL 66

Expert Comment

ID: 36957226
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

ID: 36957446
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

ID: 36957489
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 36957640
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

ID: 36957732
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

ID: 36960514
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

Accepted Solution

pgorod earned 2000 total points
ID: 36961074
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

maquet earned 0 total points
ID: 36981328
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

ID: 37010560
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.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
While working, an annoying popup showing below will come and we cannot cancel or close it form the screen. The error message will come again and again.
The goal of the tutorial is to teach the user how to make his/her own presets while editing so it is easier to edit there photos. Create a preset you like and copy that setting then save it in to your presets folder.
The goal of the tutorial is to teach the user how to remove a natural vignette your photos and how to add vignette to your photos.
Suggested Courses
Course of the Month10 days, 8 hours left to enroll

571 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