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
280af526
Commit
280af526
authored
Mar 22, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Mask off modifiers before setting the UILevel property.
Spotted by Aric Stewart.
parent
9b2b760e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
3 deletions
+34
-3
package.c
dlls/msi/package.c
+3
-3
package.c
dlls/msi/tests/package.c
+31
-0
No files found.
dlls/msi/package.c
View file @
280af526
...
...
@@ -1154,9 +1154,9 @@ void msi_adjust_privilege_properties( MSIPACKAGE *package )
MSIPACKAGE
*
MSI_CreatePackage
(
MSIDATABASE
*
db
,
LPCWSTR
base_url
)
{
static
const
WCHAR
szpi
[]
=
{
'%'
,
'i
'
,
0
};
static
const
WCHAR
fmtW
[]
=
{
'%'
,
'u
'
,
0
};
MSIPACKAGE
*
package
;
WCHAR
uilevel
[
1
0
];
WCHAR
uilevel
[
1
1
];
UINT
r
;
TRACE
(
"%p
\n
"
,
db
);
...
...
@@ -1181,7 +1181,7 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url )
set_installed_prop
(
package
);
set_installer_properties
(
package
);
sprintfW
(
uilevel
,
szpi
,
gUILevel
);
sprintfW
(
uilevel
,
fmtW
,
gUILevel
&
INSTALLUILEVEL_MASK
);
msi_set_property
(
package
->
db
,
szUILevel
,
uilevel
);
r
=
msi_load_summary_properties
(
package
);
...
...
dlls/msi/tests/package.c
View file @
280af526
...
...
@@ -10031,6 +10031,7 @@ static void test_installprops(void)
UINT
r
;
REGSAM
access
=
KEY_ALL_ACCESS
;
SYSTEM_INFO
si
;
INSTALLUILEVEL
uilevel
;
if
(
is_wow64
)
access
|=
KEY_WOW64_64KEY
;
...
...
@@ -10039,6 +10040,8 @@ static void test_installprops(void)
lstrcat
(
path
,
"
\\
"
);
lstrcat
(
path
,
msifile
);
uilevel
=
MsiSetInternalUI
(
INSTALLUILEVEL_BASIC
|
INSTALLUILEVEL_SOURCERESONLY
,
NULL
);
hdb
=
create_package_db
();
ok
(
hdb
,
"failed to create database
\n
"
);
...
...
@@ -10046,6 +10049,7 @@ static void test_installprops(void)
if
(
r
==
ERROR_INSTALL_PACKAGE_REJECTED
)
{
skip
(
"Not enough rights to perform tests
\n
"
);
MsiSetInternalUI
(
uilevel
,
NULL
);
DeleteFile
(
msifile
);
return
;
}
...
...
@@ -10053,6 +10057,21 @@ static void test_installprops(void)
MsiCloseHandle
(
hdb
);
buf
[
0
]
=
0
;
size
=
MAX_PATH
;
r
=
MsiGetProperty
(
hpkg
,
"UILevel"
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to get property: %d
\n
"
,
r
);
ok
(
!
lstrcmp
(
buf
,
"3"
),
"Expected
\"
3
\"
, got
\"
%s
\"\n
"
,
buf
);
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
buf
[
0
]
=
0
;
size
=
MAX_PATH
;
r
=
MsiGetProperty
(
hpkg
,
"UILevel"
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to get property: %d
\n
"
,
r
);
ok
(
!
lstrcmp
(
buf
,
"3"
),
"Expected
\"
3
\"
, got
\"
%s
\"\n
"
,
buf
);
buf
[
0
]
=
0
;
size
=
MAX_PATH
;
r
=
MsiGetProperty
(
hpkg
,
"DATABASE"
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to get property: %d
\n
"
,
r
);
...
...
@@ -10071,6 +10090,7 @@ static void test_installprops(void)
RegQueryValueEx
(
hkey2
,
"RegisteredOwner"
,
NULL
,
&
type
,
(
LPBYTE
)
path
,
&
size
);
}
buf
[
0
]
=
0
;
size
=
MAX_PATH
;
r
=
MsiGetProperty
(
hpkg
,
"USERNAME"
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to get property: %d
\n
"
,
r
);
...
...
@@ -10088,37 +10108,44 @@ static void test_installprops(void)
if
(
*
path
)
{
buf
[
0
]
=
0
;
size
=
MAX_PATH
;
r
=
MsiGetProperty
(
hpkg
,
"COMPANYNAME"
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to get property: %d
\n
"
,
r
);
ok
(
!
lstrcmp
(
buf
,
path
),
"Expected %s, got %s
\n
"
,
path
,
buf
);
}
buf
[
0
]
=
0
;
size
=
MAX_PATH
;
r
=
MsiGetProperty
(
hpkg
,
"VersionDatabase"
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to get property: %d
\n
"
,
r
);
trace
(
"VersionDatabase = %s
\n
"
,
buf
);
buf
[
0
]
=
0
;
size
=
MAX_PATH
;
r
=
MsiGetProperty
(
hpkg
,
"VersionMsi"
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to get property: %d
\n
"
,
r
);
trace
(
"VersionMsi = %s
\n
"
,
buf
);
buf
[
0
]
=
0
;
size
=
MAX_PATH
;
r
=
MsiGetProperty
(
hpkg
,
"Date"
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to get property: %d
\n
"
,
r
);
trace
(
"Date = %s
\n
"
,
buf
);
buf
[
0
]
=
0
;
size
=
MAX_PATH
;
r
=
MsiGetProperty
(
hpkg
,
"Time"
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to get property: %d
\n
"
,
r
);
trace
(
"Time = %s
\n
"
,
buf
);
buf
[
0
]
=
0
;
size
=
MAX_PATH
;
r
=
MsiGetProperty
(
hpkg
,
"PackageCode"
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to get property: %d
\n
"
,
r
);
trace
(
"PackageCode = %s
\n
"
,
buf
);
buf
[
0
]
=
0
;
size
=
MAX_PATH
;
r
=
MsiGetProperty
(
hpkg
,
"ComputerName"
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS got %d
\n
"
,
r
);
...
...
@@ -10127,18 +10154,21 @@ static void test_installprops(void)
langid
=
GetUserDefaultLangID
();
sprintf
(
path
,
"%d"
,
langid
);
buf
[
0
]
=
0
;
size
=
MAX_PATH
;
r
=
MsiGetProperty
(
hpkg
,
"UserLanguageID"
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS got %d
\n
"
,
r
);
ok
(
!
lstrcmpA
(
buf
,
path
),
"Expected
\"
%s
\"
, got
\"
%s
\"\n
"
,
path
,
buf
);
res
=
GetSystemMetrics
(
SM_CXSCREEN
);
buf
[
0
]
=
0
;
size
=
MAX_PATH
;
r
=
MsiGetProperty
(
hpkg
,
"ScreenX"
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS got %d
\n
"
,
r
);
ok
(
atol
(
buf
)
==
res
,
"Expected %d, got %ld
\n
"
,
res
,
atol
(
buf
));
res
=
GetSystemMetrics
(
SM_CYSCREEN
);
buf
[
0
]
=
0
;
size
=
MAX_PATH
;
r
=
MsiGetProperty
(
hpkg
,
"ScreenY"
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS got %d
\n
"
,
r
);
...
...
@@ -10350,6 +10380,7 @@ static void test_installprops(void)
CloseHandle
(
hkey2
);
MsiCloseHandle
(
hpkg
);
DeleteFile
(
msifile
);
MsiSetInternalUI
(
uilevel
,
NULL
);
}
static
void
test_launchconditions
(
void
)
...
...
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