Commit b8e0b3c1 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Set the MsiNTProductType property.

parent 44649d2f
...@@ -215,7 +215,7 @@ static VOID set_installer_properties(MSIPACKAGE *package) ...@@ -215,7 +215,7 @@ static VOID set_installer_properties(MSIPACKAGE *package)
{ {
WCHAR pth[MAX_PATH]; WCHAR pth[MAX_PATH];
WCHAR *ptr; WCHAR *ptr;
OSVERSIONINFOA OSVersion; OSVERSIONINFOEXW OSVersion;
MEMORYSTATUSEX msex; MEMORYSTATUSEX msex;
DWORD verval; DWORD verval;
WCHAR verstr[10], bufstr[20]; WCHAR verstr[10], bufstr[20];
...@@ -277,6 +277,7 @@ static VOID set_installer_properties(MSIPACKAGE *package) ...@@ -277,6 +277,7 @@ static VOID set_installer_properties(MSIPACKAGE *package)
{'1',0}; {'1',0};
static const WCHAR v9x[] = { 'V','e','r','s','i','o','n','9','X',0 }; static const WCHAR v9x[] = { 'V','e','r','s','i','o','n','9','X',0 };
static const WCHAR vNT[] = { 'V','e','r','s','i','o','n','N','T',0 }; static const WCHAR vNT[] = { 'V','e','r','s','i','o','n','N','T',0 };
static const WCHAR szMsiNTProductType[] = { 'M','s','i','N','T','P','r','o','d','u','c','t','T','y','p','e',0 };
static const WCHAR szFormat[] = {'%','l','i',0}; static const WCHAR szFormat[] = {'%','l','i',0};
static const WCHAR szWinBuild[] = static const WCHAR szWinBuild[] =
{'W','i','n','d','o','w','s','B','u','i','l','d', 0 }; {'W','i','n','d','o','w','s','B','u','i','l','d', 0 };
...@@ -414,8 +415,8 @@ static VOID set_installer_properties(MSIPACKAGE *package) ...@@ -414,8 +415,8 @@ static VOID set_installer_properties(MSIPACKAGE *package)
MSI_SetPropertyW(package, szAllUsers, szOne); MSI_SetPropertyW(package, szAllUsers, szOne);
/* set the os things */ /* set the os things */
OSVersion.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA); OSVersion.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXW);
GetVersionExA(&OSVersion); GetVersionExW((OSVERSIONINFOW *)&OSVersion);
verval = OSVersion.dwMinorVersion+OSVersion.dwMajorVersion*100; verval = OSVersion.dwMinorVersion+OSVersion.dwMajorVersion*100;
sprintfW(verstr,szFormat,verval); sprintfW(verstr,szFormat,verval);
switch (OSVersion.dwPlatformId) switch (OSVersion.dwPlatformId)
...@@ -425,6 +426,8 @@ static VOID set_installer_properties(MSIPACKAGE *package) ...@@ -425,6 +426,8 @@ static VOID set_installer_properties(MSIPACKAGE *package)
break; break;
case VER_PLATFORM_WIN32_NT: case VER_PLATFORM_WIN32_NT:
MSI_SetPropertyW(package,vNT,verstr); MSI_SetPropertyW(package,vNT,verstr);
sprintfW(verstr,szFormat,OSVersion.wProductType);
MSI_SetPropertyW(package,szMsiNTProductType,verstr);
break; break;
} }
sprintfW(verstr,szFormat,OSVersion.dwBuildNumber); sprintfW(verstr,szFormat,OSVersion.dwBuildNumber);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment