Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
7f95ed7c
Commit
7f95ed7c
authored
Apr 17, 2019
by
Hans Leidekker
Committed by
Alexandre Julliard
Apr 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Remove system environment variables on uninstall.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6c64d021
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
action.c
dlls/msi/action.c
+1
-1
action.c
dlls/msi/tests/action.c
+12
-2
No files found.
dlls/msi/action.c
View file @
7f95ed7c
...
@@ -7050,7 +7050,7 @@ static UINT env_parse_flags( LPCWSTR *name, LPCWSTR *value, DWORD *flags )
...
@@ -7050,7 +7050,7 @@ static UINT env_parse_flags( LPCWSTR *name, LPCWSTR *value, DWORD *flags )
else
if
(
*
cptr
==
'!'
)
else
if
(
*
cptr
==
'!'
)
*
flags
|=
ENV_ACT_REMOVEMATCH
;
*
flags
|=
ENV_ACT_REMOVEMATCH
;
else
if
(
*
cptr
==
'*'
)
else
if
(
*
cptr
==
'*'
)
*
flags
|=
ENV_MOD_MACHINE
;
*
flags
|=
ENV_MOD_MACHINE
|
ENV_ACT_REMOVE
;
else
else
break
;
break
;
...
...
dlls/msi/tests/action.c
View file @
7f95ed7c
...
@@ -247,7 +247,8 @@ static const char env_environment_dat[] =
...
@@ -247,7 +247,8 @@ static const char env_environment_dat[] =
"Var26
\t
+-MSITESTVAR20
\t
2[~]
\t
One
\n
"
"Var26
\t
+-MSITESTVAR20
\t
2[~]
\t
One
\n
"
"Var27
\t
+-MSITESTVAR21
\t
[~];1
\t
One
\n
"
"Var27
\t
+-MSITESTVAR21
\t
[~];1
\t
One
\n
"
"Var28
\t
-MSITESTVAR22
\t
1
\t
One
\n
"
"Var28
\t
-MSITESTVAR22
\t
1
\t
One
\n
"
"Var29
\t
-MSITESTVAR23
\t
2
\t
One
\n
"
;
"Var29
\t
-MSITESTVAR23
\t
2
\t
One
\n
"
"Var30
\t
*MSITESTVAR100
\t
1
\t
One
\n
"
;
static
const
char
service_install_dat
[]
=
static
const
char
service_install_dat
[]
=
"ServiceInstall
\t
Name
\t
DisplayName
\t
ServiceType
\t
StartType
\t
ErrorControl
\t
"
"ServiceInstall
\t
Name
\t
DisplayName
\t
ServiceType
\t
StartType
\t
ErrorControl
\t
"
...
@@ -4843,7 +4844,7 @@ static void test_envvar(void)
...
@@ -4843,7 +4844,7 @@ static void test_envvar(void)
{
{
char
buffer
[
16
];
char
buffer
[
16
];
UINT
r
,
i
;
UINT
r
,
i
;
HKEY
env
;
HKEY
env
,
env2
;
LONG
res
;
LONG
res
;
if
(
is_process_limited
())
if
(
is_process_limited
())
...
@@ -4857,6 +4858,10 @@ static void test_envvar(void)
...
@@ -4857,6 +4858,10 @@ static void test_envvar(void)
res
=
RegCreateKeyExA
(
HKEY_CURRENT_USER
,
"Environment"
,
0
,
NULL
,
0
,
KEY_ALL_ACCESS
,
NULL
,
&
env
,
NULL
);
res
=
RegCreateKeyExA
(
HKEY_CURRENT_USER
,
"Environment"
,
0
,
NULL
,
0
,
KEY_ALL_ACCESS
,
NULL
,
&
env
,
NULL
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
res
=
RegCreateKeyExA
(
HKEY_LOCAL_MACHINE
,
"System
\\
CurrentControlSet
\\
Control
\\
Session Manager
\\
Environment"
,
0
,
NULL
,
0
,
KEY_ALL_ACCESS
,
NULL
,
&
env2
,
NULL
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
res
=
RegSetValueExA
(
env
,
"MSITESTVAR1"
,
0
,
REG_SZ
,
(
const
BYTE
*
)
"0"
,
2
);
res
=
RegSetValueExA
(
env
,
"MSITESTVAR1"
,
0
,
REG_SZ
,
(
const
BYTE
*
)
"0"
,
2
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
...
@@ -4910,6 +4915,7 @@ static void test_envvar(void)
...
@@ -4910,6 +4915,7 @@ static void test_envvar(void)
CHECK_REG_STR
(
env
,
"MSITESTVAR19"
,
"1"
);
CHECK_REG_STR
(
env
,
"MSITESTVAR19"
,
"1"
);
CHECK_REG_STR
(
env
,
"MSITESTVAR20"
,
"1"
);
CHECK_REG_STR
(
env
,
"MSITESTVAR20"
,
"1"
);
CHECK_REG_STR
(
env
,
"MSITESTVAR21"
,
"1"
);
CHECK_REG_STR
(
env
,
"MSITESTVAR21"
,
"1"
);
CHECK_REG_STR
(
env2
,
"MSITESTVAR100"
,
"1"
);
res
=
RegSetValueExA
(
env
,
"MSITESTVAR22"
,
0
,
REG_SZ
,
(
const
BYTE
*
)
"1"
,
2
);
res
=
RegSetValueExA
(
env
,
"MSITESTVAR22"
,
0
,
REG_SZ
,
(
const
BYTE
*
)
"1"
,
2
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
...
@@ -4937,11 +4943,15 @@ todo_wine {
...
@@ -4937,11 +4943,15 @@ todo_wine {
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"[%d] got %u
\n
"
,
i
,
res
);
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"[%d] got %u
\n
"
,
i
,
res
);
}
}
res
=
RegDeleteValueA
(
env2
,
"MSITESTVAR100"
);
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"Expected ERROR_FILE_NOT_FOUND, got %d
\n
"
,
res
);
error:
error:
RegDeleteValueA
(
env
,
"MSITESTVAR1"
);
RegDeleteValueA
(
env
,
"MSITESTVAR1"
);
RegDeleteValueA
(
env
,
"MSITESTVAR2"
);
RegDeleteValueA
(
env
,
"MSITESTVAR2"
);
RegDeleteValueA
(
env
,
"MSITESTVAR21"
);
RegDeleteValueA
(
env
,
"MSITESTVAR21"
);
RegCloseKey
(
env
);
RegCloseKey
(
env
);
RegCloseKey
(
env2
);
DeleteFileA
(
msifile
);
DeleteFileA
(
msifile
);
}
}
...
...
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