From 83b62fd8b26520a52dacef76ce819c47173f54d1 Mon Sep 17 00:00:00 2001 From: Riccardo Date: Mon, 25 May 2020 13:41:55 +0200 Subject: [PATCH] Ctrl + Enter runs application as administrator --- Plugins/Wox.Plugin.Program/Programs/Win32.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Plugins/Wox.Plugin.Program/Programs/Win32.cs b/Plugins/Wox.Plugin.Program/Programs/Win32.cs index c11ec8a3d..bd3ab06a3 100644 --- a/Plugins/Wox.Plugin.Program/Programs/Win32.cs +++ b/Plugins/Wox.Plugin.Program/Programs/Win32.cs @@ -50,7 +50,10 @@ public Result Result(string query, IPublicAPI api) WorkingDirectory = ParentDirectory }; - Main.StartProcess(Process.Start, info); + if (e.SpecialKeyState.CtrlPressed) + Main.StartProcess(Process.Start, ShellCommand.SetProcessStartInfo(info.FileName, info.WorkingDirectory, "", "runas")); + else + Main.StartProcess(Process.Start, info); return true; }