From: Volker Holfeld Date: Mon, 23 Apr 2001 07:50:40 +0000 (+0000) Subject: STABLE10-winnt-create-globalautomapper-registry-key-20010423 X-Git-Tag: openafs-stable-1_0_4~51 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=59058ac4cabd546e972abf2b640855dc9b196ec7;p=packages%2Fo%2Fopenafs.git STABLE10-winnt-create-globalautomapper-registry-key-20010423 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 0bc2869af..d179543a1 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);