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
2f541542
Commit
2f541542
authored
Jul 14, 2009
by
Owen Rudge
Committed by
Alexandre Julliard
Jul 15, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
appwiz.cpl: Read modification path from registry.
parent
051e85d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
appwiz.c
dlls/appwiz.cpl/appwiz.c
+33
-0
No files found.
dlls/appwiz.cpl/appwiz.c
View file @
2f541542
...
...
@@ -56,6 +56,7 @@ typedef struct APPINFO {
LPWSTR
title
;
LPWSTR
path
;
LPWSTR
path_modify
;
LPWSTR
icon
;
int
iconIdx
;
...
...
@@ -85,6 +86,8 @@ static const WCHAR ContactW[] = {'C','o','n','t','a','c','t',0};
static
const
WCHAR
HelpLinkW
[]
=
{
'H'
,
'e'
,
'l'
,
'p'
,
'L'
,
'i'
,
'n'
,
'k'
,
0
};
static
const
WCHAR
HelpTelephoneW
[]
=
{
'H'
,
'e'
,
'l'
,
'p'
,
'T'
,
'e'
,
'l'
,
'e'
,
'p'
,
'h'
,
'o'
,
'n'
,
'e'
,
0
};
static
const
WCHAR
ModifyPathW
[]
=
{
'M'
,
'o'
,
'd'
,
'i'
,
'f'
,
'y'
,
'P'
,
'a'
,
't'
,
'h'
,
0
};
static
const
WCHAR
NoModifyW
[]
=
{
'N'
,
'o'
,
'M'
,
'o'
,
'd'
,
'i'
,
'f'
,
'y'
,
0
};
static
const
WCHAR
ReadmeW
[]
=
{
'R'
,
'e'
,
'a'
,
'd'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
URLUpdateInfoW
[]
=
{
'U'
,
'R'
,
'L'
,
'U'
,
'p'
,
'd'
,
'a'
,
't'
,
'e'
,
'I'
,
'n'
,
'f'
,
'o'
,
0
};
...
...
@@ -129,6 +132,7 @@ static void FreeAppInfo(APPINFO *info)
HeapFree
(
GetProcessHeap
(),
0
,
info
->
title
);
HeapFree
(
GetProcessHeap
(),
0
,
info
->
path
);
HeapFree
(
GetProcessHeap
(),
0
,
info
->
path_modify
);
HeapFree
(
GetProcessHeap
(),
0
,
info
->
icon
);
HeapFree
(
GetProcessHeap
(),
0
,
info
->
publisher
);
HeapFree
(
GetProcessHeap
(),
0
,
info
->
version
);
...
...
@@ -149,6 +153,7 @@ static BOOL ReadApplicationsFromRegistry(HKEY root)
HKEY
hkeyUninst
,
hkeyApp
;
int
i
,
id
=
0
;
DWORD
sizeOfSubKeyName
,
displen
,
uninstlen
;
DWORD
dwNoModify
,
dwType
;
WCHAR
subKeyName
[
256
];
WCHAR
key_app
[
MAX_STRING_LEN
];
WCHAR
*
p
;
...
...
@@ -273,6 +278,34 @@ static BOOL ReadApplicationsFromRegistry(HKEY root)
&
displen
);
}
/* Check if NoModify is set */
dwType
=
REG_DWORD
;
dwNoModify
=
0
;
displen
=
sizeof
(
DWORD
);
if
(
RegQueryValueExW
(
hkeyApp
,
NoModifyW
,
NULL
,
&
dwType
,
(
LPBYTE
)
&
dwNoModify
,
&
displen
)
!=
ERROR_SUCCESS
)
{
dwNoModify
=
0
;
}
/* Some installers incorrectly create a REG_SZ instead of a REG_DWORD - check for
ASCII 49, which equals 1 */
if
(
dwType
==
REG_SZ
)
dwNoModify
=
(
dwNoModify
==
49
)
?
1
:
0
;
/* Fetch the modify path */
if
((
dwNoModify
==
0
)
&&
(
RegQueryValueExW
(
hkeyApp
,
ModifyPathW
,
0
,
0
,
NULL
,
&
displen
)
==
ERROR_SUCCESS
))
{
iter
->
path_modify
=
HeapAlloc
(
GetProcessHeap
(),
0
,
displen
);
if
(
!
iter
->
path_modify
)
goto
err
;
RegQueryValueExW
(
hkeyApp
,
ModifyPathW
,
0
,
0
,
(
LPBYTE
)
iter
->
path_modify
,
&
displen
);
}
/* registry key */
iter
->
regroot
=
root
;
lstrcpyW
(
iter
->
regkey
,
subKeyName
);
...
...
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