From 59058ac4cabd546e972abf2b640855dc9b196ec7 Mon Sep 17 00:00:00 2001 From: Volker Holfeld Date: Mon, 23 Apr 2001 07:50:40 +0000 Subject: [PATCH] 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 --- src/WINNT/client_config/dlg_automap.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.39.5