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
0e44e090
Commit
0e44e090
authored
Jul 02, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Jul 03, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Set the WindowsInstaller value in RegisterProduct instead of PublishProduct.
parent
a2df31ae
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
13 deletions
+60
-13
action.c
dlls/msi/action.c
+19
-9
msipriv.h
dlls/msi/msipriv.h
+1
-0
registry.c
dlls/msi/registry.c
+39
-0
install.c
dlls/msi/tests/install.c
+1
-4
No files found.
dlls/msi/action.c
View file @
0e44e090
...
...
@@ -3279,10 +3279,6 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
{
'A'
,
'R'
,
'P'
,
'P'
,
'R'
,
'O'
,
'D'
,
'U'
,
'C'
,
'T'
,
'I'
,
'C'
,
'O'
,
'N'
,
0
};
static
const
WCHAR
szProductVersion
[]
=
{
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
szInstallProperties
[]
=
{
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'i'
,
'e'
,
's'
,
0
};
static
const
WCHAR
szWindowsInstaller
[]
=
{
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'e'
,
'r'
,
0
};
DWORD
langid
;
LPWSTR
buffer
;
DWORD
size
;
...
...
@@ -3315,12 +3311,10 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
rc
=
RegCreateKeyW
(
hudkey
,
szInstallProperties
,
&
props
);
rc
=
MSIREG_OpenInstallPropertiesKey
(
package
->
ProductCode
,
&
props
,
TRUE
);
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
msi_reg_set_val_dword
(
props
,
szWindowsInstaller
,
1
);
buffer
=
msi_dup_property
(
package
,
INSTALLPROPERTY_PRODUCTNAMEW
);
msi_reg_set_val_str
(
hukey
,
INSTALLPROPERTY_PRODUCTNAMEW
,
buffer
);
msi_free
(
buffer
);
...
...
@@ -3806,6 +3800,7 @@ static UINT msi_write_uninstall_property_vals( MSIPACKAGE *package, HKEY hkey )
static
UINT
ACTION_RegisterProduct
(
MSIPACKAGE
*
package
)
{
HKEY
hkey
=
0
;
HKEY
hudkey
=
0
,
props
=
0
;
LPWSTR
buffer
=
NULL
;
UINT
rc
;
DWORD
size
,
langid
;
...
...
@@ -3830,7 +3825,11 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package)
SYSTEMTIME
systime
;
static
const
WCHAR
date_fmt
[]
=
{
'%'
,
'i'
,
'%'
,
'i'
,
'%'
,
'i'
,
0
};
LPWSTR
upgrade_code
;
WCHAR
szDate
[
9
];
WCHAR
szDate
[
9
];
/* FIXME: also need to publish if the product is in advertise mode */
if
(
!
msi_check_publish
(
package
))
return
ERROR_SUCCESS
;
rc
=
MSIREG_OpenUninstallKey
(
package
->
ProductCode
,
&
hkey
,
TRUE
);
if
(
rc
!=
ERROR_SUCCESS
)
...
...
@@ -3892,7 +3891,18 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package)
RegCloseKey
(
hkey
);
/* FIXME: call ui_actiondata */
rc
=
MSIREG_OpenUserDataProductKey
(
package
->
ProductCode
,
&
hudkey
,
TRUE
);
if
(
rc
!=
ERROR_SUCCESS
)
return
rc
;
RegCloseKey
(
hudkey
);
rc
=
MSIREG_OpenInstallPropertiesKey
(
package
->
ProductCode
,
&
props
,
TRUE
);
if
(
rc
!=
ERROR_SUCCESS
)
return
rc
;
msi_reg_set_val_dword
(
props
,
szWindowsInstaller
,
1
);
RegCloseKey
(
props
);
return
ERROR_SUCCESS
;
}
...
...
dlls/msi/msipriv.h
View file @
0e44e090
...
...
@@ -709,6 +709,7 @@ extern UINT MSIREG_OpenComponentsKey(LPCWSTR szComponent, HKEY* key, BOOL create
extern
UINT
MSIREG_OpenProductsKey
(
LPCWSTR
szProduct
,
HKEY
*
key
,
BOOL
create
);
extern
UINT
MSIREG_OpenPatchesKey
(
LPCWSTR
szPatch
,
HKEY
*
key
,
BOOL
create
);
extern
UINT
MSIREG_OpenUserDataProductKey
(
LPCWSTR
szProduct
,
HKEY
*
key
,
BOOL
create
);
extern
UINT
MSIREG_OpenInstallPropertiesKey
(
LPCWSTR
szProduct
,
HKEY
*
key
,
BOOL
create
);
extern
UINT
MSIREG_OpenUserFeaturesKey
(
LPCWSTR
szProduct
,
HKEY
*
key
,
BOOL
create
);
extern
UINT
MSIREG_OpenUserComponentsKey
(
LPCWSTR
szComponent
,
HKEY
*
key
,
BOOL
create
);
extern
UINT
MSIREG_OpenUpgradeCodesKey
(
LPCWSTR
szProduct
,
HKEY
*
key
,
BOOL
create
);
...
...
dlls/msi/registry.c
View file @
0e44e090
...
...
@@ -166,6 +166,16 @@ static const WCHAR szUserDataProd_fmt[] = {
'U'
,
's'
,
'e'
,
'r'
,
'D'
,
'a'
,
't'
,
'a'
,
'\\'
,
'%'
,
's'
,
'\\'
,
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
's'
,
'\\'
,
'%'
,
's'
,
0
};
static
const
WCHAR
szInstallProperties_fmt
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'\\'
,
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'e'
,
'r'
,
'\\'
,
'U'
,
's'
,
'e'
,
'r'
,
'D'
,
'a'
,
't'
,
'a'
,
'\\'
,
'%'
,
's'
,
'\\'
,
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
's'
,
'\\'
,
'%'
,
's'
,
'\\'
,
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'i'
,
'e'
,
's'
,
0
};
#define SQUISH_GUID_SIZE 33
...
...
@@ -611,6 +621,35 @@ UINT MSIREG_OpenUserDataProductKey(LPCWSTR szProduct, HKEY *key, BOOL create)
return
rc
;
}
UINT
MSIREG_OpenInstallPropertiesKey
(
LPCWSTR
szProduct
,
HKEY
*
key
,
BOOL
create
)
{
UINT
rc
;
WCHAR
squished_pc
[
GUID_SIZE
];
WCHAR
keypath
[
0x200
];
LPWSTR
usersid
;
TRACE
(
"%s
\n
"
,
debugstr_w
(
szProduct
));
squash_guid
(
szProduct
,
squished_pc
);
TRACE
(
"squished (%s)
\n
"
,
debugstr_w
(
squished_pc
));
rc
=
get_user_sid
(
&
usersid
);
if
(
rc
!=
ERROR_SUCCESS
||
!
usersid
)
{
ERR
(
"Failed to retrieve user SID: %d
\n
"
,
rc
);
return
rc
;
}
sprintfW
(
keypath
,
szInstallProperties_fmt
,
usersid
,
squished_pc
);
if
(
create
)
rc
=
RegCreateKeyW
(
HKEY_LOCAL_MACHINE
,
keypath
,
key
);
else
rc
=
RegOpenKeyW
(
HKEY_LOCAL_MACHINE
,
keypath
,
key
);
msi_free
(
usersid
);
return
rc
;
}
UINT
MSIREG_DeleteUserDataProductKey
(
LPCWSTR
szProduct
)
{
UINT
rc
;
...
...
dlls/msi/tests/install.c
View file @
0e44e090
...
...
@@ -1683,10 +1683,7 @@ static void test_publish(void)
ok
(
pf_exists
(
"msitest"
),
"File not installed
\n
"
);
state
=
MsiQueryProductState
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
);
todo_wine
{
ok
(
state
==
INSTALLSTATE_ADVERTISED
,
"Expected INSTALLSTATE_ADVERTISED, got %d
\n
"
,
state
);
}
ok
(
state
==
INSTALLSTATE_ADVERTISED
,
"Expected INSTALLSTATE_ADVERTISED, got %d
\n
"
,
state
);
state
=
MsiQueryFeatureState
(
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
,
"feature"
);
ok
(
state
==
INSTALLSTATE_UNKNOWN
,
"Expected INSTALLSTATE_UNKNOWN, got %d
\n
"
,
state
);
...
...
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