I can tell you right now that it is probably impossible to obtain the
user's password. I struggled with this very issue for about a month,
trying to find the solution. It was not pretty. I found that Windows
does keep an accessible variable for the password due to security, but
if I remember correctly, you can obtain the user's username from an
environment variable, as you suggested.
Things may have changed, it has been nearly a year since I attempted
that unsuccessfully. But I hope this helps in the mean time.
Ryan L. Cross
http://sadmonkey.net
Quidquid latine dictum sit altum viditur