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
9518d7f8
Commit
9518d7f8
authored
Jul 28, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Jul 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Properly locate the published product in MsiConfigureProductEx.
parent
ac976c94
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
16 deletions
+37
-16
msi.c
dlls/msi/msi.c
+37
-16
No files found.
dlls/msi/msi.c
View file @
9518d7f8
...
...
@@ -45,6 +45,28 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
static
const
WCHAR
installerW
[]
=
{
'\\'
,
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'e'
,
'r'
,
0
};
/* FIXME: user-managed installs not located */
static
UINT
msi_locate_product
(
LPCWSTR
szProduct
,
MSIINSTALLCONTEXT
*
context
)
{
HKEY
hkey
=
NULL
;
UINT
r
;
*
context
=
MSIINSTALLCONTEXT_NONE
;
r
=
MSIREG_OpenLocalClassesProductKey
(
szProduct
,
&
hkey
,
FALSE
);
if
(
r
==
ERROR_SUCCESS
)
*
context
=
MSIINSTALLCONTEXT_MACHINE
;
else
{
r
=
MSIREG_OpenUserProductsKey
(
szProduct
,
&
hkey
,
FALSE
);
if
(
r
==
ERROR_SUCCESS
)
*
context
=
MSIINSTALLCONTEXT_USERUNMANAGED
;
}
RegCloseKey
(
hkey
);
return
ERROR_SUCCESS
;
}
UINT
WINAPI
MsiOpenProductA
(
LPCSTR
szProduct
,
MSIHANDLE
*
phProduct
)
{
UINT
r
;
...
...
@@ -346,6 +368,7 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
INSTALLSTATE
eInstallState
,
LPCWSTR
szCommandLine
)
{
MSIPACKAGE
*
package
=
NULL
;
MSIINSTALLCONTEXT
context
;
UINT
r
;
DWORD
sz
;
WCHAR
sourcepath
[
MAX_PATH
];
...
...
@@ -367,25 +390,23 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
return
ERROR_CALL_NOT_IMPLEMENTED
;
}
sz
=
sizeof
(
sourcepath
);
MsiSourceListGetInfoW
(
szProduct
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_LASTUSEDSOURCEW
,
sourcepath
,
&
sz
);
r
=
msi_locate_product
(
szProduct
,
&
context
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
sz
=
sizeof
(
filename
);
MsiSourceListGetInfoW
(
szProduct
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_PACKAGENAMEW
,
filename
,
&
sz
);
if
(
context
==
MSIINSTALLCONTEXT_NONE
)
return
ERROR_UNKNOWN_PRODUCT
;
lstrcatW
(
sourcepath
,
filename
);
sz
=
sizeof
(
sourcepath
);
MsiSourceListGetInfoW
(
szProduct
,
NULL
,
context
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_LASTUSEDSOURCEW
,
sourcepath
,
&
sz
);
/*
* ok 1, we need to find the msi file for this product.
* 2, find the source dir for the files
* 3, do the configure/install.
* 4, cleanupany runonce entry.
*/
sz
=
sizeof
(
filename
);
MsiSourceListGetInfoW
(
szProduct
,
NULL
,
context
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_PACKAGENAMEW
,
filename
,
&
sz
);
r
=
MSI_OpenProductW
(
szProduct
,
&
package
);
lstrcatW
(
sourcepath
,
filename
);
r
=
MSI_OpenPackageW
(
sourcepath
,
&
package
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
...
...
@@ -395,7 +416,7 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
sz
+=
lstrlenW
(
szCommandLine
);
commandline
=
msi_alloc
(
sz
*
sizeof
(
WCHAR
));
if
(
!
commandline
)
if
(
!
commandline
)
{
r
=
ERROR_OUTOFMEMORY
;
goto
end
;
...
...
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