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
a9e02909
Commit
a9e02909
authored
Dec 09, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Dec 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add the ability to delete multiple users' component keys.
parent
bdf7da9b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
26 deletions
+16
-26
action.c
dlls/msi/action.c
+2
-2
msipriv.h
dlls/msi/msipriv.h
+1
-2
registry.c
dlls/msi/registry.c
+13
-22
No files found.
dlls/msi/action.c
View file @
a9e02909
...
...
@@ -2922,9 +2922,9 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package)
else
if
(
ACTION_VerifyComponentForAction
(
comp
,
INSTALLSTATE_ABSENT
))
{
if
(
package
->
Context
==
MSIINSTALLCONTEXT_MACHINE
)
MSIREG_Delete
LocalUserDataComponentKey
(
comp
->
ComponentI
d
);
MSIREG_Delete
UserDataComponentKey
(
comp
->
ComponentId
,
szLocalSi
d
);
else
MSIREG_DeleteUserDataComponentKey
(
comp
->
ComponentId
);
MSIREG_DeleteUserDataComponentKey
(
comp
->
ComponentId
,
NULL
);
}
/* UI stuff */
...
...
dlls/msi/msipriv.h
View file @
a9e02909
...
...
@@ -787,8 +787,7 @@ extern UINT MSIREG_DeleteProductKey(LPCWSTR szProduct);
extern
UINT
MSIREG_DeleteUserProductKey
(
LPCWSTR
szProduct
);
extern
UINT
MSIREG_DeleteUserDataProductKey
(
LPCWSTR
szProduct
);
extern
UINT
MSIREG_DeleteUserFeaturesKey
(
LPCWSTR
szProduct
);
extern
UINT
MSIREG_DeleteLocalUserDataComponentKey
(
LPCWSTR
szComponent
);
extern
UINT
MSIREG_DeleteUserDataComponentKey
(
LPCWSTR
szComponent
);
extern
UINT
MSIREG_DeleteUserDataComponentKey
(
LPCWSTR
szComponent
,
LPCWSTR
szUserSid
);
extern
UINT
MSIREG_DeleteUserUpgradeCodesKey
(
LPCWSTR
szUpgradeCode
);
extern
UINT
MSIREG_OpenClassesUpgradeCodesKey
(
LPCWSTR
szUpgradeCode
,
HKEY
*
key
,
BOOL
create
);
extern
UINT
MSIREG_DeleteLocalClassesProductKey
(
LPCWSTR
szProductCode
);
...
...
dlls/msi/registry.c
View file @
a9e02909
...
...
@@ -733,20 +733,6 @@ UINT MSIREG_OpenUserComponentsKey(LPCWSTR szComponent, HKEY* key, BOOL create)
return
rc
;
}
UINT
MSIREG_DeleteLocalUserDataComponentKey
(
LPCWSTR
szComponent
)
{
WCHAR
comp
[
GUID_SIZE
];
WCHAR
keypath
[
0x200
];
TRACE
(
"%s
\n
"
,
debugstr_w
(
szComponent
));
if
(
!
squash_guid
(
szComponent
,
comp
))
return
ERROR_FUNCTION_FAILED
;
TRACE
(
"squished (%s)
\n
"
,
debugstr_w
(
comp
));
sprintfW
(
keypath
,
szUserDataComp_fmt
,
szLocalSid
,
comp
);
return
RegDeleteTreeW
(
HKEY_LOCAL_MACHINE
,
keypath
);
}
UINT
MSIREG_OpenUserDataComponentKey
(
LPCWSTR
szComponent
,
LPCWSTR
szUserSid
,
HKEY
*
key
,
BOOL
create
)
{
...
...
@@ -783,7 +769,7 @@ UINT MSIREG_OpenUserDataComponentKey(LPCWSTR szComponent, LPCWSTR szUserSid,
return
rc
;
}
UINT
MSIREG_DeleteUserDataComponentKey
(
LPCWSTR
szComponent
)
UINT
MSIREG_DeleteUserDataComponentKey
(
LPCWSTR
szComponent
,
LPCWSTR
szUserSid
)
{
UINT
rc
;
WCHAR
comp
[
GUID_SIZE
];
...
...
@@ -795,16 +781,21 @@ UINT MSIREG_DeleteUserDataComponentKey(LPCWSTR szComponent)
return
ERROR_FUNCTION_FAILED
;
TRACE
(
"squished (%s)
\n
"
,
debugstr_w
(
comp
));
rc
=
get_user_sid
(
&
usersid
);
if
(
rc
!=
ERROR_SUCCESS
||
!
usersid
)
if
(
!
szUserSid
)
{
ERR
(
"Failed to retrieve user SID: %d
\n
"
,
rc
);
return
rc
;
}
rc
=
get_user_sid
(
&
usersid
);
if
(
rc
!=
ERROR_SUCCESS
||
!
usersid
)
{
ERR
(
"Failed to retrieve user SID: %d
\n
"
,
rc
);
return
rc
;
}
sprintfW
(
keypath
,
szUserDataComp_fmt
,
usersid
,
comp
);
sprintfW
(
keypath
,
szUserDataComp_fmt
,
usersid
,
comp
);
LocalFree
(
usersid
);
}
else
sprintfW
(
keypath
,
szUserDataComp_fmt
,
szUserSid
,
comp
);
LocalFree
(
usersid
);
return
RegDeleteTreeW
(
HKEY_LOCAL_MACHINE
,
keypath
);
}
...
...
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