mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
add filename param to ShellRun command for running other shell types
This commit is contained in:
parent
3e38a9035c
commit
ef56d91c2f
2 changed files with 3 additions and 3 deletions
|
|
@ -35,7 +35,7 @@ namespace Flow.Launcher.Plugin
|
|||
/// <param name="cmd">The command or program to run</param>
|
||||
/// <exception cref="FileNotFoundException">Thrown when unable to find the file specified in the command </exception>
|
||||
/// <exception cref="Win32Exception">Thrown when error occurs during the execution of the command </exception>
|
||||
void ShellRun(string cmd);
|
||||
void ShellRun(string cmd, string filename = "cmd.exe");
|
||||
|
||||
/// <summary>
|
||||
/// Save everything, all of Flow Launcher and plugins' data and settings
|
||||
|
|
|
|||
|
|
@ -107,9 +107,9 @@ namespace Flow.Launcher
|
|||
});
|
||||
}
|
||||
|
||||
public void ShellRun(string cmd)
|
||||
public void ShellRun(string cmd, string filename = "cmd.exe")
|
||||
{
|
||||
var startInfo = ShellCommand.SetProcessStartInfo("cmd.exe", arguments: $"/C {cmd}", createNoWindow: true);
|
||||
var startInfo = ShellCommand.SetProcessStartInfo(filename, arguments: $"/C {cmd}", createNoWindow: true);
|
||||
ShellCommand.Execute(startInfo);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue