Browse Source

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!"
Iain Patterson 9 years ago
parent
commit
1d02256aa5
3 changed files with 7 additions and 1 deletions
  1. 5 0
      ChangeLog.txt
  2. 1 0
      README.txt
  3. 1 1
      gui.cpp

+ 5 - 0
ChangeLog.txt

@@ -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

+ 1 - 0
README.txt

@@ -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
 -------

+ 1 - 1
gui.cpp

@@ -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;
       }