Author: cfinck
Date: Sun Apr 19 18:41:41 2009
New Revision: 40588
URL:
http://svn.reactos.org/svn/reactos?rev=40588&view=rev
Log:
- Revert r40581, this hack doesn't work anymore
- Add a similar hack to CreateEnvironmentBlock, APPDATA is set properly now
Modified:
branches/ros-branch-0_3_9/reactos/base/system/winlogon/sas.c
branches/ros-branch-0_3_9/reactos/base/system/winlogon/winlogon.h
branches/ros-branch-0_3_9/reactos/base/system/winlogon/winlogon.rbuild
branches/ros-branch-0_3_9/reactos/dll/win32/userenv/environment.c
Modified: branches/ros-branch-0_3_9/reactos/base/system/winlogon/sas.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_9/reactos/base/s…
==============================================================================
--- branches/ros-branch-0_3_9/reactos/base/system/winlogon/sas.c [iso-8859-1] (original)
+++ branches/ros-branch-0_3_9/reactos/base/system/winlogon/sas.c [iso-8859-1] Sun Apr 19
18:41:41 2009
@@ -175,9 +175,6 @@
SIZE_T EnvBlockSize = 0, ProfileSize = 0;
BOOLEAN Old;
BOOL ret = FALSE;
- UNICODE_STRING VariableName;
- UNICODE_STRING VariableValue;
- WCHAR AppDataPath[MAX_PATH];
/* Loading personal settings */
DisplayStatusMessage(Session, Session->WinlogonDesktop,
IDS_LOADINGYOURPERSONALSETTINGS);
@@ -221,18 +218,6 @@
WARN("WL: CreateEnvironmentBlock() failed\n");
goto cleanup;
}
-
- /* Use SHGetFolderPathW for getting the AppData path */
- if(SHGetFolderPathW(NULL, CSIDL_APPDATA, Session->UserToken, SHGFP_TYPE_CURRENT,
AppDataPath) == E_FAIL)
- {
- WARN("WL: SHGetFolderPathW() failed\n");
- goto cleanup;
- }
-
- /* Some environment variables need to be set by winlogon (verified against Windows XP
winlogon) */
- RtlInitUnicodeString(&VariableName, L"APPDATA");
- RtlInitUnicodeString(&VariableValue, AppDataPath);
- RtlSetEnvironmentVariable((PWSTR*)&lpEnvironment, &VariableName,
&VariableValue);
if (Session->Profile->dwType == WLX_PROFILE_TYPE_V2_0 &&
Session->Profile->pszEnvironment)
{
@@ -278,8 +263,6 @@
DisplayStatusMessage(Session, Session->WinlogonDesktop,
IDS_APPLYINGYOURPERSONALSETTINGS);
UpdatePerUserSystemParameters(0, TRUE);
-
- /* FIXME: Set the "Volatile Environment" key for the new user */
/* Set default language */
if (!SetDefaultLanguage(TRUE))
Modified: branches/ros-branch-0_3_9/reactos/base/system/winlogon/winlogon.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_9/reactos/base/s…
==============================================================================
--- branches/ros-branch-0_3_9/reactos/base/system/winlogon/winlogon.h [iso-8859-1]
(original)
+++ branches/ros-branch-0_3_9/reactos/base/system/winlogon/winlogon.h [iso-8859-1] Sun Apr
19 18:41:41 2009
@@ -39,7 +39,6 @@
#include <ntsecapi.h>
#include <accctrl.h>
#include <aclapi.h>
-#include <shlobj.h>
#include <reactos/winlogon.h>
Modified: branches/ros-branch-0_3_9/reactos/base/system/winlogon/winlogon.rbuild
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_9/reactos/base/s…
==============================================================================
--- branches/ros-branch-0_3_9/reactos/base/system/winlogon/winlogon.rbuild [iso-8859-1]
(original)
+++ branches/ros-branch-0_3_9/reactos/base/system/winlogon/winlogon.rbuild [iso-8859-1]
Sun Apr 19 18:41:41 2009
@@ -9,7 +9,6 @@
<library>advapi32</library>
<library>userenv</library>
<library>secur32</library>
- <library>shell32</library>
<file>sas.c</file>
<file>screensaver.c</file>
<file>setup.c</file>
Modified: branches/ros-branch-0_3_9/reactos/dll/win32/userenv/environment.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_9/reactos/dll/wi…
==============================================================================
--- branches/ros-branch-0_3_9/reactos/dll/win32/userenv/environment.c [iso-8859-1]
(original)
+++ branches/ros-branch-0_3_9/reactos/dll/win32/userenv/environment.c [iso-8859-1] Sun Apr
19 18:41:41 2009
@@ -379,6 +379,9 @@
L"USERPROFILE",
Buffer,
FALSE);
+
+ wcscat(Buffer, L"\\Application Data");
+ SetUserEnvironmentVariable(lpEnvironment, L"APPDATA", Buffer, FALSE);
}
/* FIXME: Set 'USERDOMAIN' variable */