Fix launch external programs in client

This commit is contained in:
Nicola Carminati
2019-02-22 17:11:21 +01:00
parent 1ee6c0c604
commit 78f8ca2777
2 changed files with 10 additions and 2 deletions
+10 -2
View File
@@ -254,7 +254,11 @@ namespace CMS_Client.Browser_Tools
if (p.Count() > 0 && p[0].MainWindowHandle != IntPtr.Zero)
NcWindow.ForceExtFocus(p[0].MainWindowHandle);
else
Process.Start(sft.path, sft.arguments);
{
ProcessStartInfo PS = new ProcessStartInfo(sft.path, sft.arguments);
PS.WorkingDirectory = new FileInfo(sft.path).Directory.FullName;
Process.Start(PS);
}
}
}
@@ -263,7 +267,11 @@ namespace CMS_Client.Browser_Tools
{
Software sft = Config.ExtSoftwaresConfig.FirstOrDefault(X => X.id == (string)id);
if (sft != null)
Process.Start(sft.path, sft.arguments);
{
ProcessStartInfo PS = new ProcessStartInfo(sft.path, sft.arguments);
PS.WorkingDirectory = new FileInfo(sft.path).Directory.FullName;
Process.Start(PS);
}
}
#endregion PROCESSES_METHODS
Binary file not shown.