mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Control Panel Command handeling
Now works for everything
This commit is contained in:
parent
a72d1a13b6
commit
39d6ccd11c
1 changed files with 4 additions and 14 deletions
|
|
@ -101,20 +101,10 @@ namespace Wox.Plugin.SystemPlugins.ControlPanel
|
|||
else if (currentKey.OpenSubKey("Shell\\Open\\Command") != null && currentKey.OpenSubKey("Shell\\Open\\Command").GetValue(null) != null)
|
||||
{
|
||||
//Other files (usually third party items)
|
||||
string value = Environment.ExpandEnvironmentVariables(currentKey.OpenSubKey("Shell\\Open\\Command").GetValue(null).ToString());
|
||||
|
||||
if (value[0] == '"')
|
||||
{
|
||||
for (int x = 1; x < value.Length && value[x] != '"'; x++)
|
||||
{
|
||||
executablePath.FileName += value[x];
|
||||
}
|
||||
executablePath.Arguments = value.Remove(0, executablePath.FileName.Length + 2).Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
executablePath.FileName = value;
|
||||
}
|
||||
string input = "\"" + Environment.ExpandEnvironmentVariables(currentKey.OpenSubKey("Shell\\Open\\Command").GetValue(null).ToString()) + "\"";
|
||||
executablePath.FileName = "cmd.exe";
|
||||
executablePath.Arguments = "/C " + input;
|
||||
executablePath.WindowStyle = ProcessWindowStyle.Hidden;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue