Jinoh Kang (@iamahuman) commented about dlls/odbccp32/odbccp32.c:
+ wcscat(regpath, L"\\"); + wcscat(regpath, lpszSection); + + /* Check an existing key first before writing a new one */ + if ((ret = RegOpenKeyW(HKEY_CURRENT_USER, regpath, &hkey)) != ERROR_SUCCESS) + { + ret = RegOpenKeyW(HKEY_LOCAL_MACHINE, regpath, &hkey); + } + + if (ret == ERROR_SUCCESS) + { + if(lpszString) + ret = RegSetValueExW(hkey, lpszEntry, 0, REG_SZ, (BYTE*)lpszString, (lstrlenW(lpszString)+1)*sizeof(WCHAR)); + else + ret = RegSetValueExW(hkey, lpszEntry, 0, REG_SZ, (BYTE*)empty, sizeof(empty)); + RegCloseKey(hkey); If HKCU key didn't exist. We'd overwrite the HKLM key. This isn't possible on Windows w/o admin privileges. Are we sure we want to do this?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/5812#note_72776