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
7b2604e5
Commit
7b2604e5
authored
Feb 22, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uninstaller: List 32-bit applications on 64-bit platforms.
parent
013e92c9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
17 deletions
+22
-17
main.c
programs/uninstaller/main.c
+22
-17
No files found.
programs/uninstaller/main.c
View file @
7b2604e5
...
...
@@ -174,25 +174,15 @@ static int cmp_by_name(const void *a, const void *b)
*/
static
int
FetchFromRootKey
(
HKEY
root
)
{
HKEY
hkey
Uninst
,
hkey
App
;
HKEY
hkeyApp
;
int
i
;
DWORD
sizeOfSubKeyName
,
displen
,
uninstlen
;
WCHAR
subKeyName
[
256
];
WCHAR
key_app
[
1024
];
WCHAR
*
p
;
if
(
RegOpenKeyExW
(
root
,
PathUninstallW
,
0
,
KEY_READ
,
&
hkeyUninst
)
!=
ERROR_SUCCESS
)
return
0
;
lstrcpyW
(
key_app
,
PathUninstallW
);
lstrcatW
(
key_app
,
BackSlashW
);
p
=
key_app
+
lstrlenW
(
PathUninstallW
)
+
1
;
sizeOfSubKeyName
=
255
;
for
(
i
=
0
;
RegEnumKeyExW
(
hkeyUnins
t
,
i
,
subKeyName
,
&
sizeOfSubKeyName
,
NULL
,
NULL
,
NULL
,
NULL
)
!=
ERROR_NO_MORE_ITEMS
;
++
i
)
for
(
i
=
0
;
RegEnumKeyExW
(
roo
t
,
i
,
subKeyName
,
&
sizeOfSubKeyName
,
NULL
,
NULL
,
NULL
,
NULL
)
!=
ERROR_NO_MORE_ITEMS
;
++
i
)
{
lstrcpyW
(
p
,
subKeyName
);
RegOpenKeyExW
(
root
,
key_app
,
0
,
KEY_READ
,
&
hkeyApp
);
RegOpenKeyExW
(
root
,
subKeyName
,
0
,
KEY_READ
,
&
hkeyApp
);
if
(
!
RegQueryValueExW
(
hkeyApp
,
DisplayNameW
,
NULL
,
NULL
,
NULL
,
&
displen
))
{
DWORD
value
,
type
;
...
...
@@ -232,22 +222,37 @@ static int FetchFromRootKey(HKEY root)
RegCloseKey
(
hkeyApp
);
sizeOfSubKeyName
=
255
;
}
RegCloseKey
(
hkeyUninst
);
return
1
;
}
static
int
FetchUninstallInformation
(
void
)
{
int
rc
;
static
const
BOOL
is_64bit
=
sizeof
(
void
*
)
>
sizeof
(
int
);
int
rc
=
0
;
HKEY
root
;
numentries
=
0
;
oldsel
=
-
1
;
if
(
!
entries
)
entries
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
uninst_entry
));
rc
=
FetchFromRootKey
(
HKEY_LOCAL_MACHINE
);
rc
|=
FetchFromRootKey
(
HKEY_CURRENT_USER
);
if
(
!
RegOpenKeyExW
(
HKEY_LOCAL_MACHINE
,
PathUninstallW
,
0
,
KEY_READ
,
&
root
))
{
rc
|=
FetchFromRootKey
(
root
);
RegCloseKey
(
root
);
}
if
(
is_64bit
&&
!
RegOpenKeyExW
(
HKEY_LOCAL_MACHINE
,
PathUninstallW
,
0
,
KEY_READ
|
KEY_WOW64_32KEY
,
&
root
))
{
rc
|=
FetchFromRootKey
(
root
);
RegCloseKey
(
root
);
}
if
(
!
RegOpenKeyExW
(
HKEY_CURRENT_USER
,
PathUninstallW
,
0
,
KEY_READ
,
&
root
))
{
rc
|=
FetchFromRootKey
(
root
);
RegCloseKey
(
root
);
}
qsort
(
entries
,
numentries
,
sizeof
(
uninst_entry
),
cmp_by_name
);
return
rc
;
...
...
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