Set PhysicalMemory property from system data.
This commit is contained in:
parent
caf6fa9531
commit
1fa2da0756
@ -139,6 +139,7 @@ static VOID set_installer_properties(MSIPACKAGE *package)
|
|||||||
WCHAR pth[MAX_PATH];
|
WCHAR pth[MAX_PATH];
|
||||||
WCHAR *ptr;
|
WCHAR *ptr;
|
||||||
OSVERSIONINFOA OSVersion;
|
OSVERSIONINFOA OSVersion;
|
||||||
|
MEMORYSTATUSEX msex;
|
||||||
DWORD verval;
|
DWORD verval;
|
||||||
WCHAR verstr[10], bufstr[20];
|
WCHAR verstr[10], bufstr[20];
|
||||||
HDC dc;
|
HDC dc;
|
||||||
@ -202,6 +203,7 @@ static VOID set_installer_properties(MSIPACKAGE *package)
|
|||||||
static const WCHAR szSix[] = {'6',0 };
|
static const WCHAR szSix[] = {'6',0 };
|
||||||
|
|
||||||
static const WCHAR szVersionMsi[] = { 'V','e','r','s','i','o','n','M','s','i',0 };
|
static const WCHAR szVersionMsi[] = { 'V','e','r','s','i','o','n','M','s','i',0 };
|
||||||
|
static const WCHAR szPhysicalMemory[] = { 'P','h','y','s','i','c','a','l','M','e','m','o','r','y',0 };
|
||||||
static const WCHAR szFormat2[] = {'%','l','i','.','%','l','i',0};
|
static const WCHAR szFormat2[] = {'%','l','i','.','%','l','i',0};
|
||||||
/* Screen properties */
|
/* Screen properties */
|
||||||
static const WCHAR szScreenX[] = {'S','c','r','e','e','n','X',0};
|
static const WCHAR szScreenX[] = {'S','c','r','e','e','n','X',0};
|
||||||
@ -217,7 +219,6 @@ ComputerName
|
|||||||
UserLanguageID
|
UserLanguageID
|
||||||
LogonUser
|
LogonUser
|
||||||
VirtualMemory
|
VirtualMemory
|
||||||
PhysicalMemory
|
|
||||||
Intel
|
Intel
|
||||||
ShellAdvSupport
|
ShellAdvSupport
|
||||||
DefaultUIFont
|
DefaultUIFont
|
||||||
@ -306,6 +307,12 @@ Privileged
|
|||||||
SHGetFolderPathW(NULL,CSIDL_WINDOWS,NULL,0,pth);
|
SHGetFolderPathW(NULL,CSIDL_WINDOWS,NULL,0,pth);
|
||||||
strcatW(pth,cszbs);
|
strcatW(pth,cszbs);
|
||||||
MSI_SetPropertyW(package, WF, pth);
|
MSI_SetPropertyW(package, WF, pth);
|
||||||
|
|
||||||
|
/* Physical Memory is specified in MB. Using total amount. */
|
||||||
|
msex.dwLength = sizeof(msex);
|
||||||
|
GlobalMemoryStatusEx( &msex );
|
||||||
|
sprintfW( bufstr, szScreenFormat, (int)(msex.ullTotalPhys/1024/1024));
|
||||||
|
MSI_SetPropertyW(package, szPhysicalMemory, bufstr);
|
||||||
|
|
||||||
SHGetFolderPathW(NULL,CSIDL_WINDOWS,NULL,0,pth);
|
SHGetFolderPathW(NULL,CSIDL_WINDOWS,NULL,0,pth);
|
||||||
ptr = strchrW(pth,'\\');
|
ptr = strchrW(pth,'\\');
|
||||||
@ -793,7 +800,7 @@ UINT MSI_GetPropertyW(MSIPACKAGE *package, LPCWSTR szName,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
*pchValueBuf = 0;
|
*pchValueBuf = 0;
|
||||||
TRACE("property not found\n");
|
TRACE("property %s not found\n", debugstr_w(szName));
|
||||||
}
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user