This patch fixes an installer that has "[%PUBLIC]\Documents" entry
for some of the targets being copied from a cabinet file. Under
Windows %PUBLIC% environment variable is set to C:\Users\Public.
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/kernel32/process.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index 4e6ba1118e..280f406627 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -520,6 +520,7 @@ static void set_additional_environment(void)
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;
@@ -560,6 +561,7 @@ static void set_additional_environment(void)
if (p > value && p[-1] != '\\') *p++ = '\\';
strcpyW( p, all_users_dir );
SetEnvironmentVariableW( allusersW, value );
+ SetEnvironmentVariableW( publicW, value );
HeapFree( GetProcessHeap(), 0, value );
}
--
2.17.1