"Always run as administrator" and "Restart as ..." only for administrator account (#1318)

This commit is contained in:
Yevhenii Holovachov
2020-02-18 21:56:34 +02:00
committed by GitHub
parent e177c5c94c
commit 607a297c4a
6 changed files with 86 additions and 5 deletions

View File

@@ -71,6 +71,9 @@ bool run_non_elevated(const std::wstring& file, const std::wstring& params);
// Run command with the same elevation, returns true if succedded
bool run_same_elevation(const std::wstring& file, const std::wstring& params);
// Returns true if the current process is running from administrator account
bool check_user_is_admin();
// Get the executable path or module name for modern apps
std::wstring get_process_path(DWORD pid) noexcept;
// Get the executable path or module name for modern apps