Zebediah Figura : ntdll: Set the ProgramFiles(x86) and CommonProgramFiles(x86) environment variables.
Alexandre Julliard
julliard at winehq.org
Wed Nov 6 16:54:28 CST 2019
Module: wine
Branch: master
Commit: 87307de2173ee813daca9bd93ec750f17d3eda94
URL: https://source.winehq.org/git/wine.git/?a=commit;h=87307de2173ee813daca9bd93ec750f17d3eda94
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Tue Nov 5 21:48:59 2019 -0600
ntdll: Set the ProgramFiles(x86) and CommonProgramFiles(x86) environment variables.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40950
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/env.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/env.c b/dlls/ntdll/env.c
index 87ab9bef62..03c0a20624 100644
--- a/dlls/ntdll/env.c
+++ b/dlls/ntdll/env.c
@@ -367,10 +367,12 @@ static void set_wow64_environment( WCHAR **env )
static const WCHAR progdirW[] = {'P','r','o','g','r','a','m','F','i','l','e','s','D','i','r',0};
static const WCHAR progdir86W[] = {'P','r','o','g','r','a','m','F','i','l','e','s','D','i','r',' ','(','x','8','6',')',0};
static const WCHAR progfilesW[] = {'P','r','o','g','r','a','m','F','i','l','e','s',0};
+ static const WCHAR progfiles86W[] = {'P','r','o','g','r','a','m','F','i','l','e','s','(','x','8','6',')',0};
static const WCHAR progw6432W[] = {'P','r','o','g','r','a','m','W','6','4','3','2',0};
static const WCHAR commondirW[] = {'C','o','m','m','o','n','F','i','l','e','s','D','i','r',0};
static const WCHAR commondir86W[] = {'C','o','m','m','o','n','F','i','l','e','s','D','i','r',' ','(','x','8','6',')',0};
static const WCHAR commonfilesW[] = {'C','o','m','m','o','n','P','r','o','g','r','a','m','F','i','l','e','s',0};
+ static const WCHAR commonfiles86W[] = {'C','o','m','m','o','n','P','r','o','g','r','a','m','F','i','l','e','s','(','8','6',')',0};
static const WCHAR commonw6432W[] = {'C','o','m','m','o','n','P','r','o','g','r','a','m','W','6','4','3','2',0};
static const WCHAR winedlldirW[] = {'W','I','N','E','D','L','L','D','I','R','%','u',0};
static const WCHAR winehomedirW[] = {'W','I','N','E','H','O','M','E','D','I','R',0};
@@ -435,9 +437,10 @@ static void set_wow64_environment( WCHAR **env )
if (is_win64 || !is_wow64) set_env_var( env, progfilesW, val );
RtlFreeHeap( GetProcessHeap(), 0, val );
}
- if (is_wow64 && (val = get_registry_value( *env, hkey, progdir86W )))
+ if ((val = get_registry_value( *env, hkey, progdir86W )))
{
- set_env_var( env, progfilesW, val );
+ if (is_win64 || is_wow64) set_env_var( env, progfiles86W, val );
+ if (is_wow64) set_env_var( env, progfilesW, val );
RtlFreeHeap( GetProcessHeap(), 0, val );
}
@@ -449,9 +452,10 @@ static void set_wow64_environment( WCHAR **env )
if (is_win64 || !is_wow64) set_env_var( env, commonfilesW, val );
RtlFreeHeap( GetProcessHeap(), 0, val );
}
- if (is_wow64 && (val = get_registry_value( *env, hkey, commondir86W )))
+ if ((val = get_registry_value( *env, hkey, commondir86W )))
{
- set_env_var( env, commonfilesW, val );
+ if (is_win64 || is_wow64) set_env_var( env, commonfiles86W, val );
+ if (is_wow64) set_env_var( env, commonfilesW, val );
RtlFreeHeap( GetProcessHeap(), 0, val );
}
NtClose( hkey );
More information about the wine-cvs
mailing list