Use the strings defined in msi.h.
This commit is contained in:
parent
de7a621b06
commit
c6d24d235a
|
@ -3007,22 +3007,12 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
|
||||||
/* for registry stuff */
|
/* for registry stuff */
|
||||||
HKEY hkey=0;
|
HKEY hkey=0;
|
||||||
HKEY hukey=0;
|
HKEY hukey=0;
|
||||||
static const WCHAR szProductName[] =
|
|
||||||
{'P','r','o','d','u','c','t','N','a','m','e',0};
|
|
||||||
static const WCHAR szPackageCode[] =
|
|
||||||
{'P','a','c','k','a','g','e','C','o','d','e',0};
|
|
||||||
static const WCHAR szLanguage[] =
|
|
||||||
{'L','a','n','g','u','a','g','e',0};
|
|
||||||
static const WCHAR szProductLanguage[] =
|
static const WCHAR szProductLanguage[] =
|
||||||
{'P','r','o','d','u','c','t','L','a','n','g','u','a','g','e',0};
|
{'P','r','o','d','u','c','t','L','a','n','g','u','a','g','e',0};
|
||||||
static const WCHAR szProductIcon[] =
|
|
||||||
{'P','r','o','d','u','c','t','I','c','o','n',0};
|
|
||||||
static const WCHAR szARPProductIcon[] =
|
static const WCHAR szARPProductIcon[] =
|
||||||
{'A','R','P','P','R','O','D','U','C','T','I','C','O','N',0};
|
{'A','R','P','P','R','O','D','U','C','T','I','C','O','N',0};
|
||||||
static const WCHAR szProductVersion[] =
|
static const WCHAR szProductVersion[] =
|
||||||
{'P','r','o','d','u','c','t','V','e','r','s','i','o','n',0};
|
{'P','r','o','d','u','c','t','V','e','r','s','i','o','n',0};
|
||||||
static const WCHAR szVersion[] =
|
|
||||||
{'V','e','r','s','i','o','n',0};
|
|
||||||
DWORD langid;
|
DWORD langid;
|
||||||
LPWSTR buffer;
|
LPWSTR buffer;
|
||||||
DWORD size;
|
DWORD size;
|
||||||
|
@ -3051,15 +3041,17 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
|
||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
|
|
||||||
buffer = load_dynamic_property(package,szProductName,NULL);
|
buffer = load_dynamic_property(package,INSTALLPROPERTY_PRODUCTNAMEstringW,NULL);
|
||||||
size = strlenW(buffer)*sizeof(WCHAR);
|
size = strlenW(buffer)*sizeof(WCHAR);
|
||||||
RegSetValueExW(hukey,szProductName,0,REG_SZ, (LPBYTE)buffer,size);
|
RegSetValueExW(hukey,INSTALLPROPERTY_PRODUCTNAMEstringW,0,REG_SZ,
|
||||||
|
(LPBYTE)buffer,size);
|
||||||
HeapFree(GetProcessHeap(),0,buffer);
|
HeapFree(GetProcessHeap(),0,buffer);
|
||||||
|
|
||||||
buffer = load_dynamic_property(package,szProductLanguage,NULL);
|
buffer = load_dynamic_property(package,szProductLanguage,NULL);
|
||||||
size = sizeof(DWORD);
|
size = sizeof(DWORD);
|
||||||
langid = atoiW(buffer);
|
langid = atoiW(buffer);
|
||||||
RegSetValueExW(hukey,szLanguage,0,REG_DWORD, (LPBYTE)&langid,size);
|
RegSetValueExW(hukey,INSTALLPROPERTY_LANGUAGEstringW,0,REG_DWORD,
|
||||||
|
(LPBYTE)&langid,size);
|
||||||
HeapFree(GetProcessHeap(),0,buffer);
|
HeapFree(GetProcessHeap(),0,buffer);
|
||||||
|
|
||||||
buffer = load_dynamic_property(package,szARPProductIcon,NULL);
|
buffer = load_dynamic_property(package,szARPProductIcon,NULL);
|
||||||
|
@ -3068,7 +3060,8 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
|
||||||
LPWSTR path;
|
LPWSTR path;
|
||||||
build_icon_path(package,buffer,&path);
|
build_icon_path(package,buffer,&path);
|
||||||
size = strlenW(path) * sizeof(WCHAR);
|
size = strlenW(path) * sizeof(WCHAR);
|
||||||
RegSetValueExW(hukey,szProductIcon,0,REG_SZ, (LPBYTE)path,size);
|
RegSetValueExW(hukey,INSTALLPROPERTY_PRODUCTICONstringW,0,REG_SZ,
|
||||||
|
(LPBYTE)path,size);
|
||||||
}
|
}
|
||||||
HeapFree(GetProcessHeap(),0,buffer);
|
HeapFree(GetProcessHeap(),0,buffer);
|
||||||
|
|
||||||
|
@ -3077,7 +3070,8 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
|
||||||
{
|
{
|
||||||
DWORD verdword = build_version_dword(buffer);
|
DWORD verdword = build_version_dword(buffer);
|
||||||
size = sizeof(DWORD);
|
size = sizeof(DWORD);
|
||||||
RegSetValueExW(hukey,szVersion,0,REG_DWORD, (LPBYTE)&verdword,size);
|
RegSetValueExW(hukey,INSTALLPROPERTY_VERSIONstringW,0,REG_DWORD, (LPBYTE
|
||||||
|
)&verdword,size);
|
||||||
}
|
}
|
||||||
HeapFree(GetProcessHeap(),0,buffer);
|
HeapFree(GetProcessHeap(),0,buffer);
|
||||||
|
|
||||||
|
@ -3100,8 +3094,8 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
|
||||||
if (ptr) *ptr = 0;
|
if (ptr) *ptr = 0;
|
||||||
squash_guid(guidbuffer,squashed);
|
squash_guid(guidbuffer,squashed);
|
||||||
size = strlenW(squashed)*sizeof(WCHAR);
|
size = strlenW(squashed)*sizeof(WCHAR);
|
||||||
RegSetValueExW(hukey,szPackageCode,0,REG_SZ, (LPBYTE)squashed,
|
RegSetValueExW(hukey,INSTALLPROPERTY_PACKAGECODEstringW,0,REG_SZ,
|
||||||
size);
|
(LPBYTE)squashed, size);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -3457,8 +3451,6 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package)
|
||||||
'%','s','\\',
|
'%','s','\\',
|
||||||
'I','n','s','t','a','l','l','e','r','\\',
|
'I','n','s','t','a','l','l','e','r','\\',
|
||||||
'%','x','.','m','s','i',0};
|
'%','x','.','m','s','i',0};
|
||||||
static const WCHAR szLocalPackage[]=
|
|
||||||
{'L','o','c','a','l','P','a','c','k','a','g','e',0};
|
|
||||||
static const WCHAR szUpgradeCode[] =
|
static const WCHAR szUpgradeCode[] =
|
||||||
{'U','p','g','r','a','d','e','C','o','d','e',0};
|
{'U','p','g','r','a','d','e','C','o','d','e',0};
|
||||||
static const WCHAR modpath_fmt[] =
|
static const WCHAR modpath_fmt[] =
|
||||||
|
@ -3469,20 +3461,10 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package)
|
||||||
{'U','n','i','n','s','t','a','l','l','S','t','r','i','n','g',0};
|
{'U','n','i','n','s','t','a','l','l','S','t','r','i','n','g',0};
|
||||||
static const WCHAR szEstimatedSize[] =
|
static const WCHAR szEstimatedSize[] =
|
||||||
{'E','s','t','i','m','a','t','e','d','S','i','z','e',0};
|
{'E','s','t','i','m','a','t','e','d','S','i','z','e',0};
|
||||||
static const WCHAR szInstallDate[] =
|
|
||||||
{'I','n','s','t','a','l','l','D','a','t','e',0};
|
|
||||||
static const WCHAR szLanguage[] =
|
|
||||||
{'L','a','n','g','u','a','g','e',0};
|
|
||||||
static const WCHAR szProductLanguage[] =
|
static const WCHAR szProductLanguage[] =
|
||||||
{'P','r','o','d','u','c','t','L','a','n','g','u','a','g','e',0};
|
{'P','r','o','d','u','c','t','L','a','n','g','u','a','g','e',0};
|
||||||
static const WCHAR szProductVersion[] =
|
static const WCHAR szProductVersion[] =
|
||||||
{'P','r','o','d','u','c','t','V','e','r','s','i','o','n',0};
|
{'P','r','o','d','u','c','t','V','e','r','s','i','o','n',0};
|
||||||
static const WCHAR szVersion[] =
|
|
||||||
{'V','e','r','s','i','o','n',0};
|
|
||||||
static const WCHAR szVersionMajor[] =
|
|
||||||
{'V','e','r','s','i','o','n','M','a','j','o','r',0};
|
|
||||||
static const WCHAR szVersionMinor[] =
|
|
||||||
{'V','e','r','s','i','o','n','M','i','n','o','r',0};
|
|
||||||
|
|
||||||
SYSTEMTIME systime;
|
SYSTEMTIME systime;
|
||||||
static const WCHAR date_fmt[] = {'%','i','%','i','%','i',0};
|
static const WCHAR date_fmt[] = {'%','i','%','i','%','i',0};
|
||||||
|
@ -3548,7 +3530,8 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package)
|
||||||
debugstr_w(package->msiFilePath), debugstr_w(packagefile),
|
debugstr_w(package->msiFilePath), debugstr_w(packagefile),
|
||||||
GetLastError());
|
GetLastError());
|
||||||
size = strlenW(packagefile)*sizeof(WCHAR);
|
size = strlenW(packagefile)*sizeof(WCHAR);
|
||||||
RegSetValueExW(hkey,szLocalPackage,0,REG_SZ,(LPBYTE)packagefile,size);
|
RegSetValueExW(hkey,INSTALLPROPERTY_LOCALPACKAGEstringW,0,REG_SZ,
|
||||||
|
(LPBYTE)packagefile,size);
|
||||||
|
|
||||||
/* do ModifyPath and UninstallString */
|
/* do ModifyPath and UninstallString */
|
||||||
size = deformat_string(package,modpath_fmt,&buffer);
|
size = deformat_string(package,modpath_fmt,&buffer);
|
||||||
|
@ -3565,12 +3548,14 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package)
|
||||||
buffer= HeapAlloc(GetProcessHeap(),0,size);
|
buffer= HeapAlloc(GetProcessHeap(),0,size);
|
||||||
sprintfW(buffer,date_fmt,systime.wYear,systime.wMonth,systime.wDay);
|
sprintfW(buffer,date_fmt,systime.wYear,systime.wMonth,systime.wDay);
|
||||||
size = strlenW(buffer)*sizeof(WCHAR);
|
size = strlenW(buffer)*sizeof(WCHAR);
|
||||||
RegSetValueExW(hkey,szInstallDate,0,REG_SZ,(LPBYTE)buffer,size);
|
RegSetValueExW(hkey,INSTALLPROPERTY_INSTALLDATEstringW,0,REG_SZ,
|
||||||
|
(LPBYTE)buffer,size);
|
||||||
HeapFree(GetProcessHeap(),0,buffer);
|
HeapFree(GetProcessHeap(),0,buffer);
|
||||||
|
|
||||||
buffer = load_dynamic_property(package,szProductLanguage,NULL);
|
buffer = load_dynamic_property(package,szProductLanguage,NULL);
|
||||||
size = atoiW(buffer);
|
size = atoiW(buffer);
|
||||||
RegSetValueExW(hkey,szLanguage,0,REG_DWORD, (LPBYTE)&size,sizeof(DWORD));
|
RegSetValueExW(hkey,INSTALLPROPERTY_LANGUAGEstringW,0,REG_DWORD,
|
||||||
|
(LPBYTE)&size,sizeof(DWORD));
|
||||||
HeapFree(GetProcessHeap(),1,buffer);
|
HeapFree(GetProcessHeap(),1,buffer);
|
||||||
|
|
||||||
buffer = load_dynamic_property(package,szProductVersion,NULL);
|
buffer = load_dynamic_property(package,szProductVersion,NULL);
|
||||||
|
@ -3580,9 +3565,12 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package)
|
||||||
DWORD vermajor = verdword>>24;
|
DWORD vermajor = verdword>>24;
|
||||||
DWORD verminor = (verdword>>16)&0x00FF;
|
DWORD verminor = (verdword>>16)&0x00FF;
|
||||||
size = sizeof(DWORD);
|
size = sizeof(DWORD);
|
||||||
RegSetValueExW(hkey,szVersion,0,REG_DWORD,(LPBYTE)&verdword,size);
|
RegSetValueExW(hkey,INSTALLPROPERTY_VERSIONstringW,0,REG_DWORD,
|
||||||
RegSetValueExW(hkey,szVersionMajor,0,REG_DWORD,(LPBYTE)&vermajor,size);
|
(LPBYTE)&verdword,size);
|
||||||
RegSetValueExW(hkey,szVersionMinor,0,REG_DWORD,(LPBYTE)&verminor,size);
|
RegSetValueExW(hkey,INSTALLPROPERTY_VERSIONMAJORstringW,0,REG_DWORD,
|
||||||
|
(LPBYTE)&vermajor,size);
|
||||||
|
RegSetValueExW(hkey,INSTALLPROPERTY_VERSIONMINORstringW,0,REG_DWORD,
|
||||||
|
(LPBYTE)&verminor,size);
|
||||||
}
|
}
|
||||||
HeapFree(GetProcessHeap(),0,buffer);
|
HeapFree(GetProcessHeap(),0,buffer);
|
||||||
|
|
||||||
|
@ -3709,8 +3697,6 @@ UINT ACTION_ResolveSource(MSIPACKAGE* package)
|
||||||
|
|
||||||
static UINT ACTION_RegisterUser(MSIPACKAGE *package)
|
static UINT ACTION_RegisterUser(MSIPACKAGE *package)
|
||||||
{
|
{
|
||||||
static const WCHAR szProductID[]=
|
|
||||||
{'P','r','o','d','u','c','t','I','D',0};
|
|
||||||
HKEY hkey=0;
|
HKEY hkey=0;
|
||||||
LPWSTR buffer;
|
LPWSTR buffer;
|
||||||
LPWSTR productid;
|
LPWSTR productid;
|
||||||
|
@ -3736,7 +3722,8 @@ static UINT ACTION_RegisterUser(MSIPACKAGE *package)
|
||||||
if (!package)
|
if (!package)
|
||||||
return ERROR_INVALID_HANDLE;
|
return ERROR_INVALID_HANDLE;
|
||||||
|
|
||||||
productid = load_dynamic_property(package,szProductID,&rc);
|
productid = load_dynamic_property(package,INSTALLPROPERTY_PRODUCTIDstringW,
|
||||||
|
&rc);
|
||||||
if (!productid)
|
if (!productid)
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
|
|
||||||
|
|
|
@ -83,9 +83,6 @@ UINT WINAPI MsiOpenProductA(LPCSTR szProduct, MSIHANDLE *phProduct)
|
||||||
|
|
||||||
UINT WINAPI MsiOpenProductW(LPCWSTR szProduct, MSIHANDLE *phProduct)
|
UINT WINAPI MsiOpenProductW(LPCWSTR szProduct, MSIHANDLE *phProduct)
|
||||||
{
|
{
|
||||||
static const WCHAR szLocalPackage[] = {
|
|
||||||
'L','o','c','a','l','P','a','c','k','a','g','e', 0
|
|
||||||
};
|
|
||||||
LPWSTR path = NULL;
|
LPWSTR path = NULL;
|
||||||
UINT r;
|
UINT r;
|
||||||
HKEY hKeyProduct = NULL;
|
HKEY hKeyProduct = NULL;
|
||||||
|
@ -102,7 +99,7 @@ UINT WINAPI MsiOpenProductW(LPCWSTR szProduct, MSIHANDLE *phProduct)
|
||||||
|
|
||||||
/* find the size of the path */
|
/* find the size of the path */
|
||||||
type = count = 0;
|
type = count = 0;
|
||||||
r = RegQueryValueExW( hKeyProduct, szLocalPackage,
|
r = RegQueryValueExW( hKeyProduct, INSTALLPROPERTY_LOCALPACKAGEstringW,
|
||||||
NULL, &type, NULL, &count );
|
NULL, &type, NULL, &count );
|
||||||
if( r != ERROR_SUCCESS )
|
if( r != ERROR_SUCCESS )
|
||||||
{
|
{
|
||||||
|
@ -115,7 +112,7 @@ UINT WINAPI MsiOpenProductW(LPCWSTR szProduct, MSIHANDLE *phProduct)
|
||||||
if( !path )
|
if( !path )
|
||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
r = RegQueryValueExW( hKeyProduct, szLocalPackage,
|
r = RegQueryValueExW( hKeyProduct, INSTALLPROPERTY_LOCALPACKAGEstringW,
|
||||||
NULL, &type, (LPBYTE) path, &count );
|
NULL, &type, (LPBYTE) path, &count );
|
||||||
if( r != ERROR_SUCCESS )
|
if( r != ERROR_SUCCESS )
|
||||||
{
|
{
|
||||||
|
@ -527,16 +524,8 @@ UINT WINAPI MsiGetProductInfoW(LPCWSTR szProduct, LPCWSTR szAttribute,
|
||||||
{
|
{
|
||||||
MSIHANDLE hProduct;
|
MSIHANDLE hProduct;
|
||||||
UINT r;
|
UINT r;
|
||||||
static const WCHAR szPackageCode[] =
|
|
||||||
{'P','a','c','k','a','g','e','C','o','d','e',0};
|
|
||||||
static const WCHAR szVersionString[] =
|
|
||||||
{'V','e','r','s','i','o','n','S','t','r','i','n','g',0};
|
|
||||||
static const WCHAR szProductVersion[] =
|
static const WCHAR szProductVersion[] =
|
||||||
{'P','r','o','d','u','c','t','V','e','r','s','i','o','n',0};
|
{'P','r','o','d','u','c','t','V','e','r','s','i','o','n',0};
|
||||||
static const WCHAR szAssignmentType[] =
|
|
||||||
{'A','s','s','i','g','n','m','e','n','t','T','y','p','e',0};
|
|
||||||
static const WCHAR szLanguage[] =
|
|
||||||
{'L','a','n','g','u','a','g','e',0};
|
|
||||||
static const WCHAR szProductLanguage[] =
|
static const WCHAR szProductLanguage[] =
|
||||||
{'P','r','o','d','u','c','t','L','a','n','g','u','a','g','e',0};
|
{'P','r','o','d','u','c','t','L','a','n','g','u','a','g','e',0};
|
||||||
|
|
||||||
|
@ -549,7 +538,7 @@ UINT WINAPI MsiGetProductInfoW(LPCWSTR szProduct, LPCWSTR szAttribute,
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
/* check for special properties */
|
/* check for special properties */
|
||||||
if (strcmpW(szAttribute, szPackageCode)==0)
|
if (strcmpW(szAttribute, INSTALLPROPERTY_PACKAGECODEstringW)==0)
|
||||||
{
|
{
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
WCHAR squished[GUID_SIZE];
|
WCHAR squished[GUID_SIZE];
|
||||||
|
@ -560,7 +549,7 @@ UINT WINAPI MsiGetProductInfoW(LPCWSTR szProduct, LPCWSTR szAttribute,
|
||||||
if (r != ERROR_SUCCESS)
|
if (r != ERROR_SUCCESS)
|
||||||
return ERROR_UNKNOWN_PRODUCT;
|
return ERROR_UNKNOWN_PRODUCT;
|
||||||
|
|
||||||
r = RegQueryValueExW(hkey, szPackageCode, NULL, NULL,
|
r = RegQueryValueExW(hkey, INSTALLPROPERTY_PACKAGECODEstringW, NULL, NULL,
|
||||||
(LPBYTE)squished, &sz);
|
(LPBYTE)squished, &sz);
|
||||||
if (r != ERROR_SUCCESS)
|
if (r != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -581,7 +570,7 @@ UINT WINAPI MsiGetProductInfoW(LPCWSTR szProduct, LPCWSTR szAttribute,
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
r = ERROR_SUCCESS;
|
r = ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
else if (strcmpW(szAttribute, szVersionString)==0)
|
else if (strcmpW(szAttribute, INSTALLPROPERTY_VERSIONSTRINGstringW)==0)
|
||||||
{
|
{
|
||||||
r = MsiOpenProductW(szProduct, &hProduct);
|
r = MsiOpenProductW(szProduct, &hProduct);
|
||||||
if (ERROR_SUCCESS != r)
|
if (ERROR_SUCCESS != r)
|
||||||
|
@ -590,7 +579,7 @@ UINT WINAPI MsiGetProductInfoW(LPCWSTR szProduct, LPCWSTR szAttribute,
|
||||||
r = MsiGetPropertyW(hProduct, szProductVersion, szBuffer, pcchValueBuf);
|
r = MsiGetPropertyW(hProduct, szProductVersion, szBuffer, pcchValueBuf);
|
||||||
MsiCloseHandle(hProduct);
|
MsiCloseHandle(hProduct);
|
||||||
}
|
}
|
||||||
else if (strcmpW(szAttribute, szAssignmentType)==0)
|
else if (strcmpW(szAttribute, INSTALLPROPERTY_ASSIGNMENTTYPEstringW)==0)
|
||||||
{
|
{
|
||||||
FIXME("0 (zero) if advertised or per user , 1(one) if per machine.\n");
|
FIXME("0 (zero) if advertised or per user , 1(one) if per machine.\n");
|
||||||
if (szBuffer)
|
if (szBuffer)
|
||||||
|
@ -602,7 +591,7 @@ UINT WINAPI MsiGetProductInfoW(LPCWSTR szProduct, LPCWSTR szAttribute,
|
||||||
*pcchValueBuf = 1;
|
*pcchValueBuf = 1;
|
||||||
r = ERROR_SUCCESS;
|
r = ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
else if (strcmpW(szAttribute, szLanguage)==0)
|
else if (strcmpW(szAttribute, INSTALLPROPERTY_LANGUAGEstringW)==0)
|
||||||
{
|
{
|
||||||
r = MsiOpenProductW(szProduct, &hProduct);
|
r = MsiOpenProductW(szProduct, &hProduct);
|
||||||
if (ERROR_SUCCESS != r)
|
if (ERROR_SUCCESS != r)
|
||||||
|
@ -1587,9 +1576,6 @@ USERINFOSTATE WINAPI MsiGetUserInfoW(LPCWSTR szProduct, LPWSTR lpUserNameBuf,
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
DWORD sz;
|
DWORD sz;
|
||||||
UINT rc = ERROR_SUCCESS,rc2 = ERROR_SUCCESS;
|
UINT rc = ERROR_SUCCESS,rc2 = ERROR_SUCCESS;
|
||||||
static const WCHAR szOwner[] = {'R','e','g','O','w','n','e','r',0};
|
|
||||||
static const WCHAR szCompany[] = {'R','e','g','C','o','m','p','a','n','y',0};
|
|
||||||
static const WCHAR szSerial[] = {'P','r','o','d','u','c','t','I','D',0};
|
|
||||||
|
|
||||||
TRACE("%s %p %p %p %p %p %p\n",debugstr_w(szProduct), lpUserNameBuf,
|
TRACE("%s %p %p %p %p %p %p\n",debugstr_w(szProduct), lpUserNameBuf,
|
||||||
pcchUserNameBuf, lpOrgNameBuf, pcchOrgNameBuf, lpSerialBuf,
|
pcchUserNameBuf, lpOrgNameBuf, pcchOrgNameBuf, lpSerialBuf,
|
||||||
|
@ -1602,13 +1588,15 @@ USERINFOSTATE WINAPI MsiGetUserInfoW(LPCWSTR szProduct, LPWSTR lpUserNameBuf,
|
||||||
if (lpUserNameBuf)
|
if (lpUserNameBuf)
|
||||||
{
|
{
|
||||||
sz = *lpUserNameBuf * sizeof(WCHAR);
|
sz = *lpUserNameBuf * sizeof(WCHAR);
|
||||||
rc = RegQueryValueExW( hkey, szOwner, NULL, NULL, (LPBYTE)lpUserNameBuf,
|
rc = RegQueryValueExW( hkey, INSTALLPROPERTY_REGOWNERstringW, NULL,
|
||||||
|
NULL, (LPBYTE)lpUserNameBuf,
|
||||||
&sz);
|
&sz);
|
||||||
}
|
}
|
||||||
if (!lpUserNameBuf && pcchUserNameBuf)
|
if (!lpUserNameBuf && pcchUserNameBuf)
|
||||||
{
|
{
|
||||||
sz = 0;
|
sz = 0;
|
||||||
rc = RegQueryValueExW( hkey, szOwner, NULL, NULL, NULL, &sz);
|
rc = RegQueryValueExW( hkey, INSTALLPROPERTY_REGOWNERstringW, NULL,
|
||||||
|
NULL, NULL, &sz);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pcchUserNameBuf)
|
if (pcchUserNameBuf)
|
||||||
|
@ -1617,13 +1605,14 @@ USERINFOSTATE WINAPI MsiGetUserInfoW(LPCWSTR szProduct, LPWSTR lpUserNameBuf,
|
||||||
if (lpOrgNameBuf)
|
if (lpOrgNameBuf)
|
||||||
{
|
{
|
||||||
sz = *pcchOrgNameBuf * sizeof(WCHAR);
|
sz = *pcchOrgNameBuf * sizeof(WCHAR);
|
||||||
rc2 = RegQueryValueExW( hkey, szCompany, NULL, NULL,
|
rc2 = RegQueryValueExW( hkey, INSTALLPROPERTY_REGCOMPANYstringW, NULL,
|
||||||
(LPBYTE)lpOrgNameBuf, &sz);
|
NULL, (LPBYTE)lpOrgNameBuf, &sz);
|
||||||
}
|
}
|
||||||
if (!lpOrgNameBuf && pcchOrgNameBuf)
|
if (!lpOrgNameBuf && pcchOrgNameBuf)
|
||||||
{
|
{
|
||||||
sz = 0;
|
sz = 0;
|
||||||
rc2 = RegQueryValueExW( hkey, szCompany, NULL, NULL, NULL, &sz);
|
rc2 = RegQueryValueExW( hkey, INSTALLPROPERTY_REGCOMPANYstringW, NULL,
|
||||||
|
NULL, NULL, &sz);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pcchOrgNameBuf)
|
if (pcchOrgNameBuf)
|
||||||
|
@ -1639,13 +1628,14 @@ USERINFOSTATE WINAPI MsiGetUserInfoW(LPCWSTR szProduct, LPWSTR lpUserNameBuf,
|
||||||
if (lpSerialBuf)
|
if (lpSerialBuf)
|
||||||
{
|
{
|
||||||
sz = *pcchSerialBuf * sizeof(WCHAR);
|
sz = *pcchSerialBuf * sizeof(WCHAR);
|
||||||
RegQueryValueExW( hkey, szSerial, NULL, NULL, (LPBYTE)lpSerialBuf,
|
RegQueryValueExW( hkey, INSTALLPROPERTY_PRODUCTIDstringW, NULL, NULL,
|
||||||
&sz);
|
(LPBYTE)lpSerialBuf, &sz);
|
||||||
}
|
}
|
||||||
if (!lpSerialBuf && pcchSerialBuf)
|
if (!lpSerialBuf && pcchSerialBuf)
|
||||||
{
|
{
|
||||||
sz = 0;
|
sz = 0;
|
||||||
rc = RegQueryValueExW( hkey, szSerial, NULL, NULL, NULL, &sz);
|
rc = RegQueryValueExW( hkey, INSTALLPROPERTY_PRODUCTIDstringW, NULL,
|
||||||
|
NULL, NULL, &sz);
|
||||||
}
|
}
|
||||||
if (pcchSerialBuf)
|
if (pcchSerialBuf)
|
||||||
*pcchSerialBuf = sz / sizeof(WCHAR);
|
*pcchSerialBuf = sz / sizeof(WCHAR);
|
||||||
|
|
|
@ -136,10 +136,6 @@ static UINT ITERATE_FindRelatedProducts(MSIRECORD *rec, LPVOID param)
|
||||||
DWORD sz = 0x100;
|
DWORD sz = 0x100;
|
||||||
HKEY hukey;
|
HKEY hukey;
|
||||||
INT r;
|
INT r;
|
||||||
static const WCHAR szVersion[] =
|
|
||||||
{'V','e','r','s','i','o','n',0};
|
|
||||||
static const WCHAR szLanguage[] =
|
|
||||||
{'L','a','n','g','u','a','g','e',0};
|
|
||||||
|
|
||||||
unsquash_guid(product,productid);
|
unsquash_guid(product,productid);
|
||||||
rc = MSIREG_OpenUserProductsKey(productid, &hukey, FALSE);
|
rc = MSIREG_OpenUserProductsKey(productid, &hukey, FALSE);
|
||||||
|
@ -151,8 +147,8 @@ static UINT ITERATE_FindRelatedProducts(MSIRECORD *rec, LPVOID param)
|
||||||
}
|
}
|
||||||
|
|
||||||
sz = sizeof(DWORD);
|
sz = sizeof(DWORD);
|
||||||
RegQueryValueExW(hukey, szVersion, NULL, NULL, (LPBYTE)&check,
|
RegQueryValueExW(hukey, INSTALLPROPERTY_VERSIONstringW, NULL, NULL,
|
||||||
&sz);
|
(LPBYTE)&check, &sz);
|
||||||
/* check min */
|
/* check min */
|
||||||
ver = MSI_RecordGetString(rec,2);
|
ver = MSI_RecordGetString(rec,2);
|
||||||
comp_ver = build_version_dword(ver);
|
comp_ver = build_version_dword(ver);
|
||||||
|
@ -179,8 +175,8 @@ static UINT ITERATE_FindRelatedProducts(MSIRECORD *rec, LPVOID param)
|
||||||
|
|
||||||
/* check language*/
|
/* check language*/
|
||||||
sz = sizeof(DWORD);
|
sz = sizeof(DWORD);
|
||||||
RegQueryValueExW(hukey, szLanguage, NULL, NULL, (LPBYTE)&check,
|
RegQueryValueExW(hukey, INSTALLPROPERTY_LANGUAGEstringW, NULL, NULL,
|
||||||
&sz);
|
(LPBYTE)&check, &sz);
|
||||||
RegCloseKey(hukey);
|
RegCloseKey(hukey);
|
||||||
language = MSI_RecordGetString(rec,4);
|
language = MSI_RecordGetString(rec,4);
|
||||||
TRACE("Checking languages 0x%lx and %s\n", check,
|
TRACE("Checking languages 0x%lx and %s\n", check,
|
||||||
|
|
Loading…
Reference in New Issue