ci / rust (push) Canceled after 0s
ci / web (push) Canceled after 0s
ci / package-preview (push) Canceled after 0s
ci / package-installer (push) Canceled after 0s
ci / linux-agent (push) Canceled after 0s
ci / edge-service (push) Canceled after 0s
ci / coturn-pop (push) Canceled after 0s
ci / package-windows-host (push) Canceled after 0s
32 lines
936 B
C#
32 lines
936 B
C#
using System;
|
|
using System.Diagnostics;
|
|
using System.IO;
|
|
using System.Windows.Forms;
|
|
|
|
internal static class Program
|
|
{
|
|
[STAThread]
|
|
private static int Main()
|
|
{
|
|
string root = AppDomain.CurrentDomain.BaseDirectory;
|
|
string app = Path.Combine(root, "bin", "remotedesk.exe");
|
|
if (!File.Exists(app))
|
|
{
|
|
MessageBox.Show("RemoteDesk files are incomplete. Expected bin\\remotedesk.exe.", "RemoteDesk", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
return 1;
|
|
}
|
|
try
|
|
{
|
|
using (var process = Process.Start(new ProcessStartInfo(app) { WorkingDirectory = root, UseShellExecute = true }))
|
|
{
|
|
return process == null ? 1 : 0;
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
MessageBox.Show(ex.Message, "RemoteDesk", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
return 1;
|
|
}
|
|
}
|
|
}
|