var executableFile = Path.Combine(Application.StartupPath, "system", "l2.exe");
if (!File.Exists(executableFile))
{
MessageBox.Show($"File {executableFile} not found!", "Warning!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
var account = "Kring";
var password = "qwerty12345";
var startInfo = new ProcessStartInfo(executableFile)
{
Arguments = $"account={account} password={password}"
};
try
{
Process.Start(startInfo);
}
catch (Exception e)
{
MessageBox.Show(e.ToString(), "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
}