path containing spaces was technically a security vulnerability.\r
Thanks to Scott Ware for reporting a crash saving the environment on XP 32-bit.\r
Thanks to Stefan and Michael Scherer for reporting a bug writing the event messages source.\r
-Thanks to Paul Baxter and Mathias Breiner for help with Visual Studio 2015.\r
+Thanks to Paul Baxter for help with Visual Studio 2015.\r
+Thanks to Mathias Breiner for help with Visual Studio and some registry fixes.\r
\r
Licence\r
-------\r
log_event(EVENTLOG_ERROR_TYPE, NSSM_EVENT_OUT_OF_MEMORY, _T("hook registry"), _T("get_hook()"), 0);\r
return 1;\r
}\r
- HKEY key = open_registry(service_name, registry, KEY_READ, false);\r
- if (! key) return 1;\r
+ HKEY key;\r
+ long error = open_registry(service_name, registry, KEY_READ, &key, false);\r
+ if (! key) {\r
+ if (error == ERROR_FILE_NOT_FOUND) {\r
+ ZeroMemory(buffer, buflen);\r
+ return 0;\r
+ }\r
+ return 1;\r
+ }\r
\r
int ret = expand_parameter(key, (TCHAR *) hook_action, buffer, buflen, true, false);\r
\r