Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
e8ef521c
Commit
e8ef521c
authored
Aug 16, 2017
by
Vincent Povirk
Committed by
Alexandre Julliard
Aug 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Set the ProgramData environment variable.
Signed-off-by:
Vincent Povirk
<
vincent@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
dcb1359b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
process.c
dlls/kernel32/process.c
+9
-1
No files found.
dlls/kernel32/process.c
View file @
e8ef521c
...
...
@@ -517,9 +517,10 @@ static void set_additional_environment(void)
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
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
};
OBJECT_ATTRIBUTES
attr
;
UNICODE_STRING
nameW
;
WCHAR
*
profile_dir
=
NULL
,
*
all_users_dir
=
NULL
;
WCHAR
*
profile_dir
=
NULL
,
*
all_users_dir
=
NULL
,
*
program_data_dir
=
NULL
;
WCHAR
buf
[
MAX_COMPUTERNAME_LENGTH
+
1
];
HANDLE
hkey
;
DWORD
len
;
...
...
@@ -542,6 +543,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
);
NtClose
(
hkey
);
}
...
...
@@ -559,8 +561,14 @@ static void set_additional_environment(void)
HeapFree
(
GetProcessHeap
(),
0
,
value
);
}
if
(
program_data_dir
)
{
SetEnvironmentVariableW
(
programdataW
,
program_data_dir
);
}
HeapFree
(
GetProcessHeap
(),
0
,
all_users_dir
);
HeapFree
(
GetProcessHeap
(),
0
,
profile_dir
);
HeapFree
(
GetProcessHeap
(),
0
,
program_data_dir
);
}
/***********************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment