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
15823e1a
Commit
15823e1a
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 user product key exists, the product's state is advertised.
parent
e92f6655
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
20 deletions
+12
-20
msi.c
dlls/msi/msi.c
+9
-8
msi.c
dlls/msi/tests/msi.c
+3
-12
No files found.
dlls/msi/msi.c
View file @
15823e1a
...
...
@@ -762,7 +762,7 @@ INSTALLSTATE WINAPI MsiQueryProductStateA(LPCSTR szProduct)
INSTALLSTATE
WINAPI
MsiQueryProductStateW
(
LPCWSTR
szProduct
)
{
UINT
rc
;
INSTALLSTATE
rrc
=
INSTALLSTATE_UNKNOWN
;
INSTALLSTATE
state
=
INSTALLSTATE_UNKNOWN
;
HKEY
hkey
=
0
;
DWORD
sz
;
...
...
@@ -780,31 +780,32 @@ INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct)
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
state
=
INSTALLSTATE_ADVERTISED
;
RegCloseKey
(
hkey
);
rc
=
MSIREG_OpenUninstallKey
(
szProduct
,
&
hkey
,
FALSE
);
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
sz
=
sizeof
(
rrc
);
rc
=
RegQueryValueExW
(
hkey
,
szWindowsInstaller
,
NULL
,
NULL
,(
LPVOID
)
&
rrc
,
&
sz
);
sz
=
sizeof
(
state
);
rc
=
RegQueryValueExW
(
hkey
,
szWindowsInstaller
,
NULL
,
NULL
,(
LPVOID
)
&
state
,
&
sz
);
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
switch
(
rrc
)
switch
(
state
)
{
case
1
:
/* default */
rrc
=
INSTALLSTATE_DEFAULT
;
state
=
INSTALLSTATE_DEFAULT
;
break
;
default:
FIXME
(
"Unknown install state read from registry (%i)
\n
"
,
rrc
);
rrc
=
INSTALLSTATE_UNKNOWN
;
FIXME
(
"Unknown install state read from registry (%i)
\n
"
,
state
);
state
=
INSTALLSTATE_UNKNOWN
;
break
;
}
end:
RegCloseKey
(
hkey
);
return
rrc
;
return
state
;
}
INSTALLUILEVEL
WINAPI
MsiSetInternalUI
(
INSTALLUILEVEL
dwUILevel
,
HWND
*
phWnd
)
...
...
dlls/msi/tests/msi.c
View file @
15823e1a
...
...
@@ -377,10 +377,7 @@ static void test_MsiQueryProductState(void)
/* user product key exists */
state
=
MsiQueryProductStateA
(
prodcode
);
todo_wine
{
ok
(
state
==
INSTALLSTATE_ADVERTISED
,
"Expected INSTALLSTATE_ADVERTISED, got %d
\n
"
,
state
);
}
ok
(
state
==
INSTALLSTATE_ADVERTISED
,
"Expected INSTALLSTATE_ADVERTISED, got %d
\n
"
,
state
);
lstrcpyA
(
keypath
,
"Software
\\
Microsoft
\\
Windows
\\
CurrentVersion
\\
Installer
\\
UserData
\\
"
);
lstrcatA
(
keypath
,
usersid
);
...
...
@@ -392,20 +389,14 @@ static void test_MsiQueryProductState(void)
/* local product key exists */
state
=
MsiQueryProductStateA
(
prodcode
);
todo_wine
{
ok
(
state
==
INSTALLSTATE_ADVERTISED
,
"Expected INSTALLSTATE_ADVERTISED, got %d
\n
"
,
state
);
}
ok
(
state
==
INSTALLSTATE_ADVERTISED
,
"Expected INSTALLSTATE_ADVERTISED, got %d
\n
"
,
state
);
res
=
RegCreateKeyA
(
localkey
,
"InstallProperties"
,
&
props
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
/* install properties key exists */
state
=
MsiQueryProductStateA
(
prodcode
);
todo_wine
{
ok
(
state
==
INSTALLSTATE_ADVERTISED
,
"Expected INSTALLSTATE_ADVERTISED, got %d
\n
"
,
state
);
}
ok
(
state
==
INSTALLSTATE_ADVERTISED
,
"Expected INSTALLSTATE_ADVERTISED, got %d
\n
"
,
state
);
data
=
1
;
res
=
RegSetValueExA
(
props
,
"WindowsInstaller"
,
0
,
REG_DWORD
,
(
const
BYTE
*
)
&
data
,
sizeof
(
DWORD
));
...
...
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