Added 'Path' and 'windir' system environment variables
authorEric Kohl <eric.kohl@reactos.org>
Sun, 27 Feb 2000 15:47:17 +0000 (15:47 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Sun, 27 Feb 2000 15:47:17 +0000 (15:47 +0000)
svn path=/trunk/; revision=1019

reactos/subsys/smss/init.c
reactos/subsys/smss/smss.c

index e1c768c..91f3abc 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: init.c,v 1.14 2000/02/25 23:58:57 ekohl Exp $
+/* $Id: init.c,v 1.15 2000/02/27 15:47:17 ekohl Exp $
  *
  * init.c - Session Manager initialization
  * 
@@ -72,6 +72,9 @@ SmSetEnvironmentVariables (VOID)
 {
        UNICODE_STRING EnvVariable;
        UNICODE_STRING EnvValue;
+       UNICODE_STRING EnvExpandedValue;
+       ULONG ExpandedLength;
+       WCHAR ExpandBuffer[512];
 
        /*
         * The following environment variables are read from the registry.
@@ -114,6 +117,41 @@ SmSetEnvironmentVariables (VOID)
        RtlSetEnvironmentVariable (&SmSystemEnvironment,
                                   &EnvVariable,
                                   &EnvValue);
+
+
+       /* Set "Path = %SystemRoot%\system32;%SystemRoot%" */
+       RtlInitUnicodeString (&EnvVariable,
+                             L"Path");
+       RtlInitUnicodeString (&EnvValue,
+                             L"%SystemRoot%\\system32;%SystemRoot%");
+       EnvExpandedValue.Length = 0;
+       EnvExpandedValue.MaximumLength = 512 * sizeof(WCHAR);
+       EnvExpandedValue.Buffer = ExpandBuffer;
+       *ExpandBuffer = 0;
+       RtlExpandEnvironmentStrings_U (SmSystemEnvironment,
+                                      &EnvValue,
+                                      &EnvExpandedValue,
+                                      &ExpandedLength);
+       RtlSetEnvironmentVariable (&SmSystemEnvironment,
+                                  &EnvVariable,
+                                  &EnvExpandedValue);
+
+       /* Set "windir = %SystemRoot%" */
+       RtlInitUnicodeString (&EnvVariable,
+                             L"windir");
+       RtlInitUnicodeString (&EnvValue,
+                             L"%SystemRoot%");
+       EnvExpandedValue.Length = 0;
+       EnvExpandedValue.MaximumLength = 512 * sizeof(WCHAR);
+       EnvExpandedValue.Buffer = ExpandBuffer;
+       *ExpandBuffer = 0;
+       RtlExpandEnvironmentStrings_U (SmSystemEnvironment,
+                                      &EnvValue,
+                                      &EnvExpandedValue,
+                                      &ExpandedLength);
+       RtlSetEnvironmentVariable (&SmSystemEnvironment,
+                                  &EnvVariable,
+                                  &EnvExpandedValue);
 }
 
 
index 0ba2c94..bbd3eac 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: smss.c,v 1.6 2000/02/14 14:13:34 dwelch Exp $
+/* $Id: smss.c,v 1.7 2000/02/27 15:47:17 ekohl Exp $
  *
  * smss.c - Session Manager
  * 
@@ -69,10 +69,8 @@ PrintString (char* fmt,...)
 void NtProcessStartup (PPEB Peb)
 {
    HANDLE Children[2]; /* csrss, winlogon */
-       
-   DisplayString( L"Session Manager\n" );
 
-   PrintString ("Peb %x\n", Peb);
+   DisplayString( L"Session Manager\n" );
 
    if (TRUE == InitSessionManager(Children))
      {