From: Iain Patterson Date: Thu, 21 Jul 2016 09:49:02 +0000 (+0100) Subject: Open registry with read/write when setting parameters. X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=264c99d57e1efbbf1ffabd76903b9168c57f0cfc;p=nssm.git 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. --- diff --git a/service.cpp b/service.cpp index 164fbc0..79c2f56 100644 --- a/service.cpp +++ b/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;