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
7258914e
Commit
7258914e
authored
Jul 13, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the official names for the Unicode string constants.
parent
bda7ace2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
58 deletions
+58
-58
action.c
dlls/msi/action.c
+13
-13
files.c
dlls/msi/files.c
+8
-8
msi.c
dlls/msi/msi.c
+15
-15
source.c
dlls/msi/source.c
+20
-20
upgrade.c
dlls/msi/upgrade.c
+2
-2
msi.h
include/msi.h
+0
-0
No files found.
dlls/msi/action.c
View file @
7258914e
...
...
@@ -3041,16 +3041,16 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
goto
end
;
buffer
=
load_dynamic_property
(
package
,
INSTALLPROPERTY_PRODUCTNAME
string
W
,
NULL
);
buffer
=
load_dynamic_property
(
package
,
INSTALLPROPERTY_PRODUCTNAMEW
,
NULL
);
size
=
strlenW
(
buffer
)
*
sizeof
(
WCHAR
);
RegSetValueExW
(
hukey
,
INSTALLPROPERTY_PRODUCTNAME
string
W
,
0
,
REG_SZ
,
RegSetValueExW
(
hukey
,
INSTALLPROPERTY_PRODUCTNAMEW
,
0
,
REG_SZ
,
(
LPBYTE
)
buffer
,
size
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
buffer
=
load_dynamic_property
(
package
,
szProductLanguage
,
NULL
);
size
=
sizeof
(
DWORD
);
langid
=
atoiW
(
buffer
);
RegSetValueExW
(
hukey
,
INSTALLPROPERTY_LANGUAGE
string
W
,
0
,
REG_DWORD
,
RegSetValueExW
(
hukey
,
INSTALLPROPERTY_LANGUAGEW
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
langid
,
size
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
...
...
@@ -3060,7 +3060,7 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
LPWSTR
path
;
build_icon_path
(
package
,
buffer
,
&
path
);
size
=
strlenW
(
path
)
*
sizeof
(
WCHAR
);
RegSetValueExW
(
hukey
,
INSTALLPROPERTY_PRODUCTICON
string
W
,
0
,
REG_SZ
,
RegSetValueExW
(
hukey
,
INSTALLPROPERTY_PRODUCTICONW
,
0
,
REG_SZ
,
(
LPBYTE
)
path
,
size
);
}
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
...
...
@@ -3070,7 +3070,7 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
{
DWORD
verdword
=
build_version_dword
(
buffer
);
size
=
sizeof
(
DWORD
);
RegSetValueExW
(
hukey
,
INSTALLPROPERTY_VERSION
string
W
,
0
,
REG_DWORD
,
(
LPBYTE
RegSetValueExW
(
hukey
,
INSTALLPROPERTY_VERSIONW
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
verdword
,
size
);
}
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
...
...
@@ -3094,7 +3094,7 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
if
(
ptr
)
*
ptr
=
0
;
squash_guid
(
guidbuffer
,
squashed
);
size
=
strlenW
(
squashed
)
*
sizeof
(
WCHAR
);
RegSetValueExW
(
hukey
,
INSTALLPROPERTY_PACKAGECODE
string
W
,
0
,
REG_SZ
,
RegSetValueExW
(
hukey
,
INSTALLPROPERTY_PACKAGECODEW
,
0
,
REG_SZ
,
(
LPBYTE
)
squashed
,
size
);
}
else
...
...
@@ -3530,7 +3530,7 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package)
debugstr_w
(
package
->
msiFilePath
),
debugstr_w
(
packagefile
),
GetLastError
());
size
=
strlenW
(
packagefile
)
*
sizeof
(
WCHAR
);
RegSetValueExW
(
hkey
,
INSTALLPROPERTY_LOCALPACKAGE
string
W
,
0
,
REG_SZ
,
RegSetValueExW
(
hkey
,
INSTALLPROPERTY_LOCALPACKAGEW
,
0
,
REG_SZ
,
(
LPBYTE
)
packagefile
,
size
);
/* do ModifyPath and UninstallString */
...
...
@@ -3548,13 +3548,13 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package)
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
sprintfW
(
buffer
,
date_fmt
,
systime
.
wYear
,
systime
.
wMonth
,
systime
.
wDay
);
size
=
strlenW
(
buffer
)
*
sizeof
(
WCHAR
);
RegSetValueExW
(
hkey
,
INSTALLPROPERTY_INSTALLDATE
string
W
,
0
,
REG_SZ
,
RegSetValueExW
(
hkey
,
INSTALLPROPERTY_INSTALLDATEW
,
0
,
REG_SZ
,
(
LPBYTE
)
buffer
,
size
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
buffer
=
load_dynamic_property
(
package
,
szProductLanguage
,
NULL
);
size
=
atoiW
(
buffer
);
RegSetValueExW
(
hkey
,
INSTALLPROPERTY_LANGUAGE
string
W
,
0
,
REG_DWORD
,
RegSetValueExW
(
hkey
,
INSTALLPROPERTY_LANGUAGEW
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
size
,
sizeof
(
DWORD
));
HeapFree
(
GetProcessHeap
(),
1
,
buffer
);
...
...
@@ -3565,11 +3565,11 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package)
DWORD
vermajor
=
verdword
>>
24
;
DWORD
verminor
=
(
verdword
>>
16
)
&
0x00FF
;
size
=
sizeof
(
DWORD
);
RegSetValueExW
(
hkey
,
INSTALLPROPERTY_VERSION
string
W
,
0
,
REG_DWORD
,
RegSetValueExW
(
hkey
,
INSTALLPROPERTY_VERSIONW
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
verdword
,
size
);
RegSetValueExW
(
hkey
,
INSTALLPROPERTY_VERSIONMAJOR
string
W
,
0
,
REG_DWORD
,
RegSetValueExW
(
hkey
,
INSTALLPROPERTY_VERSIONMAJORW
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
vermajor
,
size
);
RegSetValueExW
(
hkey
,
INSTALLPROPERTY_VERSIONMINOR
string
W
,
0
,
REG_DWORD
,
RegSetValueExW
(
hkey
,
INSTALLPROPERTY_VERSIONMINORW
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
verminor
,
size
);
}
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
...
...
@@ -3722,7 +3722,7 @@ static UINT ACTION_RegisterUser(MSIPACKAGE *package)
if
(
!
package
)
return
ERROR_INVALID_HANDLE
;
productid
=
load_dynamic_property
(
package
,
INSTALLPROPERTY_PRODUCTID
string
W
,
productid
=
load_dynamic_property
(
package
,
INSTALLPROPERTY_PRODUCTIDW
,
&
rc
);
if
(
!
productid
)
return
ERROR_SUCCESS
;
...
...
dlls/msi/files.c
View file @
7258914e
...
...
@@ -511,12 +511,12 @@ static UINT ready_media_for_file(MSIPACKAGE *package, int fileindex,
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_MEDIA
,
INSTALLPROPERTY_LASTUSEDSOURCE
string
W
,
last_path
);
INSTALLPROPERTY_LASTUSEDSOURCEW
,
last_path
);
else
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_NETWORK
,
INSTALLPROPERTY_LASTUSEDSOURCE
string
W
,
last_path
);
INSTALLPROPERTY_LASTUSEDSOURCEW
,
last_path
);
msiobj_release
(
&
row
->
hdr
);
return
rc
;
}
...
...
@@ -544,7 +544,7 @@ static UINT ready_media_for_file(MSIPACKAGE *package, int fileindex,
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_NETWORK
,
INSTALLPROPERTY_LASTUSEDSOURCE
string
W
,
path
);
INSTALLPROPERTY_LASTUSEDSOURCEW
,
path
);
HeapFree
(
GetProcessHeap
(),
0
,
path
);
}
...
...
@@ -568,12 +568,12 @@ static UINT ready_media_for_file(MSIPACKAGE *package, int fileindex,
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_MEDIA
,
INSTALLPROPERTY_LASTUSEDSOURCE
string
W
,
last_path
);
INSTALLPROPERTY_LASTUSEDSOURCEW
,
last_path
);
else
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_NETWORK
,
INSTALLPROPERTY_LASTUSEDSOURCE
string
W
,
last_path
);
INSTALLPROPERTY_LASTUSEDSOURCEW
,
last_path
);
/* extract the cab file into a folder in the temp folder */
sz
=
MAX_PATH
;
...
...
@@ -599,12 +599,12 @@ static UINT ready_media_for_file(MSIPACKAGE *package, int fileindex,
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_MEDIA
,
INSTALLPROPERTY_LASTUSEDSOURCE
string
W
,
last_path
);
INSTALLPROPERTY_LASTUSEDSOURCEW
,
last_path
);
else
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_NETWORK
,
INSTALLPROPERTY_LASTUSEDSOURCE
string
W
,
last_path
);
INSTALLPROPERTY_LASTUSEDSOURCEW
,
last_path
);
}
set_file_source
(
package
,
file
,
comp
,
last_path
);
...
...
@@ -669,7 +669,7 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_PACKAGENAME
string
W
,
ptr
);
INSTALLPROPERTY_PACKAGENAMEW
,
ptr
);
}
FIXME
(
"Write DiskPrompt
\n
"
);
...
...
dlls/msi/msi.c
View file @
7258914e
...
...
@@ -99,7 +99,7 @@ UINT WINAPI MsiOpenProductW(LPCWSTR szProduct, MSIHANDLE *phProduct)
/* find the size of the path */
type
=
count
=
0
;
r
=
RegQueryValueExW
(
hKeyProduct
,
INSTALLPROPERTY_LOCALPACKAGE
string
W
,
r
=
RegQueryValueExW
(
hKeyProduct
,
INSTALLPROPERTY_LOCALPACKAGEW
,
NULL
,
&
type
,
NULL
,
&
count
);
if
(
r
!=
ERROR_SUCCESS
)
{
...
...
@@ -112,7 +112,7 @@ UINT WINAPI MsiOpenProductW(LPCWSTR szProduct, MSIHANDLE *phProduct)
if
(
!
path
)
goto
end
;
r
=
RegQueryValueExW
(
hKeyProduct
,
INSTALLPROPERTY_LOCALPACKAGE
string
W
,
r
=
RegQueryValueExW
(
hKeyProduct
,
INSTALLPROPERTY_LOCALPACKAGEW
,
NULL
,
&
type
,
(
LPBYTE
)
path
,
&
count
);
if
(
r
!=
ERROR_SUCCESS
)
{
...
...
@@ -290,12 +290,12 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
sz
=
sizeof
(
sourcepath
);
MsiSourceListGetInfoW
(
szProduct
,
NULL
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_LASTUSEDSOURCE
string
W
,
sourcepath
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_LASTUSEDSOURCEW
,
sourcepath
,
&
sz
);
sz
=
sizeof
(
filename
);
MsiSourceListGetInfoW
(
szProduct
,
NULL
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_PACKAGENAME
string
W
,
filename
,
&
sz
);
MSICODE_PRODUCT
,
INSTALLPROPERTY_PACKAGENAMEW
,
filename
,
&
sz
);
strcatW
(
sourcepath
,
filename
);
...
...
@@ -530,7 +530,7 @@ UINT WINAPI MsiGetProductInfoW(LPCWSTR szProduct, LPCWSTR szAttribute,
return
ERROR_INVALID_PARAMETER
;
/* check for special properties */
if
(
strcmpW
(
szAttribute
,
INSTALLPROPERTY_PACKAGECODE
string
W
)
==
0
)
if
(
strcmpW
(
szAttribute
,
INSTALLPROPERTY_PACKAGECODEW
)
==
0
)
{
HKEY
hkey
;
WCHAR
squished
[
GUID_SIZE
];
...
...
@@ -541,7 +541,7 @@ UINT WINAPI MsiGetProductInfoW(LPCWSTR szProduct, LPCWSTR szAttribute,
if
(
r
!=
ERROR_SUCCESS
)
return
ERROR_UNKNOWN_PRODUCT
;
r
=
RegQueryValueExW
(
hkey
,
INSTALLPROPERTY_PACKAGECODE
string
W
,
NULL
,
NULL
,
r
=
RegQueryValueExW
(
hkey
,
INSTALLPROPERTY_PACKAGECODEW
,
NULL
,
NULL
,
(
LPBYTE
)
squished
,
&
sz
);
if
(
r
!=
ERROR_SUCCESS
)
{
...
...
@@ -562,7 +562,7 @@ UINT WINAPI MsiGetProductInfoW(LPCWSTR szProduct, LPCWSTR szAttribute,
RegCloseKey
(
hkey
);
r
=
ERROR_SUCCESS
;
}
else
if
(
strcmpW
(
szAttribute
,
INSTALLPROPERTY_VERSIONSTRING
string
W
)
==
0
)
else
if
(
strcmpW
(
szAttribute
,
INSTALLPROPERTY_VERSIONSTRINGW
)
==
0
)
{
r
=
MsiOpenProductW
(
szProduct
,
&
hProduct
);
if
(
ERROR_SUCCESS
!=
r
)
...
...
@@ -571,7 +571,7 @@ UINT WINAPI MsiGetProductInfoW(LPCWSTR szProduct, LPCWSTR szAttribute,
r
=
MsiGetPropertyW
(
hProduct
,
szProductVersion
,
szBuffer
,
pcchValueBuf
);
MsiCloseHandle
(
hProduct
);
}
else
if
(
strcmpW
(
szAttribute
,
INSTALLPROPERTY_ASSIGNMENTTYPE
string
W
)
==
0
)
else
if
(
strcmpW
(
szAttribute
,
INSTALLPROPERTY_ASSIGNMENTTYPEW
)
==
0
)
{
FIXME
(
"0 (zero) if advertised or per user , 1(one) if per machine.
\n
"
);
if
(
szBuffer
)
...
...
@@ -583,7 +583,7 @@ UINT WINAPI MsiGetProductInfoW(LPCWSTR szProduct, LPCWSTR szAttribute,
*
pcchValueBuf
=
1
;
r
=
ERROR_SUCCESS
;
}
else
if
(
strcmpW
(
szAttribute
,
INSTALLPROPERTY_LANGUAGE
string
W
)
==
0
)
else
if
(
strcmpW
(
szAttribute
,
INSTALLPROPERTY_LANGUAGEW
)
==
0
)
{
r
=
MsiOpenProductW
(
szProduct
,
&
hProduct
);
if
(
ERROR_SUCCESS
!=
r
)
...
...
@@ -1580,14 +1580,14 @@ USERINFOSTATE WINAPI MsiGetUserInfoW(LPCWSTR szProduct, LPWSTR lpUserNameBuf,
if
(
lpUserNameBuf
)
{
sz
=
*
lpUserNameBuf
*
sizeof
(
WCHAR
);
rc
=
RegQueryValueExW
(
hkey
,
INSTALLPROPERTY_REGOWNER
string
W
,
NULL
,
rc
=
RegQueryValueExW
(
hkey
,
INSTALLPROPERTY_REGOWNERW
,
NULL
,
NULL
,
(
LPBYTE
)
lpUserNameBuf
,
&
sz
);
}
if
(
!
lpUserNameBuf
&&
pcchUserNameBuf
)
{
sz
=
0
;
rc
=
RegQueryValueExW
(
hkey
,
INSTALLPROPERTY_REGOWNER
string
W
,
NULL
,
rc
=
RegQueryValueExW
(
hkey
,
INSTALLPROPERTY_REGOWNERW
,
NULL
,
NULL
,
NULL
,
&
sz
);
}
...
...
@@ -1597,13 +1597,13 @@ USERINFOSTATE WINAPI MsiGetUserInfoW(LPCWSTR szProduct, LPWSTR lpUserNameBuf,
if
(
lpOrgNameBuf
)
{
sz
=
*
pcchOrgNameBuf
*
sizeof
(
WCHAR
);
rc2
=
RegQueryValueExW
(
hkey
,
INSTALLPROPERTY_REGCOMPANY
string
W
,
NULL
,
rc2
=
RegQueryValueExW
(
hkey
,
INSTALLPROPERTY_REGCOMPANYW
,
NULL
,
NULL
,
(
LPBYTE
)
lpOrgNameBuf
,
&
sz
);
}
if
(
!
lpOrgNameBuf
&&
pcchOrgNameBuf
)
{
sz
=
0
;
rc2
=
RegQueryValueExW
(
hkey
,
INSTALLPROPERTY_REGCOMPANY
string
W
,
NULL
,
rc2
=
RegQueryValueExW
(
hkey
,
INSTALLPROPERTY_REGCOMPANYW
,
NULL
,
NULL
,
NULL
,
&
sz
);
}
...
...
@@ -1620,13 +1620,13 @@ USERINFOSTATE WINAPI MsiGetUserInfoW(LPCWSTR szProduct, LPWSTR lpUserNameBuf,
if
(
lpSerialBuf
)
{
sz
=
*
pcchSerialBuf
*
sizeof
(
WCHAR
);
RegQueryValueExW
(
hkey
,
INSTALLPROPERTY_PRODUCTID
string
W
,
NULL
,
NULL
,
RegQueryValueExW
(
hkey
,
INSTALLPROPERTY_PRODUCTIDW
,
NULL
,
NULL
,
(
LPBYTE
)
lpSerialBuf
,
&
sz
);
}
if
(
!
lpSerialBuf
&&
pcchSerialBuf
)
{
sz
=
0
;
rc
=
RegQueryValueExW
(
hkey
,
INSTALLPROPERTY_PRODUCTID
string
W
,
NULL
,
rc
=
RegQueryValueExW
(
hkey
,
INSTALLPROPERTY_PRODUCTIDW
,
NULL
,
NULL
,
NULL
,
&
sz
);
}
if
(
pcchSerialBuf
)
...
...
dlls/msi/source.c
View file @
7258914e
...
...
@@ -187,34 +187,34 @@ UINT WINAPI MsiSourceListGetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
if
(
rc
!=
ERROR_SUCCESS
)
return
ERROR_UNKNOWN_PRODUCT
;
if
(
strcmpW
(
szProperty
,
INSTALLPROPERTY_MEDIAPACKAGEPATH
string
W
)
==
0
)
if
(
strcmpW
(
szProperty
,
INSTALLPROPERTY_MEDIAPACKAGEPATHW
)
==
0
)
{
HKEY
key
;
rc
=
OpenMediaSubkey
(
sourcekey
,
&
key
,
FALSE
);
if
(
rc
==
ERROR_SUCCESS
)
rc
=
RegQueryValueExW
(
key
,
INSTALLPROPERTY_MEDIAPACKAGEPATH
string
W
,
rc
=
RegQueryValueExW
(
key
,
INSTALLPROPERTY_MEDIAPACKAGEPATHW
,
0
,
0
,
(
LPBYTE
)
szValue
,
pcchValue
);
if
(
rc
!=
ERROR_SUCCESS
&&
rc
!=
ERROR_MORE_DATA
)
rc
=
ERROR_UNKNOWN_PROPERTY
;
RegCloseKey
(
key
);
}
else
if
(
strcmpW
(
szProperty
,
INSTALLPROPERTY_DISKPROMPT
string
W
)
==
0
)
else
if
(
strcmpW
(
szProperty
,
INSTALLPROPERTY_DISKPROMPTW
)
==
0
)
{
HKEY
key
;
rc
=
OpenMediaSubkey
(
sourcekey
,
&
key
,
FALSE
);
if
(
rc
==
ERROR_SUCCESS
)
rc
=
RegQueryValueExW
(
key
,
INSTALLPROPERTY_DISKPROMPT
string
W
,
0
,
0
,
rc
=
RegQueryValueExW
(
key
,
INSTALLPROPERTY_DISKPROMPTW
,
0
,
0
,
(
LPBYTE
)
szValue
,
pcchValue
);
if
(
rc
!=
ERROR_SUCCESS
&&
rc
!=
ERROR_MORE_DATA
)
rc
=
ERROR_UNKNOWN_PROPERTY
;
RegCloseKey
(
key
);
}
else
if
(
strcmpW
(
szProperty
,
INSTALLPROPERTY_LASTUSEDSOURCE
string
W
)
==
0
)
else
if
(
strcmpW
(
szProperty
,
INSTALLPROPERTY_LASTUSEDSOURCEW
)
==
0
)
{
LPWSTR
buffer
;
DWORD
size
=
0
;
RegQueryValueExW
(
sourcekey
,
INSTALLPROPERTY_LASTUSEDSOURCE
string
W
,
0
,
0
,
RegQueryValueExW
(
sourcekey
,
INSTALLPROPERTY_LASTUSEDSOURCEW
,
0
,
0
,
NULL
,
&
size
);
if
(
size
==
0
)
rc
=
ERROR_UNKNOWN_PROPERTY
;
...
...
@@ -222,7 +222,7 @@ UINT WINAPI MsiSourceListGetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
{
LPWSTR
ptr
;
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
rc
=
RegQueryValueExW
(
sourcekey
,
INSTALLPROPERTY_LASTUSEDSOURCE
string
W
,
rc
=
RegQueryValueExW
(
sourcekey
,
INSTALLPROPERTY_LASTUSEDSOURCEW
,
0
,
0
,
(
LPBYTE
)
buffer
,
&
size
);
ptr
=
strchrW
(
buffer
,
';'
);
if
(
ptr
)
ptr
=
strchrW
(
ptr
+
1
,
';'
);
...
...
@@ -243,19 +243,19 @@ UINT WINAPI MsiSourceListGetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
}
}
else
if
(
strcmpW
(
INSTALLPROPERTY_LASTUSEDTYPE
string
W
,
szProperty
)
==
0
)
else
if
(
strcmpW
(
INSTALLPROPERTY_LASTUSEDTYPEW
,
szProperty
)
==
0
)
{
LPWSTR
buffer
;
DWORD
size
=
0
;
RegQueryValueExW
(
sourcekey
,
INSTALLPROPERTY_LASTUSEDSOURCE
string
W
,
0
,
0
,
RegQueryValueExW
(
sourcekey
,
INSTALLPROPERTY_LASTUSEDSOURCEW
,
0
,
0
,
NULL
,
&
size
);
if
(
size
==
0
)
rc
=
ERROR_UNKNOWN_PROPERTY
;
else
{
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
rc
=
RegQueryValueExW
(
sourcekey
,
INSTALLPROPERTY_LASTUSEDSOURCE
string
W
,
rc
=
RegQueryValueExW
(
sourcekey
,
INSTALLPROPERTY_LASTUSEDSOURCEW
,
0
,
0
,
(
LPBYTE
)
buffer
,
&
size
);
if
(
*
pcchValue
<
1
)
{
...
...
@@ -270,9 +270,9 @@ UINT WINAPI MsiSourceListGetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
}
}
else
if
(
strcmpW
(
INSTALLPROPERTY_PACKAGENAME
string
W
,
szProperty
)
==
0
)
else
if
(
strcmpW
(
INSTALLPROPERTY_PACKAGENAMEW
,
szProperty
)
==
0
)
{
rc
=
RegQueryValueExW
(
sourcekey
,
INSTALLPROPERTY_PACKAGENAME
string
W
,
0
,
0
,
rc
=
RegQueryValueExW
(
sourcekey
,
INSTALLPROPERTY_PACKAGENAMEW
,
0
,
0
,
(
LPBYTE
)
szValue
,
pcchValue
);
if
(
rc
!=
ERROR_SUCCESS
&&
rc
!=
ERROR_MORE_DATA
)
rc
=
ERROR_UNKNOWN_PROPERTY
;
...
...
@@ -324,31 +324,31 @@ UINT WINAPI MsiSourceListSetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
return
ERROR_UNKNOWN_PRODUCT
;
if
(
strcmpW
(
szProperty
,
INSTALLPROPERTY_MEDIAPACKAGEPATH
string
W
)
==
0
)
if
(
strcmpW
(
szProperty
,
INSTALLPROPERTY_MEDIAPACKAGEPATHW
)
==
0
)
{
HKEY
key
;
DWORD
size
=
lstrlenW
(
szValue
)
*
sizeof
(
WCHAR
);
rc
=
OpenMediaSubkey
(
sourcekey
,
&
key
,
FALSE
);
if
(
rc
==
ERROR_SUCCESS
)
rc
=
RegSetValueExW
(
key
,
INSTALLPROPERTY_MEDIAPACKAGEPATH
string
W
,
0
,
rc
=
RegSetValueExW
(
key
,
INSTALLPROPERTY_MEDIAPACKAGEPATHW
,
0
,
REG_SZ
,
(
LPBYTE
)
szValue
,
size
);
if
(
rc
!=
ERROR_SUCCESS
)
rc
=
ERROR_UNKNOWN_PROPERTY
;
RegCloseKey
(
key
);
}
else
if
(
strcmpW
(
szProperty
,
INSTALLPROPERTY_DISKPROMPT
string
W
)
==
0
)
else
if
(
strcmpW
(
szProperty
,
INSTALLPROPERTY_DISKPROMPTW
)
==
0
)
{
HKEY
key
;
DWORD
size
=
lstrlenW
(
szValue
)
*
sizeof
(
WCHAR
);
rc
=
OpenMediaSubkey
(
sourcekey
,
&
key
,
FALSE
);
if
(
rc
==
ERROR_SUCCESS
)
rc
=
RegSetValueExW
(
key
,
INSTALLPROPERTY_DISKPROMPT
string
W
,
0
,
rc
=
RegSetValueExW
(
key
,
INSTALLPROPERTY_DISKPROMPTW
,
0
,
REG_SZ
,
(
LPBYTE
)
szValue
,
size
);
if
(
rc
!=
ERROR_SUCCESS
)
rc
=
ERROR_UNKNOWN_PROPERTY
;
RegCloseKey
(
key
);
}
else
if
(
strcmpW
(
szProperty
,
INSTALLPROPERTY_LASTUSEDSOURCE
string
W
)
==
0
)
else
if
(
strcmpW
(
szProperty
,
INSTALLPROPERTY_LASTUSEDSOURCEW
)
==
0
)
{
LPWSTR
buffer
=
NULL
;
DWORD
size
;
...
...
@@ -371,16 +371,16 @@ UINT WINAPI MsiSourceListSetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
size
=
(
lstrlenW
(
szValue
)
+
5
)
*
sizeof
(
WCHAR
);
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
sprintfW
(
buffer
,
LastUsedSource_Fmt
,
typechar
,
1
,
szValue
);
rc
=
RegSetValueExW
(
sourcekey
,
INSTALLPROPERTY_LASTUSEDSOURCE
string
W
,
0
,
rc
=
RegSetValueExW
(
sourcekey
,
INSTALLPROPERTY_LASTUSEDSOURCEW
,
0
,
REG_EXPAND_SZ
,
(
LPBYTE
)
buffer
,
size
);
if
(
rc
!=
ERROR_SUCCESS
)
rc
=
ERROR_UNKNOWN_PROPERTY
;
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
}
else
if
(
strcmpW
(
INSTALLPROPERTY_PACKAGENAME
string
W
,
szProperty
)
==
0
)
else
if
(
strcmpW
(
INSTALLPROPERTY_PACKAGENAMEW
,
szProperty
)
==
0
)
{
DWORD
size
=
lstrlenW
(
szValue
)
*
sizeof
(
WCHAR
);
rc
=
RegSetValueExW
(
sourcekey
,
INSTALLPROPERTY_PACKAGENAME
string
W
,
0
,
rc
=
RegSetValueExW
(
sourcekey
,
INSTALLPROPERTY_PACKAGENAMEW
,
0
,
REG_SZ
,
(
LPBYTE
)
szValue
,
size
);
if
(
rc
!=
ERROR_SUCCESS
)
rc
=
ERROR_UNKNOWN_PROPERTY
;
...
...
dlls/msi/upgrade.c
View file @
7258914e
...
...
@@ -147,7 +147,7 @@ static UINT ITERATE_FindRelatedProducts(MSIRECORD *rec, LPVOID param)
}
sz
=
sizeof
(
DWORD
);
RegQueryValueExW
(
hukey
,
INSTALLPROPERTY_VERSION
string
W
,
NULL
,
NULL
,
RegQueryValueExW
(
hukey
,
INSTALLPROPERTY_VERSIONW
,
NULL
,
NULL
,
(
LPBYTE
)
&
check
,
&
sz
);
/* check min */
ver
=
MSI_RecordGetString
(
rec
,
2
);
...
...
@@ -175,7 +175,7 @@ static UINT ITERATE_FindRelatedProducts(MSIRECORD *rec, LPVOID param)
/* check language*/
sz
=
sizeof
(
DWORD
);
RegQueryValueExW
(
hukey
,
INSTALLPROPERTY_LANGUAGE
string
W
,
NULL
,
NULL
,
RegQueryValueExW
(
hukey
,
INSTALLPROPERTY_LANGUAGEW
,
NULL
,
NULL
,
(
LPBYTE
)
&
check
,
&
sz
);
RegCloseKey
(
hukey
);
language
=
MSI_RecordGetString
(
rec
,
4
);
...
...
include/msi.h
View file @
7258914e
This diff is collapsed.
Click to expand it.
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