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
5343a6f4
Commit
5343a6f4
authored
Nov 04, 2016
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 04, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Take the install context into account when deleting the product key.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2b0d2ec5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
9 deletions
+14
-9
action.c
dlls/msi/action.c
+2
-2
msipriv.h
dlls/msi/msipriv.h
+1
-1
registry.c
dlls/msi/registry.c
+11
-6
No files found.
dlls/msi/action.c
View file @
5343a6f4
...
...
@@ -5307,7 +5307,7 @@ static UINT msi_unpublish_product( MSIPACKAGE *package, const WCHAR *remove )
return
ERROR_SUCCESS
;
MSIREG_DeleteProductKey
(
package
->
ProductCode
);
MSIREG_DeleteUserDataProductKey
(
package
->
ProductCode
);
MSIREG_DeleteUserDataProductKey
(
package
->
ProductCode
,
package
->
Context
);
MSIREG_DeleteUninstallKey
(
package
->
ProductCode
,
package
->
platform
);
MSIREG_DeleteLocalClassesProductKey
(
package
->
ProductCode
);
...
...
@@ -5524,7 +5524,7 @@ static UINT ACTION_RegisterUser(MSIPACKAGE *package)
if
(
msi_check_unpublish
(
package
))
{
MSIREG_DeleteUserDataProductKey
(
package
->
ProductCode
);
MSIREG_DeleteUserDataProductKey
(
package
->
ProductCode
,
package
->
Context
);
goto
end
;
}
...
...
dlls/msi/msipriv.h
View file @
5343a6f4
...
...
@@ -915,7 +915,7 @@ extern UINT MSIREG_OpenUserUpgradeCodesKey(LPCWSTR szProduct, HKEY* key, BOOL cr
extern
UINT
MSIREG_DeleteProductKey
(
LPCWSTR
szProduct
)
DECLSPEC_HIDDEN
;
extern
UINT
MSIREG_DeleteUserProductKey
(
LPCWSTR
szProduct
)
DECLSPEC_HIDDEN
;
extern
UINT
MSIREG_DeleteUserDataPatchKey
(
LPCWSTR
patch
,
MSIINSTALLCONTEXT
context
)
DECLSPEC_HIDDEN
;
extern
UINT
MSIREG_DeleteUserDataProductKey
(
LPCWSTR
szProduct
)
DECLSPEC_HIDDEN
;
extern
UINT
MSIREG_DeleteUserDataProductKey
(
LPCWSTR
,
MSIINSTALLCONTEXT
)
DECLSPEC_HIDDEN
;
extern
UINT
MSIREG_DeleteUserFeaturesKey
(
LPCWSTR
szProduct
)
DECLSPEC_HIDDEN
;
extern
UINT
MSIREG_DeleteUserDataComponentKey
(
LPCWSTR
szComponent
,
LPCWSTR
szUserSid
)
DECLSPEC_HIDDEN
;
extern
UINT
MSIREG_DeleteUserUpgradeCodesKey
(
LPCWSTR
szUpgradeCode
)
DECLSPEC_HIDDEN
;
...
...
dlls/msi/registry.c
View file @
5343a6f4
...
...
@@ -852,7 +852,7 @@ UINT MSIREG_OpenInstallProps(LPCWSTR szProduct, MSIINSTALLCONTEXT dwContext, LPC
return
RegOpenKeyExW
(
HKEY_LOCAL_MACHINE
,
keypath
,
0
,
access
,
key
);
}
UINT
MSIREG_DeleteUserDataProductKey
(
LPCWSTR
szProduct
)
UINT
MSIREG_DeleteUserDataProductKey
(
LPCWSTR
szProduct
,
MSIINSTALLCONTEXT
context
)
{
REGSAM
access
=
KEY_WOW64_64KEY
|
KEY_ALL_ACCESS
;
WCHAR
*
usersid
,
squashed_pc
[
SQUASHED_GUID_SIZE
],
keypath
[
0x200
];
...
...
@@ -862,13 +862,18 @@ UINT MSIREG_DeleteUserDataProductKey(LPCWSTR szProduct)
if
(
!
squash_guid
(
szProduct
,
squashed_pc
))
return
ERROR_FUNCTION_FAILED
;
TRACE
(
"%s squashed %s
\n
"
,
debugstr_w
(
szProduct
),
debugstr_w
(
squashed_pc
));
if
(
!
(
usersid
=
get_user_sid
()))
if
(
context
==
MSIINSTALLCONTEXT_MACHINE
)
sprintfW
(
keypath
,
szUserDataProducts_fmt
,
szLocalSid
);
else
{
ERR
(
"Failed to retrieve user SID
\n
"
);
return
ERROR_FUNCTION_FAILED
;
if
(
!
(
usersid
=
get_user_sid
()))
{
ERR
(
"Failed to retrieve user SID
\n
"
);
return
ERROR_FUNCTION_FAILED
;
}
sprintfW
(
keypath
,
szUserDataProducts_fmt
,
usersid
);
LocalFree
(
usersid
);
}
sprintfW
(
keypath
,
szUserDataProducts_fmt
,
usersid
);
LocalFree
(
usersid
);
if
(
RegOpenKeyExW
(
HKEY_LOCAL_MACHINE
,
keypath
,
0
,
access
,
&
hkey
))
return
ERROR_SUCCESS
;
r
=
RegDeleteTreeW
(
hkey
,
squashed_pc
);
...
...
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