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
b4daf7a7
Commit
b4daf7a7
authored
Feb 24, 2014
by
Vincent Povirk
Committed by
Alexandre Julliard
Feb 26, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi/tests: Add tests for [un]registering progids.
parent
26777a46
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
216 additions
and
0 deletions
+216
-0
action.c
dlls/msi/tests/action.c
+216
-0
No files found.
dlls/msi/tests/action.c
View file @
b4daf7a7
...
...
@@ -21,6 +21,7 @@
#define _WIN32_MSI 300
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <msiquery.h>
...
...
@@ -1330,6 +1331,85 @@ static const char rei_install_exec_seq_dat[] =
"PublishProduct
\t\t
5200
\n
"
"InstallFinalize
\t\t
6000
\n
"
;
static
const
char
rpi_file_dat
[]
=
"File
\t
Component_
\t
FileName
\t
FileSize
\t
Version
\t
Language
\t
Attributes
\t
Sequence
\n
"
"s72
\t
s72
\t
l255
\t
i4
\t
S72
\t
S20
\t
I2
\t
i2
\n
"
"File
\t
File
\n
"
"progid.txt
\t
progid
\t
progid.txt
\t
1000
\t\t\t
8192
\t
1
\n
"
;
static
const
char
rpi_feature_dat
[]
=
"Feature
\t
Feature_Parent
\t
Title
\t
Description
\t
Display
\t
Level
\t
Directory_
\t
Attributes
\n
"
"s38
\t
S38
\t
L64
\t
L255
\t
I2
\t
i2
\t
S72
\t
i2
\n
"
"Feature
\t
Feature
\n
"
"progid
\t\t\t
progid feature
\t
1
\t
2
\t
MSITESTDIR
\t
0
\n
"
;
static
const
char
rpi_feature_comp_dat
[]
=
"Feature_
\t
Component_
\n
"
"s38
\t
s72
\n
"
"FeatureComponents
\t
Feature_
\t
Component_
\n
"
"progid
\t
progid
\n
"
;
static
const
char
rpi_component_dat
[]
=
"Component
\t
ComponentId
\t
Directory_
\t
Attributes
\t
Condition
\t
KeyPath
\n
"
"s72
\t
S38
\t
s72
\t
i2
\t
S255
\t
S72
\n
"
"Component
\t
Component
\n
"
"progid
\t
{89A98345-F8A1-422E-A48B-0250B5809F2D}
\t
MSITESTDIR
\t
0
\t\t
progid.txt
\n
"
;
static
const
char
rpi_appid_dat
[]
=
"AppId
\t
RemoteServerName
\t
LocalService
\t
ServiceParameters
\t
DllSurrogate
\t
ActivateAtStorage
\t
RunAsInteractiveUser
\n
"
"s38
\t
S255
\t
S255
\t
S255
\t
S255
\t
I2
\t
I2
\n
"
"AppId
\t
AppId
\n
"
"{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}
\t\t\t\t\t\t\n
"
;
static
const
char
rpi_class_dat
[]
=
"CLSID
\t
Context
\t
Component_
\t
ProgId_Default
\t
Description
\t
AppId_
\t
FileTypeMask
\t
Icon_
\t
IconIndex
\t
DefInprocHandler
\t
Argument
\t
Feature_
\t
Attributes
\n
"
"s38
\t
s32
\t
s72
\t
S255
\t
L255
\t
S38
\t
S255
\t
S72
\t
I2
\t
S32
\t
S255
\t
s38
\t
I2
\n
"
"Class
\t
CLSID
\t
Context
\t
Component_
\n
"
"{110913E7-86D1-4BF3-9922-BA103FCDDDFA}
\t
LocalServer
\t
progid
\t
Winetest.Class.1
\t
description
\t
{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}
\t
mask1;mask2
\t\t\t
2
\t\t
progid
\t\n
"
"{904E6BC9-F57F-4412-B460-D40DE2F256E2}
\t
LocalServer
\t
progid
\t
Winetest.VerClass
\t
description
\t
{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}
\t
mask1;mask2
\t\t\t
2
\t\t
progid
\t\n
"
"{57C413FB-CA02-498A-81F6-7E769BDB7C97}
\t
LocalServer
\t
progid
\t\t
description
\t
{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}
\t
mask1;mask2
\t\t\t
2
\t\t
progid
\t\n
"
;
static
const
char
rpi_extension_dat
[]
=
"Extension
\t
Component_
\t
ProgId_
\t
MIME_
\t
Feature_
\n
"
"s255
\t
s72
\t
S255
\t
S64
\t
s38
\n
"
"Extension
\t
Extension
\t
Component_
\n
"
;
static
const
char
rpi_progid_dat
[]
=
"ProgId
\t
ProgId_Parent
\t
Class_
\t
Description
\t
Icon_
\t
IconIndex
\n
"
"s255
\t
S255
\t
S38
\t
L255
\t
S72
\t
I2
\n
"
"ProgId
\t
ProgId
\n
"
"Winetest.Class.1
\t\t
{110913E7-86D1-4BF3-9922-BA103FCDDDFA}
\t
description
\t\t\n
"
"Winetest.Class
\t
Winetest.Class.1
\t\t
description
\t\t\n
"
"Winetest.Class.2
\t\t
{110913E7-86D1-4BF3-9922-BA103FCDDDFA}
\t
description
\t\t\n
"
"Winetest.VerClass.1
\t\t
{904E6BC9-F57F-4412-B460-D40DE2F256E2}
\t
description
\t\t\n
"
"Winetest.VerClass
\t
Winetest.VerClass.1
\t\t
description
\t\t\n
"
"Winetest.NoProgIdClass.1
\t\t
{57C413FB-CA02-498A-81F6-7E769BDB7C97}
\t
description
\t\t\n
"
"Winetest.NoProgIdClass
\t
Winetest.NoProgIdClass.1
\t\t
description
\t\t\n
"
"Winetest.Orphaned
\t\t\t
description
\t\t\n
"
"Winetest.Orphaned2
\t\t\t
description
\t\t\n
"
;
static
const
char
rpi_install_exec_seq_dat
[]
=
"Action
\t
Condition
\t
Sequence
\n
"
"s72
\t
S255
\t
I2
\n
"
"InstallExecuteSequence
\t
Action
\n
"
"LaunchConditions
\t\t
100
\n
"
"CostInitialize
\t\t
800
\n
"
"FileCost
\t\t
900
\n
"
"CostFinalize
\t\t
1000
\n
"
"InstallValidate
\t\t
1400
\n
"
"InstallInitialize
\t\t
1500
\n
"
"ProcessComponents
\t\t
1600
\n
"
"RemoveFiles
\t\t
1700
\n
"
"InstallFiles
\t\t
2000
\n
"
"UnregisterClassInfo
\t\t
3000
\n
"
"UnregisterProgIdInfo
\t\t
3400
\n
"
"RegisterClassInfo
\t\t
4000
\n
"
"RegisterProgIdInfo
\t\t
4400
\n
"
"RegisterProduct
\t\t
5000
\n
"
"PublishFeatures
\t\t
5100
\n
"
"PublishProduct
\t\t
5200
\n
"
"InstallFinalize
\t\t
6000
\n
"
;
static
const
char
rmi_file_dat
[]
=
"File
\t
Component_
\t
FileName
\t
FileSize
\t
Version
\t
Language
\t
Attributes
\t
Sequence
\n
"
"s72
\t
s72
\t
l255
\t
i4
\t
S72
\t
S20
\t
I2
\t
i2
\n
"
...
...
@@ -1894,6 +1974,22 @@ static const msi_table rei_tables[] =
ADD_TABLE
(
property
)
};
static
const
msi_table
rpi_tables
[]
=
{
ADD_TABLE
(
directory
),
ADD_TABLE
(
rpi_component
),
ADD_TABLE
(
rpi_feature
),
ADD_TABLE
(
rpi_feature_comp
),
ADD_TABLE
(
rpi_file
),
ADD_TABLE
(
rpi_appid
),
ADD_TABLE
(
rpi_class
),
ADD_TABLE
(
rpi_extension
),
ADD_TABLE
(
rpi_progid
),
ADD_TABLE
(
rpi_install_exec_seq
),
ADD_TABLE
(
media
),
ADD_TABLE
(
property
)
};
static
const
msi_table
rmi_tables
[]
=
{
ADD_TABLE
(
directory
),
...
...
@@ -6216,6 +6312,125 @@ error:
DeleteFileA
(
msifile
);
}
static
void
test_register_progid_info
(
void
)
{
UINT
r
;
LONG
res
;
HKEY
hkey
;
if
(
is_process_limited
())
{
skip
(
"process is limited
\n
"
);
return
;
}
create_test_files
();
create_file
(
"msitest
\\
progid.txt"
,
1000
);
create_database
(
msifile
,
rpi_tables
,
sizeof
(
rpi_tables
)
/
sizeof
(
msi_table
));
res
=
RegCreateKeyExA
(
HKEY_CLASSES_ROOT
,
"Winetest.Orphaned"
,
0
,
NULL
,
0
,
KEY_ALL_ACCESS
,
NULL
,
&
hkey
,
NULL
);
ok
(
res
==
ERROR_SUCCESS
,
"key not created
\n
"
);
RegCloseKey
(
hkey
);
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiInstallProductA
(
msifile
,
NULL
);
if
(
r
==
ERROR_INSTALL_PACKAGE_REJECTED
)
{
skip
(
"Not enough rights to perform tests
\n
"
);
goto
error
;
}
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
if
(
is_64bit
)
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"Wow6432Node
\\
CLSID
\\
{110913E7-86D1-4BF3-9922-BA103FCDDDFA}"
,
&
hkey
);
else
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"CLSID
\\
{110913E7-86D1-4BF3-9922-BA103FCDDDFA}"
,
&
hkey
);
ok
(
res
==
ERROR_SUCCESS
,
"key not created
\n
"
);
RegCloseKey
(
hkey
);
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"Winetest.Class.1"
,
&
hkey
);
ok
(
res
==
ERROR_SUCCESS
,
"key not created
\n
"
);
RegCloseKey
(
hkey
);
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"Winetest.Class"
,
&
hkey
);
ok
(
res
==
ERROR_SUCCESS
,
"key not created
\n
"
);
RegCloseKey
(
hkey
);
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"Winetest.Class.2"
,
&
hkey
);
ok
(
res
==
ERROR_SUCCESS
,
"key not created
\n
"
);
RegCloseKey
(
hkey
);
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"Winetest.VerClass.1"
,
&
hkey
);
ok
(
res
==
ERROR_SUCCESS
,
"key not created
\n
"
);
RegCloseKey
(
hkey
);
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"Winetest.VerClass"
,
&
hkey
);
ok
(
res
==
ERROR_SUCCESS
,
"key not created
\n
"
);
RegCloseKey
(
hkey
);
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"Winetest.NoProgIdClass.1"
,
&
hkey
);
todo_wine
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"key created
\n
"
);
if
(
res
==
ERROR_SUCCESS
)
RegCloseKey
(
hkey
);
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"Winetest.NoProgIdClass"
,
&
hkey
);
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"key created
\n
"
);
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"Winetest.Orphaned"
,
&
hkey
);
todo_wine
ok
(
res
==
ERROR_SUCCESS
,
"key deleted
\n
"
);
if
(
res
==
ERROR_SUCCESS
)
RegCloseKey
(
hkey
);
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"Winetest.Orphaned2"
,
&
hkey
);
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"key created
\n
"
);
r
=
MsiInstallProductA
(
msifile
,
"REMOVE=ALL"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
if
(
is_64bit
)
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"Wow6432Node
\\
CLSID
\\
{110913E7-86D1-4BF3-9922-BA103FCDDDFA}"
,
&
hkey
);
else
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"CLSID
\\
{110913E7-86D1-4BF3-9922-BA103FCDDDFA}"
,
&
hkey
);
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"key not removed
\n
"
);
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"Winetest.Class.1"
,
&
hkey
);
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"key not removed
\n
"
);
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"Winetest.Class"
,
&
hkey
);
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"key not removed
\n
"
);
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"Winetest.Class.2"
,
&
hkey
);
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"key not removed
\n
"
);
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"Winetest.VerClass.1"
,
&
hkey
);
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"key not removed
\n
"
);
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"Winetest.VerClass"
,
&
hkey
);
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"key not removed
\n
"
);
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"Winetest.NoProgIdClass.1"
,
&
hkey
);
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"key not removed
\n
"
);
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"Winetest.NoProgIdClass"
,
&
hkey
);
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"key not removed
\n
"
);
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"Winetest.Orphaned"
,
&
hkey
);
todo_wine
ok
(
res
==
ERROR_SUCCESS
,
"key deleted
\n
"
);
if
(
res
==
ERROR_SUCCESS
)
RegCloseKey
(
hkey
);
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"Winetest.Orphaned2"
,
&
hkey
);
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"key not removed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
progid.txt"
,
TRUE
),
"file not removed
\n
"
);
ok
(
!
delete_pf
(
"msitest"
,
FALSE
),
"directory not removed
\n
"
);
error:
DeleteFileA
(
"msitest
\\
progid.txt"
);
delete_test_files
();
DeleteFileA
(
msifile
);
RegDeleteKeyA
(
HKEY_CLASSES_ROOT
,
"Winetest.Orphaned"
);
}
static
void
test_register_mime_info
(
void
)
{
UINT
r
;
...
...
@@ -6586,6 +6801,7 @@ START_TEST(action)
test_remove_env_strings
();
test_register_class_info
();
test_register_extension_info
();
test_register_progid_info
();
test_register_mime_info
();
test_publish_assemblies
();
test_remove_existing_products
();
...
...
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