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
24ede2f9
Commit
24ede2f9
authored
Jun 26, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Jun 27, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: If the UserData product key exists, but the user product key doesn't, the product is absent.
parent
3bf32f27
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
msi.c
dlls/msi/msi.c
+10
-5
msi.c
dlls/msi/tests/msi.c
+1
-4
No files found.
dlls/msi/msi.c
View file @
24ede2f9
...
@@ -765,6 +765,7 @@ INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct)
...
@@ -765,6 +765,7 @@ INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct)
INSTALLSTATE
state
=
INSTALLSTATE_UNKNOWN
;
INSTALLSTATE
state
=
INSTALLSTATE_UNKNOWN
;
HKEY
hkey
=
0
,
props
=
0
;
HKEY
hkey
=
0
,
props
=
0
;
DWORD
sz
;
DWORD
sz
;
BOOL
userkey_exists
=
FALSE
;
static
const
int
GUID_LEN
=
38
;
static
const
int
GUID_LEN
=
38
;
static
const
WCHAR
szInstallProperties
[]
=
{
static
const
WCHAR
szInstallProperties
[]
=
{
...
@@ -780,11 +781,12 @@ INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct)
...
@@ -780,11 +781,12 @@ INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct)
return
INSTALLSTATE_INVALIDARG
;
return
INSTALLSTATE_INVALIDARG
;
rc
=
MSIREG_OpenUserProductsKey
(
szProduct
,
&
hkey
,
FALSE
);
rc
=
MSIREG_OpenUserProductsKey
(
szProduct
,
&
hkey
,
FALSE
);
if
(
rc
!=
ERROR_SUCCESS
)
if
(
rc
==
ERROR_SUCCESS
)
goto
end
;
{
userkey_exists
=
TRUE
;
state
=
INSTALLSTATE_ADVERTISED
;
state
=
INSTALLSTATE_ADVERTISED
;
RegCloseKey
(
hkey
);
RegCloseKey
(
hkey
);
}
rc
=
MSIREG_OpenUserDataProductKey
(
szProduct
,
&
hkey
,
FALSE
);
rc
=
MSIREG_OpenUserDataProductKey
(
szProduct
,
&
hkey
,
FALSE
);
if
(
rc
!=
ERROR_SUCCESS
)
if
(
rc
!=
ERROR_SUCCESS
)
...
@@ -804,6 +806,9 @@ INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct)
...
@@ -804,6 +806,9 @@ INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct)
else
else
state
=
INSTALLSTATE_UNKNOWN
;
state
=
INSTALLSTATE_UNKNOWN
;
if
(
state
==
INSTALLSTATE_DEFAULT
&&
!
userkey_exists
)
state
=
INSTALLSTATE_ABSENT
;
end:
end:
RegCloseKey
(
props
);
RegCloseKey
(
props
);
RegCloseKey
(
hkey
);
RegCloseKey
(
hkey
);
...
...
dlls/msi/tests/msi.c
View file @
24ede2f9
...
@@ -439,10 +439,7 @@ static void test_MsiQueryProductState(void)
...
@@ -439,10 +439,7 @@ static void test_MsiQueryProductState(void)
/* user product key does not exist */
/* user product key does not exist */
state
=
MsiQueryProductStateA
(
prodcode
);
state
=
MsiQueryProductStateA
(
prodcode
);
todo_wine
ok
(
state
==
INSTALLSTATE_ABSENT
,
"Expected INSTALLSTATE_ABSENT, got %d
\n
"
,
state
);
{
ok
(
state
==
INSTALLSTATE_ABSENT
,
"Expected INSTALLSTATE_ABSENT, got %d
\n
"
,
state
);
}
LocalFree
(
usersid
);
LocalFree
(
usersid
);
RegDeleteValueA
(
props
,
"WindowsInstaller"
);
RegDeleteValueA
(
props
,
"WindowsInstaller"
);
...
...
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