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
9d71238a
Commit
9d71238a
authored
Nov 05, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Nov 05, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Fix the location used to write the user's environment variables.
parent
2df06218
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
action.c
dlls/msi/action.c
+15
-3
No files found.
dlls/msi/action.c
View file @
9d71238a
...
...
@@ -4850,9 +4850,12 @@ static UINT ITERATE_WriteEnvironmentString( MSIRECORD *rec, LPVOID param )
LPWSTR
deformatted
=
NULL
,
ptr
;
DWORD
flags
,
type
,
size
;
LONG
res
;
HKEY
env
=
NULL
,
root
=
HKEY_CURRENT_USER
;
HKEY
env
=
NULL
,
root
;
LPCWSTR
environment
;
static
const
WCHAR
environment
[]
=
static
const
WCHAR
user_env
[]
=
{
'E'
,
'n'
,
'v'
,
'i'
,
'r'
,
'o'
,
'n'
,
'm'
,
'e'
,
'n'
,
't'
,
0
};
static
const
WCHAR
machine_env
[]
=
{
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'S'
,
'e'
,
't'
,
'\\'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'\\'
,
...
...
@@ -4878,9 +4881,18 @@ static UINT ITERATE_WriteEnvironmentString( MSIRECORD *rec, LPVOID param )
value
=
deformatted
;
if
(
flags
&
ENV_MOD_MACHINE
)
{
environment
=
machine_env
;
root
=
HKEY_LOCAL_MACHINE
;
}
else
{
environment
=
user_env
;
root
=
HKEY_CURRENT_USER
;
}
res
=
RegOpenKeyExW
(
root
,
environment
,
0
,
KEY_ALL_ACCESS
,
&
env
);
res
=
RegCreateKeyExW
(
root
,
environment
,
0
,
NULL
,
0
,
KEY_ALL_ACCESS
,
NULL
,
&
env
,
NULL
);
if
(
res
!=
ERROR_SUCCESS
)
goto
done
;
...
...
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