Alexandre Julliard : ntdll: Predefine the SystemRoot and SystemDrive variables.

Alexandre Julliard julliard at winehq.org
Thu Mar 4 15:53:36 CST 2021


Module: wine
Branch: master
Commit: 9443a7397df534383aeb37abdb62be266a33339b
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=9443a7397df534383aeb37abdb62be266a33339b

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Mar  4 10:56:54 2021 +0100

ntdll: Predefine the SystemRoot and SystemDrive variables.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/unix/env.c |  2 ++
 loader/wine.inf.in    | 12 +++++-------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c
index 97a43a90000..7836cd1144d 100644
--- a/dlls/ntdll/unix/env.c
+++ b/dlls/ntdll/unix/env.c
@@ -1239,6 +1239,8 @@ static void add_dynamic_environment( WCHAR **env, SIZE_T *pos, SIZE_T *size )
     append_envA( env, pos, size, "WINELOCALE", system_locale );
     append_envA( env, pos, size, "WINEUSERLOCALE",
                  strcmp( user_locale, system_locale ) ? user_locale : NULL );
+    append_envA( env, pos, size, "SystemDrive", "C:" );
+    append_envA( env, pos, size, "SystemRoot", "C:\\windows" );
 }
 
 
diff --git a/loader/wine.inf.in b/loader/wine.inf.in
index d5dd2d5b66b..627d98a9e66 100644
--- a/loader/wine.inf.in
+++ b/loader/wine.inf.in
@@ -639,14 +639,12 @@ HKLM,%Control%\Session Manager,HeapDeCommitFreeBlockThreshold,0x00040002,0
 HKLM,%Control%\Session Manager,HeapDeCommitTotalFreeThreshold,0x00040002,0
 HKLM,%Control%\Session Manager,HeapSegmentCommit,0x00040002,0
 HKLM,%Control%\Session Manager,HeapSegmentReserve,0x00040002,0
-HKLM,%Control%\Session Manager\Environment,"ComSpec",0x00020000,"%11%\cmd.exe"
-HKLM,%Control%\Session Manager\Environment,"PATH",0x00020002,"%11%;%10%;%11%\wbem;%11%\WindowsPowershell\v1.0"
+HKLM,%Control%\Session Manager\Environment,"ComSpec",0x00020000,"%SystemRoot%\system32\cmd.exe"
+HKLM,%Control%\Session Manager\Environment,"PATH",0x00020002,"%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\wbem;%SystemRoot%\system32\WindowsPowershell\v1.0"
 HKLM,%Control%\Session Manager\Environment,"PATHEXT",,".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH"
-HKLM,%Control%\Session Manager\Environment,"SystemDrive",2,"c:"
-HKLM,%Control%\Session Manager\Environment,"SYSTEMROOT",,"%10%"
-HKLM,%Control%\Session Manager\Environment,"TEMP",0x00020002,"%10%\temp"
-HKLM,%Control%\Session Manager\Environment,"TMP",0x00020002,"%10%\temp"
-HKLM,%Control%\Session Manager\Environment,"windir",0x00020000,"%10%"
+HKLM,%Control%\Session Manager\Environment,"TEMP",0x00020002,"%SystemRoot%\temp"
+HKLM,%Control%\Session Manager\Environment,"TMP",0x00020002,"%SystemRoot%\temp"
+HKLM,%Control%\Session Manager\Environment,"windir",0x00020000,"%SystemRoot%"
 HKLM,%Control%\Session Manager\Environment,"winsysdir",,"%11%"
 HKLM,%Control%\Session Manager\Memory Management,PagingFiles,,"%24%\pagefile.sys 27 77"
 HKLM,%Control%\Session Manager\Memory Management,WriteWatch,0x00040002,1




More information about the wine-cvs mailing list