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
597e1664
Commit
597e1664
authored
Jun 07, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
Jun 07, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Handle disabled components properly in the ProcessComponents action.
parent
ab13c00f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
30 deletions
+32
-30
action.c
dlls/msi/action.c
+32
-30
No files found.
dlls/msi/action.c
View file @
597e1664
...
...
@@ -3188,10 +3188,27 @@ static void ACTION_RefCountComponent( MSIPACKAGE* package, MSICOMPONENT *comp )
ACTION_WriteSharedDLLsCount
(
comp
->
FullKeypath
,
comp
->
RefCount
);
}
static
WCHAR
*
build_full_keypath
(
MSIPACKAGE
*
package
,
MSICOMPONENT
*
comp
)
{
if
(
comp
->
assembly
)
{
const
WCHAR
prefixW
[]
=
{
'<'
,
'\\'
,
0
};
DWORD
len
=
strlenW
(
prefixW
)
+
strlenW
(
comp
->
assembly
->
display_name
);
WCHAR
*
keypath
=
msi_alloc
(
(
len
+
1
)
*
sizeof
(
WCHAR
)
);
if
(
keypath
)
{
strcpyW
(
keypath
,
prefixW
);
strcatW
(
keypath
,
comp
->
assembly
->
display_name
);
}
return
keypath
;
}
return
resolve_keypath
(
package
,
comp
);
}
static
UINT
ACTION_ProcessComponents
(
MSIPACKAGE
*
package
)
{
WCHAR
squished_pc
[
GUID_SIZE
];
WCHAR
squished_cc
[
GUID_SIZE
];
WCHAR
squished_pc
[
GUID_SIZE
],
squished_cc
[
GUID_SIZE
];
UINT
rc
;
MSICOMPONENT
*
comp
;
HKEY
hkey
;
...
...
@@ -3205,41 +3222,27 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
LIST_FOR_EACH_ENTRY
(
comp
,
&
package
->
components
,
MSICOMPONENT
,
entry
)
{
MSIRECORD
*
uirow
;
MSIRECORD
*
uirow
;
INSTALLSTATE
action
;
msi_ui_progress
(
package
,
2
,
0
,
0
,
0
);
if
(
!
comp
->
ComponentId
)
continue
;
squash_guid
(
comp
->
ComponentId
,
squished_cc
);
msi_free
(
comp
->
FullKeypath
);
if
(
comp
->
assembly
)
{
const
WCHAR
prefixW
[]
=
{
'<'
,
'\\'
,
0
};
DWORD
len
=
strlenW
(
prefixW
)
+
strlenW
(
comp
->
assembly
->
display_name
);
comp
->
FullKeypath
=
msi_alloc
(
(
len
+
1
)
*
sizeof
(
WCHAR
)
);
if
(
comp
->
FullKeypath
)
{
strcpyW
(
comp
->
FullKeypath
,
prefixW
);
strcatW
(
comp
->
FullKeypath
,
comp
->
assembly
->
display_name
);
}
}
else
comp
->
FullKeypath
=
resolve_keypath
(
package
,
comp
);
squash_guid
(
comp
->
ComponentId
,
squished_cc
);
msi_free
(
comp
->
FullKeypath
);
comp
->
FullKeypath
=
build_full_keypath
(
package
,
comp
);
ACTION_RefCountComponent
(
package
,
comp
);
comp
->
Action
=
msi_get_component_action
(
package
,
comp
);
if
(
package
->
need_rollback
)
action
=
comp
->
Installed
;
else
action
=
comp
->
ActionRequest
;
TRACE
(
"Component %s (%s), Keypath=%s, RefCount=%u Action=%u
\n
"
,
debugstr_w
(
comp
->
Component
),
debugstr_w
(
squished_cc
),
debugstr_w
(
comp
->
FullKeypath
),
comp
->
RefCount
,
comp
->
Action
);
debugstr_w
(
comp
->
Component
),
debugstr_w
(
squished_cc
),
debugstr_w
(
comp
->
FullKeypath
),
comp
->
RefCount
,
action
);
if
(
comp
->
Action
==
INSTALLSTATE_LOCAL
||
comp
->
Action
==
INSTALLSTATE_SOURCE
)
if
(
action
==
INSTALLSTATE_LOCAL
||
action
==
INSTALLSTATE_SOURCE
)
{
if
(
package
->
Context
==
MSIINSTALLCONTEXT_MACHINE
)
rc
=
MSIREG_OpenUserDataComponentKey
(
comp
->
ComponentId
,
szLocalSid
,
&
hkey
,
TRUE
);
...
...
@@ -3258,8 +3261,7 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
msi_reg_set_val_str
(
hkey
,
szPermKey
,
comp
->
FullKeypath
);
}
if
(
comp
->
Action
==
INSTALLSTATE_LOCAL
)
if
(
action
==
INSTALLSTATE_LOCAL
)
msi_reg_set_val_str
(
hkey
,
squished_pc
,
comp
->
FullKeypath
);
else
{
...
...
@@ -3299,7 +3301,7 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
}
RegCloseKey
(
hkey
);
}
else
if
(
comp
->
A
ction
==
INSTALLSTATE_ABSENT
)
else
if
(
a
ction
==
INSTALLSTATE_ABSENT
)
{
if
(
package
->
Context
==
MSIINSTALLCONTEXT_MACHINE
)
MSIREG_DeleteUserDataComponentKey
(
comp
->
ComponentId
,
szLocalSid
);
...
...
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