Browse Source

Open registry with read/write when setting parameters.

We may need to query existing settings so we need KEY_READ as well as
KEY_WRITE access.
Iain Patterson 6 years ago
parent
commit
264c99d57e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      service.cpp

+ 1 - 1
service.cpp

@@ -1072,7 +1072,7 @@ int pre_edit_service(int argc, TCHAR **argv) {
   }
 
   if (! service->native) {
-    key = open_registry(service->name, KEY_WRITE);
+    key = open_registry(service->name, KEY_READ | KEY_WRITE);
     if (! key) {
       if (value.string) HeapFree(GetProcessHeap(), 0, value.string);
       return 4;