fix #151 Add context menu for programs

This commit is contained in:
qianlifeng
2014-10-24 13:09:51 +08:00
parent c61db8c957
commit f399ef8f69
13 changed files with 76 additions and 22 deletions

View File

@@ -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)