Add ability to run as a different user for win32 programs

This commit is contained in:
Jeremy Wu
2019-12-10 22:01:12 +11:00
parent 9855e2edee
commit 695be89656
7 changed files with 77 additions and 7 deletions

View File

@@ -191,12 +191,12 @@ namespace Wox.Plugin.Program
);
}
public static bool StartProcess(ProcessStartInfo info)
public static bool StartProcess(Func<ProcessStartInfo, Process> runProcess, ProcessStartInfo info)
{
bool hide;
try
{
Process.Start(info);
runProcess(info);
hide = true;
}
catch (Exception)