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
58e15439
Commit
58e15439
authored
Jun 23, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Jun 24, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Fix the published location of the upgrade code for the machine context.
parent
301f2a5e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
3 deletions
+33
-3
action.c
dlls/msi/action.c
+9
-0
msipriv.h
dlls/msi/msipriv.h
+1
-0
registry.c
dlls/msi/registry.c
+23
-0
install.c
dlls/msi/tests/install.c
+0
-3
No files found.
dlls/msi/action.c
View file @
58e15439
...
...
@@ -3487,9 +3487,18 @@ static UINT msi_publish_upgrade_code(MSIPACKAGE *package)
if
(
!
upgrade
)
return
ERROR_SUCCESS
;
if
(
package
->
Context
==
MSIINSTALLCONTEXT_MACHINE
)
{
r
=
MSIREG_OpenClassesUpgradeCodesKey
(
upgrade
,
&
hkey
,
TRUE
);
if
(
r
!=
ERROR_SUCCESS
)
goto
done
;
}
else
{
r
=
MSIREG_OpenUserUpgradeCodesKey
(
upgrade
,
&
hkey
,
TRUE
);
if
(
r
!=
ERROR_SUCCESS
)
goto
done
;
}
squash_guid
(
package
->
ProductCode
,
squashed_pc
);
msi_reg_set_val_str
(
hkey
,
squashed_pc
,
NULL
);
...
...
dlls/msi/msipriv.h
View file @
58e15439
...
...
@@ -793,6 +793,7 @@ extern UINT MSIREG_DeleteUserFeaturesKey(LPCWSTR szProduct);
extern
UINT
MSIREG_DeleteLocalUserDataComponentKey
(
LPCWSTR
szComponent
);
extern
UINT
MSIREG_DeleteUserDataComponentKey
(
LPCWSTR
szComponent
);
extern
UINT
MSIREG_DeleteUserUpgradeCodesKey
(
LPCWSTR
szUpgradeCode
);
extern
UINT
MSIREG_OpenClassesUpgradeCodesKey
(
LPCWSTR
szUpgradeCode
,
HKEY
*
key
,
BOOL
create
);
extern
LPWSTR
msi_reg_get_val_str
(
HKEY
hkey
,
LPCWSTR
name
);
extern
BOOL
msi_reg_get_val_dword
(
HKEY
hkey
,
LPCWSTR
name
,
DWORD
*
val
);
...
...
dlls/msi/registry.c
View file @
58e15439
...
...
@@ -220,6 +220,11 @@ static const WCHAR szInstaller_LocalManagedProd_fmt[] = {
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'e'
,
'r'
,
'\\'
,
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
's'
,
'\\'
,
'%'
,
's'
,
0
};
static
const
WCHAR
szInstaller_ClassesUpgrade_fmt
[]
=
{
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'e'
,
'r'
,
'\\'
,
'U'
,
'p'
,
'g'
,
'r'
,
'a'
,
'd'
,
'e'
,
'C'
,
'o'
,
'd'
,
'e'
,
's'
,
'\\'
,
'%'
,
's'
,
0
};
static
const
WCHAR
localsid
[]
=
{
'S'
,
'-'
,
'1'
,
'-'
,
'5'
,
'-'
,
'1'
,
'8'
,
0
};
BOOL
unsquash_guid
(
LPCWSTR
in
,
LPWSTR
out
)
...
...
@@ -1123,6 +1128,24 @@ UINT MSIREG_OpenLocalManagedProductKey(LPCWSTR szProductCode, HKEY *key, BOOL cr
return
RegOpenKeyW
(
HKEY_LOCAL_MACHINE
,
keypath
,
key
);
}
UINT
MSIREG_OpenClassesUpgradeCodesKey
(
LPCWSTR
szUpgradeCode
,
HKEY
*
key
,
BOOL
create
)
{
WCHAR
squished_pc
[
GUID_SIZE
];
WCHAR
keypath
[
0x200
];
TRACE
(
"%s
\n
"
,
debugstr_w
(
szUpgradeCode
));
if
(
!
squash_guid
(
szUpgradeCode
,
squished_pc
))
return
ERROR_FUNCTION_FAILED
;
TRACE
(
"squished (%s)
\n
"
,
debugstr_w
(
squished_pc
));
sprintfW
(
keypath
,
szInstaller_ClassesUpgrade_fmt
,
squished_pc
);
if
(
create
)
return
RegCreateKeyW
(
HKEY_CLASSES_ROOT
,
keypath
,
key
);
return
RegOpenKeyW
(
HKEY_CLASSES_ROOT
,
keypath
,
key
);
}
/*************************************************************************
* MsiDecomposeDescriptorW [MSI.@]
*
...
...
dlls/msi/tests/install.c
View file @
58e15439
...
...
@@ -2649,12 +2649,9 @@ static void test_publish_publishproduct(void)
RegCloseKey
(
hkey
);
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
machup
,
&
hkey
);
todo_wine
{
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
CHECK_DEL_REG_STR
(
hkey
,
"84A88FD7F6998CE40A22FB59F6B9C2BB"
,
NULL
);
}
RegDeleteKeyA
(
hkey
,
""
);
RegCloseKey
(
hkey
);
...
...
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