git://git.iain.cx/iain
/
nssm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
859c7ca
)
Use GetWindowsDirectory() instead of %SYSTEMROOT%.
author
Iain Patterson
<me@iain.cx>
Wed, 16 Feb 2011 23:48:31 +0000
(23:48 +0000)
committer
Iain Patterson
<me@iain.cx>
Wed, 16 Feb 2011 23:48:31 +0000
(23:48 +0000)
Though unlikely, it's possible that %SYSTEMROOT% might be undefined.
registry.cpp
patch
|
blob
|
history
diff --git
a/registry.cpp
b/registry.cpp
index
0471ca7
..
f82e1bf
100644
(file)
--- a/
registry.cpp
+++ b/
registry.cpp
@@
-180,7
+180,7
@@
int get_parameters(char *service_name, char *exe, int exelen, char *flags, int f
}
\r
else {
\r
/* Help! */
\r
- unsigned long ret =
ExpandEnvironmentStrings("%SYSTEMROOT%",
dir, dirlen);
\r
+ unsigned long ret =
GetWindowsDirectory(
dir, dirlen);
\r
if (! ret || ret > dirlen) {
\r
log_event(EVENTLOG_ERROR_TYPE, NSSM_EVENT_NO_DIR_AND_NO_FALLBACK, NSSM_REG_DIR, service_name, 0);
\r
RegCloseKey(key);
\r