Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/kernel32/process.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 1a303c58e1..9ec11796da 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -517,12 +517,14 @@ static void set_additional_environment(void) 'P','r','o','f','i','l','e','L','i','s','t',0}; static const WCHAR profiles_valueW[] = {'P','r','o','f','i','l','e','s','D','i','r','e','c','t','o','r','y',0}; static const WCHAR all_users_valueW[] = {'A','l','l','U','s','e','r','s','P','r','o','f','i','l','e','\0'}; + static const WCHAR public_valueW[] = {'P','u','b','l','i','c',0}; static const WCHAR computernameW[] = {'C','O','M','P','U','T','E','R','N','A','M','E',0}; static const WCHAR allusersW[] = {'A','L','L','U','S','E','R','S','P','R','O','F','I','L','E',0}; static const WCHAR programdataW[] = {'P','r','o','g','r','a','m','D','a','t','a',0}; + static const WCHAR publicW[] = {'P','U','B','L','I','C',0}; OBJECT_ATTRIBUTES attr; UNICODE_STRING nameW; - WCHAR *profile_dir = NULL, *all_users_dir = NULL, *program_data_dir = NULL; + WCHAR *profile_dir = NULL, *all_users_dir = NULL, *program_data_dir = NULL, *public_dir = NULL; WCHAR buf[MAX_COMPUTERNAME_LENGTH+1]; HANDLE hkey; DWORD len; @@ -546,6 +548,7 @@ static void set_additional_environment(void) profile_dir = get_reg_value( hkey, profiles_valueW ); all_users_dir = get_reg_value( hkey, all_users_valueW ); program_data_dir = get_reg_value( hkey, programdataW ); + public_dir = get_reg_value( hkey, public_valueW ); NtClose( hkey ); }
@@ -568,9 +571,15 @@ static void set_additional_environment(void) SetEnvironmentVariableW( programdataW, program_data_dir ); }
+ if (public_dir) + { + SetEnvironmentVariableW( publicW, public_dir ); + } + HeapFree( GetProcessHeap(), 0, all_users_dir ); HeapFree( GetProcessHeap(), 0, profile_dir ); HeapFree( GetProcessHeap(), 0, program_data_dir ); + HeapFree( GetProcessHeap(), 0, public_dir ); }
/***********************************************************************