How to set HOMEDRIVE from a client


my computer is logged on a domain and my HOMEDRIVE is set to a directory on server. My computer waits to connect to server each time I open My Computer or start a program.

when I try to delete net connection using

net use * /delete

net command complains that my homedrive is in use and it cannot delete it.

How can I set HOMEDRIVE to c:\ from my computer.

I have local administrator rights.
Who is Participating?
JamesDSConnect With a Mentor Commented:
Use the CUSRMGR tool available with the Windows 2000 resource kit.
This will allow you to set the homedrive on the domain, provided you have the access rights.


Gerwin Jansen, EE MVEConnect With a Mentor Topic Advisor Commented:
What  you could do is:

(if nescessary) change drive to c: then:

net use * /d /y

the /y part forces open files and/or directory searches to be closed.
alikoankAuthor Commented:
thanks gerwinjansen,

if I do this my HOMEDRIVE will still be set to network drive, do you know anything about how to change it?
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Gerwin Jansen, EE MVETopic Advisor Commented:
what you could do is:


or make a user variable using system properties:

variable            value
alikoankAuthor Commented:
unfortunately that does not work, HOMEDRIVE is set via logon scripts.

is there any way to set environment variables globally from command line?
Gerwin Jansen, EE MVETopic Advisor Commented:
OK, I'm afraid you have to ask an admin to change your 'Home Directory' to point to a local path. Usually (like your case), admins have home directories point to some network share, for backup purposes etc. The setting can be changed to something like c:\documents and settings\<username> using some admin tool. The setting is under 'user properties'.

khennsuConnect With a Mentor Commented:
well, this is just a thought, but it may work.

Consider attempting the following:

Go into the registry, where all environmental variables are stored.

After performing a backup of the registry (as a matter of course),
find the key:

HKEY_CURRENT_USER\Volatile Environment

and edit the registry string:

HOMEDRIVE reflect your intended homedrive, i.e., "C:"

I hope this helps. :-)



Start Menu -> Run -> regedit

Edit -> Find -> type: HOMEDRIVE

It should lead you to:

HKEY_CURRENT_USER\Volatile Environment

highlight "HOMEDRIVE" -> right-click then select "Modify"

change value to: C: (or whatever your desired homedrive is)

Exit registry editor

reboot (though this should take effect after you exit regedit)

If this does not solve your problem, repeat these instructions EXCEPT do not exit registry editor.

After changing "HKEY_CURRENT_USER\Volatile Environment" HOMEDRIVE string, hit F3 (find next)

This should take you to the other instance of HOMEDRIVE in the registry:

HKEY_USERS\S-1-(a bunch of numbers which is your SSID)\Volatile Environment

select "HOMEDRIVE" string -> modify it to: C: (or whatever you changed the other value to)

Exit registry editor

If necessary, reboot

I don't know if this will solve your problem, but it is the most direct way to modify environmental

variables and this method may overcome obstacles inherently present in other suggested methods.

Good luck!

alikoankAuthor Commented:
thanks for input khennsu,

Unfortunately environment variables set from logon scripts overrides registry/manually set ones.
well, it is a user variable and not a system variable, so it should refresh without reboot once you close regedit.  would this not change the environmental variable for the current session?  did you try this?  If so, I'd like to learn from this - perhaps you could relay how the system responds when you attempt to make a direct registry change.


alikoankAuthor Commented:
this is what happens when I issue

net use * /delete /y

The device is being accessed by an active process.
More help is available by typing NET HELPMSG 2404.

The drive letter you specified is the current drive of a session. You tried to delete a drive redirection (x:) while it is in use, possibly as your current drive.

so my question changes to: How can I cancel a drive redirection?
okay, device redirection is going to be in your bootloader.  find your boot.ini file - should be in the drive root of your system drive or right click My Computer and select properties.  Then select advanced tab, then click edit.  There is probably a line redirecting you to a remote system.  Delete this from the boot.ini file.  This should do it.

If this does not work, go into computer management (right-click my computer and select Manage).  Go to Users and Groups
Find your user account and select properties.  If there is a logon script associated with your user account you can delete it here.

*crossing my fingers"

alikoankAuthor Commented:
well as I said before;

my computer is on a domain, drive redirection etc. are done when I am logging on.
Gerwin Jansen, EE MVETopic Advisor Commented:
can't you have your admin change your setting for 'home directory' as I suggested?
alikoankAuthor Commented:

I can ask the admin and probably will anyway, but this question is more of the curiosity than the necessity. I want to know if it can be done. "It cannot be done" will be a valid answer if someone explains why.
Pete LongTechnical ConsultantCommented:
I think the correct answer of

>>have your admin change your setting

has allready been given, as network admins we do this for a reason - things on your C: drive get deleted/lost, "they just dissapear" for no apparent reason. Network admins back up your homedrive so if this trend of amazing dissapearing files ever occurs on the servers we can restore the info.

if/when you speak to your admins and they move it for you (or change your login script) dont be upset when they cannot restore stuff to you.

good luck and best wishes

alikoankAuthor Commented:
well, here is a workaround I have found. If I unconnect the ethenet cable system boots up normally, without any waits or setting network drives. After bootup I can reconnect the cable.

I will split the points for your effort.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.