Added support for custom working directory in ExternalTool class

Not sure about l79 and argParser
This commit is contained in:
Pedro Rodrigues
2017-09-09 21:35:09 +01:00
parent 86ecb38ae2
commit 0306296ae9

View File

@@ -17,6 +17,7 @@ namespace mRemoteNG.Tools
public string FileName { get; set; }
public bool WaitForExit { get; set; }
public string Arguments { get; set; }
public string WorkingDir { get; set; }
public bool TryIntegrate { get; set; }
public ConnectionInfo ConnectionInfo { get; set; }
@@ -26,11 +27,12 @@ namespace mRemoteNG.Tools
#endregion
public ExternalTool(string displayName = "", string fileName = "", string arguments = "")
public ExternalTool(string displayName = "", string fileName = "", string arguments = "", string workingDir = "")
{
DisplayName = displayName;
FileName = fileName;
Arguments = arguments;
WorkingDir = workingDir;
}
public void Start(ConnectionInfo startConnectionInfo = null)
@@ -74,6 +76,7 @@ namespace mRemoteNG.Tools
process.StartInfo.UseShellExecute = true;
process.StartInfo.FileName = argParser.ParseArguments(FileName);
process.StartInfo.Arguments = argParser.ParseArguments(Arguments);
if (WorkingDir != "") process.StartInfo.WorkingDirectory = argParser.ParseArguments(WorkingDir);
}
private void StartIntegrated()