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
0f0e81d1
Commit
0f0e81d1
authored
Feb 17, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 17, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Implement the UnpublishComponents standard action.
parent
d95e3eb4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
74 additions
and
6 deletions
+74
-6
action.c
dlls/msi/action.c
+74
-6
No files found.
dlls/msi/action.c
View file @
0f0e81d1
...
...
@@ -4583,6 +4583,80 @@ static UINT ACTION_PublishComponents(MSIPACKAGE *package)
return
rc
;
}
static
UINT
ITERATE_UnpublishComponent
(
MSIRECORD
*
rec
,
LPVOID
param
)
{
static
const
WCHAR
szInstallerComponents
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'e'
,
'r'
,
'\\'
,
'C'
,
'o'
,
'm'
,
'p'
,
'o'
,
'n'
,
'e'
,
'n'
,
't'
,
's'
,
'\\'
,
0
};
MSIPACKAGE
*
package
=
param
;
LPCWSTR
compgroupid
,
component
,
feature
,
qualifier
;
MSICOMPONENT
*
comp
;
MSIFEATURE
*
feat
;
MSIRECORD
*
uirow
;
WCHAR
squashed
[
GUID_SIZE
],
keypath
[
MAX_PATH
];
LONG
res
;
feature
=
MSI_RecordGetString
(
rec
,
5
);
feat
=
get_loaded_feature
(
package
,
feature
);
if
(
!
feat
)
return
ERROR_SUCCESS
;
if
(
feat
->
ActionRequest
!=
INSTALLSTATE_ABSENT
)
{
TRACE
(
"Feature %s not scheduled for removal
\n
"
,
debugstr_w
(
feature
));
feat
->
Action
=
feat
->
Installed
;
return
ERROR_SUCCESS
;
}
component
=
MSI_RecordGetString
(
rec
,
3
);
comp
=
get_loaded_component
(
package
,
component
);
if
(
!
comp
)
return
ERROR_SUCCESS
;
compgroupid
=
MSI_RecordGetString
(
rec
,
1
);
qualifier
=
MSI_RecordGetString
(
rec
,
2
);
squash_guid
(
compgroupid
,
squashed
);
strcpyW
(
keypath
,
szInstallerComponents
);
strcatW
(
keypath
,
squashed
);
res
=
RegDeleteKeyW
(
HKEY_CURRENT_USER
,
keypath
);
if
(
res
!=
ERROR_SUCCESS
)
{
WARN
(
"Unable to delete component key %d
\n
"
,
res
);
}
uirow
=
MSI_CreateRecord
(
2
);
MSI_RecordSetStringW
(
uirow
,
1
,
compgroupid
);
MSI_RecordSetStringW
(
uirow
,
2
,
qualifier
);
ui_actiondata
(
package
,
szUnpublishComponents
,
uirow
);
msiobj_release
(
&
uirow
->
hdr
);
return
ERROR_SUCCESS
;
}
static
UINT
ACTION_UnpublishComponents
(
MSIPACKAGE
*
package
)
{
UINT
rc
;
MSIQUERY
*
view
;
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'P'
,
'u'
,
'b'
,
'l'
,
'i'
,
's'
,
'h'
,
'C'
,
'o'
,
'm'
,
'p'
,
'o'
,
'n'
,
'e'
,
'n'
,
't'
,
'`'
,
0
};
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
if
(
rc
!=
ERROR_SUCCESS
)
return
ERROR_SUCCESS
;
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_UnpublishComponent
,
package
);
msiobj_release
(
&
view
->
hdr
);
return
rc
;
}
static
UINT
ITERATE_InstallService
(
MSIRECORD
*
rec
,
LPVOID
param
)
{
MSIPACKAGE
*
package
=
param
;
...
...
@@ -6550,12 +6624,6 @@ static UINT ACTION_SetODBCFolders( MSIPACKAGE *package )
return
msi_unimplemented_action_stub
(
package
,
"SetODBCFolders"
,
table
);
}
static
UINT
ACTION_UnpublishComponents
(
MSIPACKAGE
*
package
)
{
static
const
WCHAR
table
[]
=
{
'P'
,
'u'
,
'b'
,
'l'
,
'i'
,
's'
,
'h'
,
'C'
,
'o'
,
'm'
,
'p'
,
'o'
,
'n'
,
'e'
,
'n'
,
't'
,
0
};
return
msi_unimplemented_action_stub
(
package
,
"UnpublishComponents"
,
table
);
}
static
UINT
ACTION_UnregisterClassInfo
(
MSIPACKAGE
*
package
)
{
static
const
WCHAR
table
[]
=
{
'A'
,
'p'
,
'p'
,
'I'
,
'd'
,
0
};
...
...
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