Author: janderwald
Date: Sat Jul 28 20:29:33 2007
New Revision: 27951
URL:
http://svn.reactos.org/svn/reactos?rev=27951&view=rev
Log:
- set USERNAME environment variable
See issue #2487 for more details.
Modified:
trunk/reactos/dll/win32/userenv/environment.c
Modified: trunk/reactos/dll/win32/userenv/environment.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/userenv/environm…
==============================================================================
--- trunk/reactos/dll/win32/userenv/environment.c (original)
+++ trunk/reactos/dll/win32/userenv/environment.c Sat Jul 28 20:29:33 2007
@@ -383,7 +383,17 @@
/* FIXME: Set 'USERDOMAIN' variable */
- /* FIXME: Set 'USERNAME' variable */
+ Length = MAX_PATH;
+ if (GetUserNameW(Buffer,
+ &Length))
+ {
+ SetUserEnvironmentVariable(lpEnvironment,
+ L"USERNAME",
+ Buffer,
+ FALSE);
+ }
+
+
/* Set user environment variables */
SetUserEnvironment (lpEnvironment,