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
880b9199
Commit
880b9199
authored
Dec 14, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Dec 15, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add the ability to query a specific context for a patch.
parent
4a9f6995
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
14 deletions
+25
-14
msipriv.h
dlls/msi/msipriv.h
+2
-0
registry.c
dlls/msi/registry.c
+23
-14
No files found.
dlls/msi/msipriv.h
View file @
880b9199
...
...
@@ -778,6 +778,8 @@ extern UINT MSIREG_OpenUserDataComponentKey(LPCWSTR szComponent, LPCWSTR szUserS
extern
UINT
MSIREG_OpenPatchesKey
(
LPCWSTR
szPatch
,
HKEY
*
key
,
BOOL
create
);
extern
UINT
MSIREG_OpenUserDataProductKey
(
LPCWSTR
szProduct
,
MSIINSTALLCONTEXT
dwContext
,
LPCWSTR
szUserSid
,
HKEY
*
key
,
BOOL
create
);
extern
UINT
MSIREG_OpenUserDataPatchKey
(
LPCWSTR
szPatch
,
MSIINSTALLCONTEXT
dwContext
,
HKEY
*
key
,
BOOL
create
);
extern
UINT
MSIREG_OpenCurrentUserInstallProps
(
LPCWSTR
szProduct
,
HKEY
*
key
,
BOOL
create
);
extern
UINT
MSIREG_OpenInstallProps
(
LPCWSTR
szProduct
,
LPCWSTR
szUserSID
,
HKEY
*
key
,
BOOL
create
);
...
...
dlls/msi/registry.c
View file @
880b9199
...
...
@@ -837,30 +837,38 @@ UINT MSIREG_OpenUserDataProductKey(LPCWSTR szProduct, MSIINSTALLCONTEXT dwContex
return
rc
;
}
UINT
MSIREG_OpenUserDataPatchKey
(
LPWSTR
patch
,
HKEY
*
key
,
BOOL
create
)
UINT
MSIREG_OpenUserDataPatchKey
(
LPCWSTR
szPatch
,
MSIINSTALLCONTEXT
dwContext
,
HKEY
*
key
,
BOOL
create
)
{
UINT
rc
;
WCHAR
squished_patch
[
GUID_SIZE
];
WCHAR
keypath
[
0x200
];
LPWSTR
usersid
;
TRACE
(
"
\n
"
);
TRACE
(
"%s
\n
"
,
debugstr_w
(
szPatch
));
if
(
!
squash_guid
(
szPatch
,
squished_patch
))
return
ERROR_FUNCTION_FAILED
;
TRACE
(
"squished (%s)
\n
"
,
debugstr_w
(
squished_patch
));
rc
=
get_user_sid
(
&
usersid
);
if
(
rc
!=
ERROR_SUCCESS
||
!
usersid
)
if
(
dwContext
==
MSIINSTALLCONTEXT_MACHINE
)
sprintfW
(
keypath
,
szUserDataPatch_fmt
,
szLocalSid
,
squished_patch
);
else
{
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
,
szUserDataPatch_fmt
,
usersid
,
patch
);
sprintfW
(
keypath
,
szUserDataPatch_fmt
,
usersid
,
squished_patch
);
LocalFree
(
usersid
);
}
if
(
create
)
rc
=
RegCreateKeyW
(
HKEY_LOCAL_MACHINE
,
keypath
,
key
);
else
rc
=
RegOpenKeyW
(
HKEY_LOCAL_MACHINE
,
keypath
,
key
);
return
RegCreateKeyW
(
HKEY_LOCAL_MACHINE
,
keypath
,
key
);
LocalFree
(
usersid
);
return
rc
;
return
RegOpenKeyW
(
HKEY_LOCAL_MACHINE
,
keypath
,
key
);
}
UINT
MSIREG_OpenInstallProps
(
LPCWSTR
szProduct
,
LPCWSTR
szUserSID
,
...
...
@@ -1819,7 +1827,8 @@ static UINT msi_check_product_patches(LPCWSTR prodcode, LPCWSTR usersid,
}
else
{
temp
=
MSIREG_OpenUserDataPatchKey
(
ptr
,
&
patchkey
,
FALSE
);
temp
=
MSIREG_OpenUserDataPatchKey
(
patch
,
context
,
&
patchkey
,
FALSE
);
RegCloseKey
(
patchkey
);
if
(
temp
!=
ERROR_SUCCESS
)
continue
;
...
...
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