mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
fix #151 Add context menu for programs
This commit is contained in:
@@ -720,14 +720,14 @@ namespace Wox
|
||||
this.Opacity = this.AllowsTransparency ? UserSettingStorage.Instance.Opacity : 1;
|
||||
}
|
||||
|
||||
public bool ShellRun(string cmd)
|
||||
public bool ShellRun(string cmd, bool runAsAdministrator = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(cmd))
|
||||
throw new ArgumentNullException();
|
||||
|
||||
Wox.Infrastructure.WindowsShellRun.Start(cmd);
|
||||
WindowsShellRun.Start(cmd, runAsAdministrator);
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
Reference in New Issue
Block a user