Thanks for all the hints. So it seems there's no proper way to get the
user home directory with mono. But this workaround works fine:

public string GetUserHomeDirectory ()
{
    if ((Environment.OSVersion.Platform == PlatformID.Win32S) ||
        (Environment.OSVersion.Platform == PlatformID.Win32Windows) ||
        (Environment.OSVersion.Platform == PlatformID.Win32NT))
    {
        return Environment.GetEnvironmentVariable ("USERPROFILE");
    }
    else {
        return Environment.GetEnvironmentVariable ("HOME");
    }
}

Bye,
Stefan
-- 
Stefan Saring <[EMAIL PROTECTED]>

_______________________________________________
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to