From: Iain Patterson Date: Mon, 23 Dec 2013 18:21:12 +0000 (+0000) Subject: Disable interactive checkbox when a user is set. X-Git-Tag: v2.22~118 X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=8e2c124550ea78e6b9ddfd5ad6cdb72ba93e9a1b;p=nssm.git Disable interactive checkbox when a user is set. 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. --- diff --git a/gui.cpp b/gui.cpp index 94da622..240f62c 100644 --- a/gui.cpp +++ b/gui.cpp @@ -81,6 +81,7 @@ static inline void set_timeout_enabled(unsigned long control, unsigned long depe } static inline void set_logon_enabled(unsigned char enabled) { + EnableWindow(GetDlgItem(tablist[NSSM_TAB_LOGON], IDC_INTERACT), ! enabled); EnableWindow(GetDlgItem(tablist[NSSM_TAB_LOGON], IDC_USERNAME), enabled); EnableWindow(GetDlgItem(tablist[NSSM_TAB_LOGON], IDC_PASSWORD1), enabled); EnableWindow(GetDlgItem(tablist[NSSM_TAB_LOGON], IDC_PASSWORD2), enabled);