MSI always reports 6.3 even without a manifest, but does not report anything higher.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48959 Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/msi/package.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/dlls/msi/package.c b/dlls/msi/package.c index 5065558827..7b64362b10 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -27,6 +27,7 @@ #include "winbase.h" #include "winreg.h" #include "winnls.h" +#include "winternl.h" #include "shlwapi.h" #include "wingdi.h" #include "msi.h" @@ -668,7 +669,7 @@ done: static VOID set_installer_properties(MSIPACKAGE *package) { WCHAR *ptr; - OSVERSIONINFOEXW OSVersion; + RTL_OSVERSIONINFOEXW OSVersion; MEMORYSTATUSEX msex; DWORD verval, len, type; WCHAR pth[MAX_PATH], verstr[11], bufstr[22]; @@ -860,9 +861,14 @@ static VOID set_installer_properties(MSIPACKAGE *package) msi_set_property( package->db, szPrivileged, szOne, -1 );
/* set the os things */ - OSVersion.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXW); - GetVersionExW((OSVERSIONINFOW *)&OSVersion); + OSVersion.dwOSVersionInfoSize = sizeof(OSVersion); + RtlGetVersion(&OSVersion); verval = OSVersion.dwMinorVersion + OSVersion.dwMajorVersion * 100; + if (verval > 603) + { + verval = 603; + OSVersion.dwBuildNumber = 9600; + } len = swprintf( verstr, ARRAY_SIZE(verstr), szFormat, verval ); switch (OSVersion.dwPlatformId) {
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48959 Signed-off-by: Zebediah Figura z.figura12@gmail.com --- Note that these only seem to be set in Windows 10. I figured there's no harm in setting them universally, however.
programs/winecfg/appdefaults.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/programs/winecfg/appdefaults.c b/programs/winecfg/appdefaults.c index 1ac2985a11..dd3480cd63 100644 --- a/programs/winecfg/appdefaults.c +++ b/programs/winecfg/appdefaults.c @@ -416,6 +416,8 @@ static void set_winver(const struct win_version *version)
set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CSDVersion", NULL); set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentVersion", NULL); + set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentMajorVersionNumber", NULL); + set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentMinorVersionNumber", NULL); set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentBuild", NULL); set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentBuildNumber", NULL); set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "ProductName", NULL); @@ -429,6 +431,8 @@ static void set_winver(const struct win_version *version) snprintf(Buffer, sizeof(Buffer), "%d.%d", version->dwMajorVersion, version->dwMinorVersion); set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentVersion", Buffer); + set_reg_key_dword(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentMajorVersionNumber", version->dwMajorVersion); + set_reg_key_dword(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentMinorVersionNumber", version->dwMinorVersion); set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CSDVersion", version->szCSDVersion); snprintf(Buffer, sizeof(Buffer), "%d", version->dwBuildNumber); set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentBuild", Buffer);
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- loader/wine.inf.in | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/loader/wine.inf.in b/loader/wine.inf.in index 9f1f4c6091..39ad8e8455 100644 --- a/loader/wine.inf.in +++ b/loader/wine.inf.in @@ -3746,6 +3746,8 @@ HKLM,"System\CurrentControlSet\Services\Winsock2\Parameters\Protocol_Catalog9\Ca
[VersionInfo] HKLM,%CurrentVersionNT%,"CurrentVersion",2,"6.1" +HKLM,%CurrentVersionNT%,"CurrentMajorVersionNumber",0x10001,6 +HKLM,%CurrentVersionNT%,"CurrentMinorVersionNumber",0x10001,1 HKLM,%CurrentVersionNT%,"CSDVersion",2,"Service Pack 1" HKLM,%CurrentVersionNT%,"CurrentBuild",2,"7601" HKLM,%CurrentVersionNT%,"CurrentBuildNumber",2,"7601"