[PATCH] registry: Set CurrentBuild always to the same value as CurrentBuildNumber.

Thomas Faller tfaller1 at gmx.de
Tue Aug 28 17:14:17 CDT 2018


Make that the registry entry

HKLM\Software\Microsoft\Windows NT\CurrentVersion\CurrentBuild

has always the same value as

HKLM\Software\Microsoft\Windows NT\CurrentVersion\CurrentBuildNumber

This resolves:
https://bugs.winehq.org/show_bug.cgi?id=42870

Signed-off-by: Thomas Faller <tfaller1 at gmx.de>
---
 loader/wine.inf.in             | 2 ++
 programs/winecfg/appdefaults.c | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/loader/wine.inf.in b/loader/wine.inf.in
index 79ac6c5805..4f241c0447 100644
--- a/loader/wine.inf.in
+++ b/loader/wine.inf.in
@@ -3424,6 +3424,7 @@ HKLM,"System\CurrentControlSet\Services\Winsock2\Parameters\Protocol_Catalog9\Ca
 [VersionInfo]
 HKLM,%CurrentVersionNT%,"CurrentVersion",2,"6.1"
 HKLM,%CurrentVersionNT%,"CSDVersion",2,"Service Pack 1"
+HKLM,%CurrentVersionNT%,"CurrentBuild",2,"7601"
 HKLM,%CurrentVersionNT%,"CurrentBuildNumber",2,"7601"
 HKLM,%CurrentVersionNT%,"CurrentType",2,"Uniprocessor Free"
 HKLM,%CurrentVersionNT%,"ProductName",2,"Microsoft Windows 7"
@@ -3434,6 +3435,7 @@ HKLM,%Control%\Session Manager\Environment,"OS",2,"Windows_NT"
 [VersionInfo.ntamd64]
 HKLM,%CurrentVersionNT%,"CurrentVersion",2,"6.1"
 HKLM,%CurrentVersionNT%,"CSDVersion",2,"Service Pack 1"
+HKLM,%CurrentVersionNT%,"CurrentBuild",2,"7601"
 HKLM,%CurrentVersionNT%,"CurrentBuildNumber",2,"7601"
 HKLM,%CurrentVersionNT%,"CurrentType",2,"Uniprocessor Free"
 HKLM,%CurrentVersionNT%,"ProductName",2,"Microsoft Windows 7"
diff --git a/programs/winecfg/appdefaults.c b/programs/winecfg/appdefaults.c
index e098c2b31a..d598fd4f21 100644
--- a/programs/winecfg/appdefaults.c
+++ b/programs/winecfg/appdefaults.c
@@ -431,6 +431,7 @@ static void on_winver_change(HWND dialog)
 
             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, "CurrentBuild", NULL);
             set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentBuildNumber", NULL);
             set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "ProductName", NULL);
             set_reg_key(HKEY_LOCAL_MACHINE, szKeyProdNT, "ProductType", NULL);
@@ -445,6 +446,7 @@ static void on_winver_change(HWND dialog)
             set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentVersion", Buffer);
             set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CSDVersion", win_versions[selection].szCSDVersion);
             snprintf(Buffer, sizeof(Buffer), "%d", win_versions[selection].dwBuildNumber);
+            set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentBuild", Buffer);
             set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentBuildNumber", Buffer);
             snprintf(Buffer, sizeof(Buffer), "Microsoft %s", win_versions[selection].szDescription);
             set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "ProductName", Buffer);
@@ -463,6 +465,7 @@ static void on_winver_change(HWND dialog)
         case VER_PLATFORM_WIN32s:
             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, "CurrentBuild", NULL);
             set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "CurrentBuildNumber", NULL);
             set_reg_key(HKEY_LOCAL_MACHINE, szKeyNT, "ProductName", NULL);
             set_reg_key(HKEY_LOCAL_MACHINE, szKeyProdNT, "ProductType", NULL);
-- 2.17.1




More information about the wine-devel mailing list