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
271d7b6a
Commit
271d7b6a
authored
Dec 24, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
Dec 24, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
appwiz.cpl: Run msiexec if the WindowsInstaller value is set.
parent
458fcf4a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
19 deletions
+38
-19
appwiz.c
dlls/appwiz.cpl/appwiz.c
+38
-19
No files found.
dlls/appwiz.cpl/appwiz.c
View file @
271d7b6a
...
@@ -98,6 +98,7 @@ static const WCHAR URLUpdateInfoW[] = {'U','R','L','U','p','d','a','t','e','I',
...
@@ -98,6 +98,7 @@ static const WCHAR URLUpdateInfoW[] = {'U','R','L','U','p','d','a','t','e','I',
static
const
WCHAR
CommentsW
[]
=
{
'C'
,
'o'
,
'm'
,
'm'
,
'e'
,
'n'
,
't'
,
's'
,
0
};
static
const
WCHAR
CommentsW
[]
=
{
'C'
,
'o'
,
'm'
,
'm'
,
'e'
,
'n'
,
't'
,
's'
,
0
};
static
const
WCHAR
UninstallCommandlineW
[]
=
{
'U'
,
'n'
,
'i'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
static
const
WCHAR
UninstallCommandlineW
[]
=
{
'U'
,
'n'
,
'i'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'S'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
0
};
'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
PathUninstallW
[]
=
{
static
const
WCHAR
PathUninstallW
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
...
@@ -157,10 +158,10 @@ static BOOL ReadApplicationsFromRegistry(HKEY root)
...
@@ -157,10 +158,10 @@ static BOOL ReadApplicationsFromRegistry(HKEY root)
HKEY
hkeyUninst
,
hkeyApp
;
HKEY
hkeyUninst
,
hkeyApp
;
int
i
,
id
=
0
;
int
i
,
id
=
0
;
DWORD
sizeOfSubKeyName
,
displen
,
uninstlen
;
DWORD
sizeOfSubKeyName
,
displen
,
uninstlen
;
DWORD
dwNoModify
,
dwType
;
DWORD
dwNoModify
,
dwType
,
value
;
WCHAR
subKeyName
[
256
];
WCHAR
subKeyName
[
256
];
WCHAR
key_app
[
MAX_STRING_LEN
];
WCHAR
key_app
[
MAX_STRING_LEN
];
WCHAR
*
p
;
WCHAR
*
p
,
*
command
;
APPINFO
*
iter
=
AppInfo
;
APPINFO
*
iter
=
AppInfo
;
LPWSTR
iconPtr
;
LPWSTR
iconPtr
;
BOOL
ret
=
FALSE
;
BOOL
ret
=
FALSE
;
...
@@ -189,11 +190,29 @@ static BOOL ReadApplicationsFromRegistry(HKEY root)
...
@@ -189,11 +190,29 @@ static BOOL ReadApplicationsFromRegistry(HKEY root)
displen
=
0
;
displen
=
0
;
uninstlen
=
0
;
uninstlen
=
0
;
if
(
!
RegQueryValueExW
(
hkeyApp
,
DisplayNameW
,
0
,
0
,
NULL
,
&
displen
))
{
if
(
!
RegQueryValueExW
(
hkeyApp
,
WindowsInstallerW
,
NULL
,
&
dwType
,
NULL
,
&
value
)
&&
dwType
==
REG_DWORD
&&
value
==
1
)
{
static
const
WCHAR
fmtW
[]
=
{
'm'
,
's'
,
'i'
,
'e'
,
'x'
,
'e'
,
'c'
,
' '
,
'/'
,
'x'
,
'%'
,
's'
,
0
};
int
len
=
lstrlenW
(
fmtW
)
+
lstrlenW
(
subKeyName
);
if
((
RegQueryValueExW
(
hkeyApp
,
DisplayNameW
,
0
,
0
,
NULL
,
&
displen
)
==
if
(
!
(
command
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
))))
goto
err
;
ERROR_SUCCESS
)
&&
(
RegQueryValueExW
(
hkeyApp
,
UninstallCommandlineW
,
wsprintfW
(
command
,
fmtW
,
subKeyName
);
0
,
0
,
NULL
,
&
uninstlen
)
==
ERROR_SUCCESS
))
}
else
if
(
!
RegQueryValueExW
(
hkeyApp
,
UninstallCommandlineW
,
0
,
0
,
NULL
,
&
uninstlen
))
{
if
(
!
(
command
=
HeapAlloc
(
GetProcessHeap
(),
0
,
uninstlen
)))
goto
err
;
RegQueryValueExW
(
hkeyApp
,
UninstallCommandlineW
,
0
,
0
,
(
LPBYTE
)
command
,
&
uninstlen
);
}
else
{
{
RegCloseKey
(
hkeyApp
);
sizeOfSubKeyName
=
sizeof
(
subKeyName
)
/
sizeof
(
subKeyName
[
0
]);
continue
;
}
/* if we already have iter, allocate the next entry */
/* if we already have iter, allocate the next entry */
if
(
iter
)
if
(
iter
)
{
{
...
@@ -249,14 +268,6 @@ static BOOL ReadApplicationsFromRegistry(HKEY root)
...
@@ -249,14 +268,6 @@ static BOOL ReadApplicationsFromRegistry(HKEY root)
}
}
}
}
iter
->
path
=
HeapAlloc
(
GetProcessHeap
(),
0
,
uninstlen
);
if
(
!
iter
->
path
)
goto
err
;
RegQueryValueExW
(
hkeyApp
,
UninstallCommandlineW
,
0
,
0
,
(
LPBYTE
)
iter
->
path
,
&
uninstlen
);
/* publisher, version */
/* publisher, version */
if
(
RegQueryValueExW
(
hkeyApp
,
PublisherW
,
0
,
0
,
NULL
,
&
displen
)
==
if
(
RegQueryValueExW
(
hkeyApp
,
PublisherW
,
0
,
0
,
NULL
,
&
displen
)
==
ERROR_SUCCESS
)
ERROR_SUCCESS
)
...
@@ -299,20 +310,28 @@ static BOOL ReadApplicationsFromRegistry(HKEY root)
...
@@ -299,20 +310,28 @@ static BOOL ReadApplicationsFromRegistry(HKEY root)
dwNoModify
=
(
dwNoModify
==
49
)
?
1
:
0
;
dwNoModify
=
(
dwNoModify
==
49
)
?
1
:
0
;
/* Fetch the modify path */
/* Fetch the modify path */
if
((
dwNoModify
==
0
)
&&
(
RegQueryValueExW
(
hkeyApp
,
ModifyPathW
,
0
,
0
,
NULL
,
&
displen
)
if
(
!
dwNoModify
)
==
ERROR_SUCCESS
))
{
{
iter
->
path_modify
=
HeapAlloc
(
GetProcessHeap
(),
0
,
displen
);
if
(
!
RegQueryValueExW
(
hkeyApp
,
WindowsInstallerW
,
NULL
,
&
dwType
,
NULL
,
&
value
)
&&
dwType
==
REG_DWORD
&&
value
==
1
)
if
(
!
iter
->
path_modify
)
{
goto
err
;
static
const
WCHAR
fmtW
[]
=
{
'm'
,
's'
,
'i'
,
'e'
,
'x'
,
'e'
,
'c'
,
' '
,
'/'
,
'i'
,
'%'
,
's'
,
0
};
int
len
=
lstrlenW
(
fmtW
)
+
lstrlenW
(
subKeyName
);
if
(
!
(
iter
->
path_modify
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
))))
goto
err
;
wsprintfW
(
iter
->
path_modify
,
fmtW
,
subKeyName
);
}
else
if
(
!
RegQueryValueExW
(
hkeyApp
,
ModifyPathW
,
0
,
0
,
NULL
,
&
displen
))
{
if
(
!
(
iter
->
path_modify
=
HeapAlloc
(
GetProcessHeap
(),
0
,
displen
)))
goto
err
;
RegQueryValueExW
(
hkeyApp
,
ModifyPathW
,
0
,
0
,
(
LPBYTE
)
iter
->
path_modify
,
&
displen
);
RegQueryValueExW
(
hkeyApp
,
ModifyPathW
,
0
,
0
,
(
LPBYTE
)
iter
->
path_modify
,
&
displen
);
}
}
}
/* registry key */
/* registry key */
iter
->
regroot
=
root
;
iter
->
regroot
=
root
;
lstrcpyW
(
iter
->
regkey
,
subKeyName
);
lstrcpyW
(
iter
->
regkey
,
subKeyName
);
iter
->
path
=
command
;
iter
->
id
=
id
++
;
iter
->
id
=
id
++
;
}
}
...
...
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