Don't expand parameters when querying a service.

Calling, eg "nssm get <service> Application" should print the unexpanded
string from the registry.
master
Iain Patterson 11 years ago
parent c262633514
commit 97d5ee7450

@ -101,7 +101,7 @@ static int setting_get_string(const TCHAR *service_name, void *param, const TCHA
HKEY key = (HKEY) param; HKEY key = (HKEY) param;
TCHAR buffer[VALUE_LENGTH]; TCHAR buffer[VALUE_LENGTH];
if (expand_parameter(key, (TCHAR *) name, (TCHAR *) buffer, (unsigned long) sizeof(buffer), false, false)) return -1; if (get_string(key, (TCHAR *) name, (TCHAR *) buffer, (unsigned long) sizeof(buffer), false, false, false)) return -1;
return value_from_string(name, value, buffer); return value_from_string(name, value, buffer);
} }
@ -266,7 +266,7 @@ static int setting_get_affinity(const TCHAR *service_name, void *param, const TC
return -1; return -1;
} }
if (expand_parameter(key, (TCHAR *) name, buffer, buflen, false, true)) { if (get_string(key, (TCHAR *) name, buffer, buflen, false, false, true)) {
HeapFree(GetProcessHeap(), 0, buffer); HeapFree(GetProcessHeap(), 0, buffer);
return -1; return -1;
} }

Loading…
Cancel
Save