diff --git a/dll/cpl/sysdm/advanced.c b/dll/cpl/sysdm/advanced.c index ffa1e051ed..5406352592 100644 --- a/dll/cpl/sysdm/advanced.c +++ b/dll/cpl/sysdm/advanced.c @@ -19,6 +19,8 @@ OnOK(HWND hwndDlg) { HKEY hKey; DWORD ReportAsWorkstation; + WCHAR ProductType[9]; + LONG lRet; ReportAsWorkstation = (SendDlgItemMessageW(hwndDlg, IDC_REPORTASWORKSTATION, @@ -45,6 +47,30 @@ OnOK(HWND hwndDlg) RegCloseKey(hKey); } + + if (ReportAsWorkstation) + wcscpy(ProductType, L"WinNT"); + else + wcscpy(ProductType, L"ServerNT"); + + lRet = RegOpenKeyExW(HKEY_LOCAL_MACHINE, + L"SYSTEM\\CurrentControlSet\\Control\\ProductOptions", + 0, + KEY_SET_VALUE, + &hKey); + if (lRet != ERROR_SUCCESS) + { + return; + } + + lRet = RegSetValueExW(hKey, + L"ProductType", + 0, + REG_SZ, + (LPBYTE)ProductType, + (wcslen(ProductType) + 1) * sizeof(WCHAR)); + + RegCloseKey(hKey); } static VOID