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
fabfc5da
Commit
fabfc5da
authored
Aug 23, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
Aug 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi/tests: Clean up local packages.
parent
eb7ae99d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
7 deletions
+30
-7
automation.c
dlls/msi/tests/automation.c
+6
-1
install.c
dlls/msi/tests/install.c
+24
-6
No files found.
dlls/msi/tests/automation.c
View file @
fabfc5da
...
...
@@ -47,6 +47,7 @@ static const WCHAR szUpgradeCode[] = { '{','C','E','0','6','7','E','8','D','-','
static
const
WCHAR
szProductInfoException
[]
=
{
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
'I'
,
'n'
,
'f'
,
'o'
,
','
,
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
','
,
'A'
,
't'
,
't'
,
'r'
,
'i'
,
'b'
,
'u'
,
't'
,
'e'
,
0
};
static
const
WCHAR
WINE_INSTALLPROPERTY_PACKAGENAMEW
[]
=
{
'P'
,
'a'
,
'c'
,
'k'
,
'a'
,
'g'
,
'e'
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
WINE_INSTALLPROPERTY_PRODUCTNAMEW
[]
=
{
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
WINE_INSTALLPROPERTY_LOCALPACKAGEW
[]
=
{
'L'
,
'o'
,
'c'
,
'a'
,
'l'
,
'P'
,
'a'
,
'c'
,
'k'
,
'a'
,
'g'
,
'e'
,
0
};
static
FILETIME
systemtime
;
static
CHAR
CURR_DIR
[
MAX_PATH
];
static
EXCEPINFO
excepinfo
;
...
...
@@ -2485,6 +2486,10 @@ static void test_Installer_InstallProduct(void)
IDispatch_Release
(
pStringList
);
}
hr
=
Installer_ProductInfo
(
szProductCode
,
WINE_INSTALLPROPERTY_LOCALPACKAGEW
,
szString
);
ok
(
hr
==
S_OK
,
"Installer_ProductInfo failed, hresult 0x%08x
\n
"
,
hr
);
DeleteFileW
(
szString
);
/* Check & clean up installed files & registry keys */
ok
(
delete_pf
(
"msitest
\\
cabout
\\
new
\\
five.txt"
,
TRUE
),
"File not installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
cabout
\\
new"
,
FALSE
),
"File not installed
\n
"
);
...
...
@@ -2563,7 +2568,7 @@ static void test_Installer_InstallProduct(void)
RegCloseKey
(
hkey
);
/* Delete installation files we
install
ed */
/* Delete installation files we
creat
ed */
delete_test_files
();
}
...
...
dlls/msi/tests/install.c
View file @
fabfc5da
...
...
@@ -4754,7 +4754,7 @@ static void test_MsiConfigureProductEx(void)
LONG
res
;
DWORD
type
,
size
;
HKEY
props
,
source
;
CHAR
keypath
[
MAX_PATH
*
2
],
localpack
[
MAX_PATH
];
CHAR
keypath
[
MAX_PATH
*
2
],
localpack
age
[
MAX_PATH
],
packagename
[
MAX_PATH
];
REGSAM
access
=
KEY_ALL_ACCESS
;
if
(
is_process_limited
())
...
...
@@ -4886,7 +4886,7 @@ static void test_MsiConfigureProductEx(void)
DeleteFileA
(
msifile
);
/*
local
msifile is removed */
/* msifile is removed */
r
=
MsiConfigureProductExA
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
,
INSTALLLEVEL_DEFAULT
,
INSTALLSTATE_ABSENT
,
"PROPVAR=42"
);
...
...
@@ -4915,6 +4915,12 @@ static void test_MsiConfigureProductEx(void)
res
=
RegOpenKeyExA
(
HKEY_LOCAL_MACHINE
,
keypath
,
0
,
access
,
&
props
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
type
=
REG_SZ
;
size
=
MAX_PATH
;
res
=
RegQueryValueExA
(
props
,
"LocalPackage"
,
NULL
,
&
type
,
(
LPBYTE
)
localpackage
,
&
size
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
res
=
RegSetValueExA
(
props
,
"LocalPackage"
,
0
,
REG_SZ
,
(
const
BYTE
*
)
"C:
\\
idontexist.msi"
,
18
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
...
...
@@ -4933,7 +4939,7 @@ static void test_MsiConfigureProductEx(void)
RegCloseKey
(
props
);
create_database
(
msifile
,
mcp_tables
,
sizeof
(
mcp_tables
)
/
sizeof
(
msi_table
));
/* LastUsedSource
(local msi package)
can be used as a last resort */
/* LastUsedSource can be used as a last resort */
r
=
MsiConfigureProductExA
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
,
INSTALLLEVEL_DEFAULT
,
INSTALLSTATE_ABSENT
,
"PROPVAR=42"
);
...
...
@@ -4942,6 +4948,7 @@ static void test_MsiConfigureProductEx(void)
ok
(
!
delete_pf
(
"msitest
\\
helium"
,
TRUE
),
"File not removed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
lithium"
,
TRUE
),
"File not removed
\n
"
);
ok
(
!
delete_pf
(
"msitest"
,
FALSE
),
"Directory not removed
\n
"
);
DeleteFileA
(
localpackage
);
/* install the product, machine */
r
=
MsiInstallProductA
(
msifile
,
"ALLUSERS=1 INSTALLLEVEL=10 PROPVAR=42"
);
...
...
@@ -4958,6 +4965,12 @@ static void test_MsiConfigureProductEx(void)
res
=
RegOpenKeyExA
(
HKEY_LOCAL_MACHINE
,
keypath
,
0
,
access
,
&
props
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
type
=
REG_SZ
;
size
=
MAX_PATH
;
res
=
RegQueryValueExA
(
props
,
"LocalPackage"
,
NULL
,
&
type
,
(
LPBYTE
)
localpackage
,
&
size
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
res
=
RegSetValueExA
(
props
,
"LocalPackage"
,
0
,
REG_SZ
,
(
const
BYTE
*
)
"C:
\\
idontexist.msi"
,
18
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
...
...
@@ -4971,7 +4984,7 @@ static void test_MsiConfigureProductEx(void)
type
=
REG_SZ
;
size
=
MAX_PATH
;
res
=
RegQueryValueExA
(
source
,
"PackageName"
,
NULL
,
&
type
,
(
LPBYTE
)
localpack
,
&
size
);
(
LPBYTE
)
packagename
,
&
size
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
res
=
RegSetValueExA
(
source
,
"PackageName"
,
0
,
REG_SZ
,
...
...
@@ -4989,9 +5002,14 @@ static void test_MsiConfigureProductEx(void)
ok
(
pf_exists
(
"msitest
\\
lithium"
),
"File not installed
\n
"
);
ok
(
pf_exists
(
"msitest"
),
"File not installed
\n
"
);
/* restore
the SourceList
*/
/* restore
PackageName
*/
res
=
RegSetValueExA
(
source
,
"PackageName"
,
0
,
REG_SZ
,
(
const
BYTE
*
)
localpack
,
lstrlenA
(
localpack
)
+
1
);
(
const
BYTE
*
)
packagename
,
lstrlenA
(
packagename
)
+
1
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
/* restore LocalPackage */
res
=
RegSetValueExA
(
props
,
"LocalPackage"
,
0
,
REG_SZ
,
(
const
BYTE
*
)
localpackage
,
lstrlenA
(
localpackage
)
+
1
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
/* finally remove the product */
...
...
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