From f51ae85d381254f900d5554f78dfa87e02ec27e0 Mon Sep 17 00:00:00 2001 From: Don HO Date: Tue, 31 Dec 2019 19:07:17 +0500 Subject: [PATCH] Prevent from setting Updater's Proxyas Notepad++ is not in Admin mode Updater's Proxy settings needs Administrator privilege. This enhancement prevents from launching Updater's Proxy settings and displays an explicite message to user if Notepad++ is not in Admin mode. Close #7779 --- PowerEditor/src/NppCommands.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index 0499fadb..8463d64c 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -2913,6 +2913,15 @@ void Notepad_plus::command(int id) generic_string param; if (id == IDM_CONFUPDATERPROXY) { + if (!_isAdministrator) + { + _nativeLangSpeaker.messageBox("GUpConfNeedAdminMode", + _pPublicInterface->getHSelf(), + TEXT("Please relaunch Notepad++ in Admin mode to configure proxy."), + TEXT("Proxy Settings"), + MB_OK | MB_APPLMODAL); + return; + } param = TEXT("-options"); } else