mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 03:36:44 +02:00
[PowerToys Run] run non-elevated when runner is elevated (#3451)
* run Launcher non-elevated * Implemented acquiring PID of Launcher Co-authored-by: ivan100sic <ivan100sic@gmail.com>
This commit is contained in:
@@ -69,8 +69,8 @@ bool drop_elevated_privileges();
|
||||
// Run command as elevated user, returns true if succeeded
|
||||
bool run_elevated(const std::wstring& file, const std::wstring& params);
|
||||
|
||||
// Run command as non-elevated user, returns true if succeeded
|
||||
bool run_non_elevated(const std::wstring& file, const std::wstring& params);
|
||||
// Run command as non-elevated user, returns true if succeeded, puts the process id into returnPid if returnPid != NULL
|
||||
bool run_non_elevated(const std::wstring& file, const std::wstring& params, DWORD* returnPid);
|
||||
|
||||
// Run command with the same elevation, returns true if succedded
|
||||
bool run_same_elevation(const std::wstring& file, const std::wstring& params);
|
||||
@@ -136,3 +136,5 @@ struct overloaded : Ts...
|
||||
};
|
||||
template<class... Ts>
|
||||
overloaded(Ts...)->overloaded<Ts...>;
|
||||
|
||||
#define POWER_LAUNCHER_PID_SHARED_FILE L"Global\\3cbfbad4-199b-4e2c-9825-942d5d3d3c74"
|
||||
|
||||
Reference in New Issue
Block a user