[Mono-list] How to get user's HOME directory

Stefan Saring stefan.saring@epost.de
04 Apr 2003 09:50:43 +0200


Hi Simon,

I've just entered the "set" command on my Win2k box (SP3, german). The
variable HOME does not exists, but USERPROFILE does.
Could it be, that HOME was set by you or some application (e.g. CygWin)
?

Isn't there any other (proper) way to get the user's home directory with
mono ?

Regards,
Stefan

-----------------------------------------------------------------

Stefan:
Typing set at the command prompt will give you something like:

HOME=%USERPROFILE%
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\simon
USERDOMAIN=LAN
USERNAME=simon
USERPROFILE=C:\Documents and Settings\simon

If you're not using NT/2K/XP all bets are off. Win9x/ME don't have the
concept
of $HOME

-Simon