2026-06-11 10:19:43 +02:00
|
|
|
using ITNexusAgent.UI;
|
|
|
|
|
|
|
|
|
|
namespace ITNexusAgent;
|
|
|
|
|
|
|
|
|
|
// Läuft als User-Prozess (via schtasks), zeigt Consent-Dialog und sendet Antwort via TCP
|
|
|
|
|
public static class ConsentModeRunner
|
|
|
|
|
{
|
2026-06-26 13:27:17 +02:00
|
|
|
public static void Run(string portStr, string secret)
|
2026-06-11 10:19:43 +02:00
|
|
|
{
|
|
|
|
|
if (!int.TryParse(portStr, out var port) || port <= 0) return;
|
|
|
|
|
|
|
|
|
|
var app = new System.Windows.Application();
|
|
|
|
|
app.ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose;
|
|
|
|
|
|
2026-06-26 13:27:17 +02:00
|
|
|
var win = new RdpConsentWindow(port, secret);
|
2026-06-11 10:19:43 +02:00
|
|
|
win.Topmost = true;
|
|
|
|
|
win.Show();
|
|
|
|
|
win.Activate();
|
|
|
|
|
app.Run();
|
|
|
|
|
}
|
|
|
|
|
}
|