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
3de8370a
Commit
3de8370a
authored
May 30, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
May 30, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uninstaller: Don't list system components.
parent
9432d65b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
main.c
programs/uninstaller/main.c
+12
-4
No files found.
programs/uninstaller/main.c
View file @
3de8370a
...
...
@@ -60,7 +60,7 @@ static const WCHAR PathUninstallW[] = {
'U'
,
'n'
,
'i'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
0
};
static
const
WCHAR
UninstallCommandlineW
[]
=
{
'U'
,
'n'
,
'i'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'S'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
0
};
static
const
WCHAR
WindowsInstallerW
[]
=
{
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
SystemComponentW
[]
=
{
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'C'
,
'o'
,
'm'
,
'p'
,
'o'
,
'n'
,
'e'
,
'n'
,
't'
,
0
};
/**
* Used to output program list when used with --list
...
...
@@ -176,19 +176,27 @@ static int FetchFromRootKey(HKEY root)
{
HKEY
hkeyApp
;
int
i
;
DWORD
sizeOfSubKeyName
,
displen
,
uninstlen
;
DWORD
sizeOfSubKeyName
,
displen
,
uninstlen
,
value
,
type
,
size
;
WCHAR
subKeyName
[
256
];
sizeOfSubKeyName
=
255
;
for
(
i
=
0
;
RegEnumKeyExW
(
root
,
i
,
subKeyName
,
&
sizeOfSubKeyName
,
NULL
,
NULL
,
NULL
,
NULL
)
!=
ERROR_NO_MORE_ITEMS
;
++
i
)
{
RegOpenKeyExW
(
root
,
subKeyName
,
0
,
KEY_READ
,
&
hkeyApp
);
if
(
!
RegQueryValueExW
(
hkeyApp
,
SystemComponentW
,
NULL
,
&
type
,
(
LPBYTE
)
&
value
,
&
size
)
&&
type
==
REG_DWORD
&&
value
==
1
)
{
RegCloseKey
(
hkeyApp
);
sizeOfSubKeyName
=
255
;
continue
;
}
if
(
!
RegQueryValueExW
(
hkeyApp
,
DisplayNameW
,
NULL
,
NULL
,
NULL
,
&
displen
))
{
DWORD
value
,
type
;
WCHAR
*
command
;
if
(
!
RegQueryValueExW
(
hkeyApp
,
WindowsInstallerW
,
NULL
,
&
type
,
NULL
,
&
value
)
&&
type
==
REG_DWORD
&&
value
==
1
)
size
=
sizeof
(
value
);
if
(
!
RegQueryValueExW
(
hkeyApp
,
WindowsInstallerW
,
NULL
,
&
type
,
(
LPBYTE
)
&
value
,
&
size
)
&&
type
==
REG_DWORD
&&
value
==
1
)
{
static
const
WCHAR
fmtW
[]
=
{
'm'
,
's'
,
'i'
,
'e'
,
'x'
,
'e'
,
'c'
,
' '
,
'/'
,
'x'
,
'%'
,
's'
,
0
};
command
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
fmtW
)
+
lstrlenW
(
subKeyName
))
*
sizeof
(
WCHAR
));
...
...
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