From: Volker Holfeld Date: Wed, 4 Apr 2001 13:43:45 +0000 (+0000) Subject: winnt-create-globalautomapper-registry-key-20010404 X-Git-Tag: openafs-stable-1_1_0~233 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=bf58cfd11f28c1b32501d5f79a03dcd7c8d35517 winnt-create-globalautomapper-registry-key-20010404 if GlobalAutoMapper key is missing when a global drive is defined with the gui it will be created --- diff --git a/src/WINNT/client_config/dlg_automap.cpp b/src/WINNT/client_config/dlg_automap.cpp index 0bc2869..d179543 100644 --- a/src/WINNT/client_config/dlg_automap.cpp +++ b/src/WINNT/client_config/dlg_automap.cpp @@ -212,13 +212,14 @@ BOOL UpdateRegistry(DRIVEMAP *pDrive, BOOL bRemove) TCHAR szValueName[128]; HKEY hKey; LONG result; + DWORD dwDispo; if (!pDrive) return FALSE; _stprintf(szKeyName, TEXT("%s\\GlobalAutoMapper"), AFSConfigKeyName); - if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, szKeyName, 0, KEY_SET_VALUE, &hKey) != ERROR_SUCCESS) + if (RegCreateKeyEx(HKEY_LOCAL_MACHINE, szKeyName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_SET_VALUE, NULL, &hKey, &dwDispo) != ERROR_SUCCESS) return FALSE; _stprintf(szValueName, TEXT("%c:"), pDrive->chDrive);