
Getting user name during NT logon
I am trying to write a VB 5.0 program to function as a logon script.
The program runs fine if I run it after I am logged in but fails if I
make it my logon script.
The point at which it fails is getting the user name. If I use the
WNetGetUserName function, then the user name is returned as an empty
string.
If I use the GetUserName function, the program GPF's at that point.
Anyone have any idea how to get the user name while running as a logon
script. It must be possible because the KixStart program does it.
Thanks.