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
pull/7804/head
Don HO 5 years ago
parent 326733ec72
commit f51ae85d38
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E

@ -2913,6 +2913,15 @@ void Notepad_plus::command(int id)
generic_string param; generic_string param;
if (id == IDM_CONFUPDATERPROXY) 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"); param = TEXT("-options");
} }
else else

Loading…
Cancel
Save