Solved

How to set HOMEDRIVE from a client

Posted on 2004-08-13
17
3,839 Views
Last Modified: 2012-06-27
Hi,

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.
0
Comment
Question by:alikoank
  • 7
  • 4
  • 4
  • +2
17 Comments
 
LVL 37

Assisted Solution

by:Gerwin Jansen
Gerwin Jansen earned 300 total points
ID: 11790924
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.
0
 
LVL 4

Author Comment

by:alikoank
ID: 11790968
thanks gerwinjansen,

if I do this my HOMEDRIVE will still be set to network drive, do you know anything about how to change it?
0
 
LVL 37

Expert Comment

by:Gerwin Jansen
ID: 11791256
what you could do is:

set HOMEDRIVE=c:

or make a user variable using system properties:

variable            value
HOMEDRIVE      c:
0
 
LVL 4

Author Comment

by:alikoank
ID: 11791377
unfortunately that does not work, HOMEDRIVE is set via logon scripts.

is there any way to set environment variables globally from command line?
0
 
LVL 37

Expert Comment

by:Gerwin Jansen
ID: 11791452
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'.

0
 
LVL 1

Assisted Solution

by:khennsu
khennsu earned 50 total points
ID: 11791510
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

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

I hope this helps. :-)

-K


0
 
LVL 1

Expert Comment

by:khennsu
ID: 11791748
Specifically:

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!

-K
0
 
LVL 4

Author Comment

by:alikoank
ID: 11791791
thanks for input khennsu,

Unfortunately environment variables set from logon scripts overrides registry/manually set ones.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 1

Expert Comment

by:khennsu
ID: 11792205
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.

Thanks,
Khennsu

0
 
LVL 4

Author Comment

by:alikoank
ID: 11792314
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.

EXPLANATION
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?
0
 
LVL 1

Expert Comment

by:khennsu
ID: 11792460
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"

-K
0
 
LVL 4

Author Comment

by:alikoank
ID: 11793325
well as I said before;

my computer is on a domain, drive redirection etc. are done when I am logging on.
0
 
LVL 37

Expert Comment

by:Gerwin Jansen
ID: 11796028
can't you have your admin change your setting for 'home directory' as I suggested?
0
 
LVL 4

Author Comment

by:alikoank
ID: 11796307
gerwinjansen:

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.
0
 
LVL 16

Accepted Solution

by:
JamesDS earned 150 total points
ID: 11796418
alikoank
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.

Cheers

JamesDS
0
 
LVL 57

Expert Comment

by:Pete Long
ID: 11799064
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

Pete
0
 
LVL 4

Author Comment

by:alikoank
ID: 11939166
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.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

If you build your web application in Visual Studio you'll get at least a few binaries, or .DLL, files in your bin folder. However, there is more compiling to be done. Normally this would happen when an ASP.NET resource within the web site is request…
Can you find a fax from a vendor you saved a decade ago in seconds? Have you ever cursed your PC under your breath during an audit because you couldn’t find the requested statement or driver history?  If you answered no to the first question or yes …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 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

18 Experts available now in Live!

Get 1:1 Help Now