Hi there,

In the times of hiring and quitting of people we renamed a couple login names on some XP boxes instead of creating new accounts.

Problem now is the following:

I created a Name called "Rick" as a login name and when Rick quit I renamed the account name as "Jordan". So that Jordan could use all of Rick's files and settings.

Now, when I make a call to GetUserName I still get as result "Rick". So, I've tried and searched a lot but I haven't found an answer remotly close on how to get the currently Logged in user for sure.

I saw somewhere someone mentioning WtsQuerySessionInformation and it looks good - but it's XP and 2000 only. :( so I didn't try it yet.

Anyone knows any better?
Posted on 2005-04-12 08:57:22 by JimmyClif