Fixed parameters bug when installing from the GUI.

We were calling GetDlgItemText() on the wrong window.  As a result,
trying to install a sevice with parameters set would fail with the
error message "No valid options were specified!"
master
Iain Patterson 11 years ago
parent 96e7f4484a
commit 1d02256aa5

@ -1,3 +1,8 @@
Changes since 2.20
-----------------
* Services installed from the GUI no longer have incorrect
AppParameters set in the registry.
Changes since 2.19
-----------------
* Services installed from the commandline without using the

@ -324,6 +324,7 @@ on shutdown.
Thanks to Brian Baxter for suggesting how to escape quotes from the command prompt.
Thanks to Russ Holmann for suggesting that the shutdown timeout be configurable.
Thanks to Paul Spause for spotting a bug with default registry entries.
Thanks to BUGHUNTER for spotting more GUI bugs.
Licence
-------

@ -110,7 +110,7 @@ int install(HWND window) {
/* Get flags. */
if (SendMessage(GetDlgItem(tablist[NSSM_TAB_APPLICATION], IDC_FLAGS), WM_GETTEXTLENGTH, 0, 0)) {
if (! GetDlgItemText(window, IDC_FLAGS, service->flags, sizeof(service->flags))) {
if (! GetDlgItemText(tablist[NSSM_TAB_APPLICATION], IDC_FLAGS, service->flags, sizeof(service->flags))) {
popup_message(MB_OK | MB_ICONEXCLAMATION, NSSM_GUI_INVALID_OPTIONS);
return 4;
}

Loading…
Cancel
Save