mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-11-24 04:12:32 +08:00
Run Settings on same elevation as PowerToys.exe (#9184)
* Run Settings on same elevation as PowerToys.exe * Only apply the fix when running the new Settings
This commit is contained in:
parent
a434d6047f
commit
5eb95f836e
@ -386,7 +386,11 @@ void run_settings_window()
|
||||
executable_args.append(settings_isUserAnAdmin);
|
||||
|
||||
BOOL process_created = false;
|
||||
if (is_process_elevated())
|
||||
|
||||
// Due to a bug in .NET, running the Settings process as non-elevated
|
||||
// from an elevated process sometimes results in a crash.
|
||||
// TODO: Revisit this after switching to .NET 5
|
||||
if (is_process_elevated() && !UseNewSettings())
|
||||
{
|
||||
process_created = run_settings_non_elevated(executable_path.c_str(), executable_args.data(), &process_info);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user