Disable interactive checkbox when a user is set.
authorIain Patterson <me@iain.cx>
Mon, 23 Dec 2013 18:21:12 +0000 (18:21 +0000)
committerIain Patterson <me@iain.cx>
Mon, 23 Dec 2013 18:21:12 +0000 (18:21 +0000)
A service can only interact with the desktop when running as LOCALSYSTEM
so disable the checkbox for that option when a user account is set.

gui.cpp

diff --git a/gui.cpp b/gui.cpp
index 94da622..240f62c 100644 (file)
--- a/gui.cpp
+++ b/gui.cpp
@@ -81,6 +81,7 @@ static inline void set_timeout_enabled(unsigned long control, unsigned long depe
 }\r
 \r
 static inline void set_logon_enabled(unsigned char enabled) {\r
+  EnableWindow(GetDlgItem(tablist[NSSM_TAB_LOGON], IDC_INTERACT), ! enabled);\r
   EnableWindow(GetDlgItem(tablist[NSSM_TAB_LOGON], IDC_USERNAME), enabled);\r
   EnableWindow(GetDlgItem(tablist[NSSM_TAB_LOGON], IDC_PASSWORD1), enabled);\r
   EnableWindow(GetDlgItem(tablist[NSSM_TAB_LOGON], IDC_PASSWORD2), enabled);\r