mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-10 21:41:51 +02:00
Remove ShellRun
1. Remove ShellRun using p/invoke 2. Remove ResolveShortcut when open contanning folder 3. fix #88
This commit is contained in:
@@ -5,7 +5,6 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.ServiceProcess;
|
||||
using Wox.Infrastructure;
|
||||
using Wox.Plugin.Everything.Everything;
|
||||
|
||||
namespace Wox.Plugin.Everything
|
||||
@@ -57,7 +56,11 @@ namespace Wox.Plugin.Everything
|
||||
r.Action = (c) =>
|
||||
{
|
||||
context.API.HideApp();
|
||||
context.API.ShellRun(path);
|
||||
Process.Start(new ProcessStartInfo
|
||||
{
|
||||
FileName = path,
|
||||
UseShellExecute = true
|
||||
});
|
||||
return true;
|
||||
};
|
||||
r.ContextData = s;
|
||||
@@ -124,12 +127,12 @@ namespace Wox.Plugin.Everything
|
||||
{
|
||||
List<ContextMenu> defaultContextMenus = new List<ContextMenu>();
|
||||
ContextMenu openFolderContextMenu = new ContextMenu()
|
||||
{
|
||||
Name = context.API.GetTranslation("wox_plugin_everything_open_containing_folder"),
|
||||
Command = "explorer.exe",
|
||||
Argument = " /select,\"{path}\"",
|
||||
ImagePath = "Images\\folder.png"
|
||||
};
|
||||
{
|
||||
Name = context.API.GetTranslation("wox_plugin_everything_open_containing_folder"),
|
||||
Command = "explorer.exe",
|
||||
Argument = " /select,\"{path}\"",
|
||||
ImagePath = "Images\\folder.png"
|
||||
};
|
||||
|
||||
defaultContextMenus.Add(openFolderContextMenu);
|
||||
return defaultContextMenus;
|
||||
|
||||
Reference in New Issue
Block a user