Revert changes to other plugin. Will refactor as a separate PR

This commit is contained in:
Jeremy Wu 2019-12-10 20:11:12 +11:00
parent b123d95b71
commit c22ab4afdf

View File

@ -10,7 +10,6 @@ using Microsoft.Win32;
using Shell;
using Wox.Infrastructure;
using Wox.Plugin.Program.Logger;
using Wox.Plugin.SharedCommands;
namespace Wox.Plugin.Program.Programs
{
@ -97,7 +96,14 @@ namespace Wox.Plugin.Program.Programs
Title = api.GetTranslation("wox_plugin_program_run_as_administrator"),
Action = _ =>
{
return Main.StartProcess(ShellCommand.SetProcessStartInfo(FullPath, ParentDirectory));
var info = new ProcessStartInfo
{
FileName = FullPath,
WorkingDirectory = ParentDirectory,
Verb = "runas"
};
var hide = Main.StartProcess(info);
return hide;
},
IcoPath = "Images/cmd.png"
},