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
6e63953b
Commit
6e63953b
authored
Aug 05, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Aug 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Also check the LocalPackage install property when searching for the product package.
parent
d500dc4f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
22 deletions
+53
-22
msi.c
dlls/msi/msi.c
+48
-11
install.c
dlls/msi/tests/install.c
+5
-11
No files found.
dlls/msi/msi.c
View file @
6e63953b
...
@@ -372,6 +372,53 @@ done:
...
@@ -372,6 +372,53 @@ done:
return
r
;
return
r
;
}
}
static
UINT
msi_open_package
(
LPCWSTR
product
,
MSIINSTALLCONTEXT
context
,
MSIPACKAGE
**
package
)
{
UINT
r
;
DWORD
sz
;
HKEY
props
;
LPWSTR
localpack
;
WCHAR
sourcepath
[
MAX_PATH
];
WCHAR
filename
[
MAX_PATH
];
static
const
WCHAR
szLocalPackage
[]
=
{
'L'
,
'o'
,
'c'
,
'a'
,
'l'
,
'P'
,
'a'
,
'c'
,
'k'
,
'a'
,
'g'
,
'e'
,
0
};
if
(
context
==
MSIINSTALLCONTEXT_MACHINE
)
r
=
MSIREG_OpenLocalSystemInstallProps
(
product
,
&
props
,
FALSE
);
else
r
=
MSIREG_OpenCurrentUserInstallProps
(
product
,
&
props
,
FALSE
);
if
(
r
!=
ERROR_SUCCESS
)
return
ERROR_BAD_CONFIGURATION
;
localpack
=
msi_reg_get_val_str
(
props
,
szLocalPackage
);
if
(
localpack
)
{
lstrcpyW
(
sourcepath
,
localpack
);
msi_free
(
localpack
);
}
if
(
!
localpack
||
GetFileAttributesW
(
sourcepath
)
==
INVALID_FILE_ATTRIBUTES
)
{
sz
=
sizeof
(
sourcepath
);
MsiSourceListGetInfoW
(
product
,
NULL
,
context
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_LASTUSEDSOURCEW
,
sourcepath
,
&
sz
);
sz
=
sizeof
(
filename
);
MsiSourceListGetInfoW
(
product
,
NULL
,
context
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_PACKAGENAMEW
,
filename
,
&
sz
);
lstrcatW
(
sourcepath
,
filename
);
}
if
(
GetFileAttributesW
(
sourcepath
)
==
INVALID_FILE_ATTRIBUTES
)
return
ERROR_INSTALL_SOURCE_ABSENT
;
return
MSI_OpenPackageW
(
sourcepath
,
package
);
}
UINT
WINAPI
MsiConfigureProductExW
(
LPCWSTR
szProduct
,
int
iInstallLevel
,
UINT
WINAPI
MsiConfigureProductExW
(
LPCWSTR
szProduct
,
int
iInstallLevel
,
INSTALLSTATE
eInstallState
,
LPCWSTR
szCommandLine
)
INSTALLSTATE
eInstallState
,
LPCWSTR
szCommandLine
)
{
{
...
@@ -380,7 +427,6 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
...
@@ -380,7 +427,6 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
UINT
r
;
UINT
r
;
DWORD
sz
;
DWORD
sz
;
WCHAR
sourcepath
[
MAX_PATH
];
WCHAR
sourcepath
[
MAX_PATH
];
WCHAR
filename
[
MAX_PATH
];
LPWSTR
commandline
;
LPWSTR
commandline
;
static
const
WCHAR
szInstalled
[]
=
{
static
const
WCHAR
szInstalled
[]
=
{
...
@@ -407,16 +453,7 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
...
@@ -407,16 +453,7 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
if
(
r
!=
ERROR_SUCCESS
)
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
return
r
;
sz
=
sizeof
(
sourcepath
);
r
=
msi_open_package
(
szProduct
,
context
,
&
package
);
MsiSourceListGetInfoW
(
szProduct
,
NULL
,
context
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_LASTUSEDSOURCEW
,
sourcepath
,
&
sz
);
sz
=
sizeof
(
filename
);
MsiSourceListGetInfoW
(
szProduct
,
NULL
,
context
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_PACKAGENAMEW
,
filename
,
&
sz
);
lstrcatW
(
sourcepath
,
filename
);
r
=
MSI_OpenPackageW
(
sourcepath
,
&
package
);
if
(
r
!=
ERROR_SUCCESS
)
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
return
r
;
...
...
dlls/msi/tests/install.c
View file @
6e63953b
...
@@ -5118,9 +5118,9 @@ static void test_MsiConfigureProductEx(void)
...
@@ -5118,9 +5118,9 @@ static void test_MsiConfigureProductEx(void)
r
=
MsiConfigureProductExA
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
,
r
=
MsiConfigureProductExA
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
,
INSTALLLEVEL_DEFAULT
,
INSTALLSTATE_ABSENT
,
INSTALLLEVEL_DEFAULT
,
INSTALLSTATE_ABSENT
,
"PROPVAR=42"
);
"PROPVAR=42"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
todo_wine
todo_wine
{
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
delete_pf
(
"msitest
\\
hydrogen"
,
TRUE
),
"File not removed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
hydrogen"
,
TRUE
),
"File not removed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
helium"
,
TRUE
),
"File not removed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
helium"
,
TRUE
),
"File not removed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
lithium"
,
TRUE
),
"File not removed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
lithium"
,
TRUE
),
"File not removed
\n
"
);
...
@@ -5154,11 +5154,8 @@ static void test_MsiConfigureProductEx(void)
...
@@ -5154,11 +5154,8 @@ static void test_MsiConfigureProductEx(void)
r
=
MsiConfigureProductExA
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
,
r
=
MsiConfigureProductExA
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
,
INSTALLLEVEL_DEFAULT
,
INSTALLSTATE_ABSENT
,
INSTALLLEVEL_DEFAULT
,
INSTALLSTATE_ABSENT
,
"PROPVAR=42"
);
"PROPVAR=42"
);
todo_wine
ok
(
r
==
ERROR_INSTALL_SOURCE_ABSENT
,
{
"Expected ERROR_INSTALL_SOURCE_ABSENT, got %d
\n
"
,
r
);
ok
(
r
==
ERROR_INSTALL_SOURCE_ABSENT
,
"Expected ERROR_INSTALL_SOURCE_ABSENT, got %d
\n
"
,
r
);
}
ok
(
pf_exists
(
"msitest
\\
hydrogen"
),
"File not installed
\n
"
);
ok
(
pf_exists
(
"msitest
\\
hydrogen"
),
"File not installed
\n
"
);
ok
(
pf_exists
(
"msitest
\\
helium"
),
"File not installed
\n
"
);
ok
(
pf_exists
(
"msitest
\\
helium"
),
"File not installed
\n
"
);
ok
(
pf_exists
(
"msitest
\\
lithium"
),
"File not installed
\n
"
);
ok
(
pf_exists
(
"msitest
\\
lithium"
),
"File not installed
\n
"
);
...
@@ -5219,11 +5216,8 @@ static void test_MsiConfigureProductEx(void)
...
@@ -5219,11 +5216,8 @@ static void test_MsiConfigureProductEx(void)
r
=
MsiConfigureProductExA
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
,
r
=
MsiConfigureProductExA
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
,
INSTALLLEVEL_DEFAULT
,
INSTALLSTATE_ABSENT
,
INSTALLLEVEL_DEFAULT
,
INSTALLSTATE_ABSENT
,
"PROPVAR=42"
);
"PROPVAR=42"
);
todo_wine
ok
(
r
==
ERROR_INSTALL_SOURCE_ABSENT
,
{
"Expected ERROR_INSTALL_SOURCE_ABSENT, got %d
\n
"
,
r
);
ok
(
r
==
ERROR_INSTALL_SOURCE_ABSENT
,
"Expected ERROR_INSTALL_SOURCE_ABSENT, got %d
\n
"
,
r
);
}
ok
(
pf_exists
(
"msitest
\\
hydrogen"
),
"File not installed
\n
"
);
ok
(
pf_exists
(
"msitest
\\
hydrogen"
),
"File not installed
\n
"
);
ok
(
pf_exists
(
"msitest
\\
helium"
),
"File not installed
\n
"
);
ok
(
pf_exists
(
"msitest
\\
helium"
),
"File not installed
\n
"
);
ok
(
pf_exists
(
"msitest
\\
lithium"
),
"File not installed
\n
"
);
ok
(
pf_exists
(
"msitest
\\
lithium"
),
"File not installed
\n
"
);
...
...
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