Ethereal-dev: Re: [ethereal-dev] Patch for correct homedrive in util.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

Date: Wed, 8 Mar 2000 10:15:30 +0100
> Maybe I need to go tweak stuff with User Manager to make HOMEPATH refer
> to my home directory - perhaps it's just my UNIX bias, but I think of
> "{Windows directory}\Profiles\<user name>" as a user's home directory
> (the Platform SDK seems to imply that "Personal Documents" are stored
> under "Personal" in your profile directory - sure sounds like a home
> directory to *me*, but maybe Microsoft has some reason why a user
> should have some personal stuff under their profile directory and other
> personal stuff under a possibly-different home directory, or perhaps
> it's just historical noise).
> 
> It appears it defaults either to "\" or "\USERS\DEFAULT", depending
> on whether NT 4.0 Workstation was installed as the initial OS (as it
> was on the NT partition of my machine) or as an upgrade.
> 
> I set it to "C:\Winnt\Profiles\Guy".

I thing that HOME (in the UNIX sense) defaults to HOMEDRIVE\HOMEPATH 
which is logical for the Windows universe, (drive followed by path).

In most situations an NT computer is in a network, with a networkshare 
acting as a "homedrive". This can be set via 
User/New User/Profile/Home directory in the User Manager. This usually
defaults to a driveletter in homedrive and an empty (apart from a '\') 
homepath.

If you set the homedrive in the user manager to c:\winnt\profiles\guy
I think this would set HOMEDRIVE to c:\ and HOMEPATH to 
\winnt\profiles\guy

Set returns here:
HOMEDRIVE=K:
HOMEPATH=\
HOMESHARE=\\dtahvs03\ASikkema$
USERDOMAIN=PBCNT
USERNAME=ASikkema
USERPROFILE=C:\WINNT\Profiles\asikkema
windir=C:\WINNT

How about this scenario:
If the HOMEDIR\HOMEPATH combination doesn't return a sane value, try USERPROFILE, if 
that fails try windir, if that fails default to c:\

Homeshare basically is the same as HOME, it's just the whatitsname-name.

-- 
Andreas Sikkema
andreas.sikkema@xxxxxxxxxxx
  "Any PC built after 1985 has the storage capacity to house an evil spirit," 
Rev. Jim Peasboro in http://www.weeklyworldnews.com/stories/1745.html