Re: Win32Lib getUserName() problem
- Posted by AndyDrummond Dec 16, 2009
- 1257 views
AndyDrummond said...
jimcbrown said...
Eh? How's he changing his name?
Does %USERNAME% or %USER% get updated after the change? If so, you can just use getenv() rather than trying to find a W32API function to detect this.
I'll try that - he changes his name by going into Control Panel - User Accounts - Change Account ....
Certainly getenv("USERNAME") would be simpler and I'd know what is going on. Why didn't I think of that? Thanks.
Nope - the name entered by control panel appears nowhere in the environment. I shall now try getUserNameEx ....