Tony said:
I don't doubt you for a second, but how does one change the username
environment variable?
======================================
C:\>set username
USERNAME=kep
C:\>set username=NoneOfYourBusiness!
C:\>set username
USERNAME=NoneOfYourBusiness!
======================================
Of course, that only affects the current process.
I thought it always picked up the same as
GetCurrentUser - what is the point of it otherwise?
Like many conveniences, that's all it is.
I guess your question is similar to, "if you can die in a car with airbags,
what's the point of them anyway?" Maybe it's good, maybe not. Depends on
the crash.
In this case, you *can* take the uncertainty out of it, though. Or at least
lots more of it. (You familiar with OS support for impersonating users?
<g>)