mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 20:58:07 +03:00
20 lines
501 B
C#
20 lines
501 B
C#
using System.Diagnostics;
|
|
using System.IO;
|
|
|
|
namespace TRX_InstallerLib.Utils;
|
|
|
|
public static class ProcessUtils
|
|
{
|
|
public static void Start(string fileName, string? arguments = null)
|
|
{
|
|
Process.Start(new ProcessStartInfo
|
|
{
|
|
FileName = fileName,
|
|
Arguments = arguments,
|
|
UseShellExecute = true,
|
|
WorkingDirectory = new Uri(fileName).IsFile
|
|
? Path.GetDirectoryName(fileName)
|
|
: null
|
|
});
|
|
}
|
|
}
|