Hinzufügen der Möglichkeit ein Programmstart auf dem Client durch die RDP Sitzung zu triggern

This commit is contained in:
2026-08-11 09:52:49 +02:00
parent eec4f52b5a
commit ee88f1ff30
22 changed files with 1162 additions and 263 deletions
+23 -7
View File
@@ -8,6 +8,7 @@ param(
$ErrorActionPreference = 'Stop'
$Root = Split-Path -Parent $PSCommandPath
$PluginProject = Join-Path $Root 'Plugin\PlandentMstscScriptHook.vcxproj'
$ServerTriggerProject = Join-Path $Root 'ServerTrigger\PlandentRdpClientTrigger.vcxproj'
$ConfiguratorProject = Join-Path $Root 'Configurator\Configurator.csproj'
$Dist = Join-Path $Root 'dist'
$Artifacts = Join-Path $Root 'artifacts'
@@ -35,7 +36,8 @@ if ($Clean) {
New-Item -ItemType Directory -Path $Dist -Force | Out-Null
$MSBuild = Find-MSBuild
Write-Host "[1/2] Native MSTSC Plugin-DLL bauen ($Configuration|x64)..." -ForegroundColor Cyan
Write-Host "[1/3] Native MSTSC Plugin-DLL bauen ($Configuration|x64)..." -ForegroundColor Cyan
& $MSBuild $PluginProject /m /nologo "/p:Configuration=$Configuration" '/p:Platform=x64'
if ($LASTEXITCODE -ne 0) {
throw "Native DLL Build fehlgeschlagen (ExitCode $LASTEXITCODE)."
@@ -46,7 +48,19 @@ if (-not (Test-Path $PluginDll)) {
throw "Erwartete DLL wurde nicht erzeugt: $PluginDll"
}
Write-Host "[2/2] Konfigurations-EXE als x64 Single-File veröffentlichen..." -ForegroundColor Cyan
Write-Host "[2/3] Terminalserver-Trigger bauen ($Configuration|x64)..." -ForegroundColor Cyan
& $MSBuild $ServerTriggerProject /m /nologo "/p:Configuration=$Configuration" '/p:Platform=x64'
if ($LASTEXITCODE -ne 0) {
throw "Server-Trigger Build fehlgeschlagen (ExitCode $LASTEXITCODE)."
}
$ServerTriggerExe = Join-Path $Artifacts "x64\$Configuration\PlandentRdpClientTrigger.exe"
if (-not (Test-Path $ServerTriggerExe)) {
throw "Erwartete Server-Trigger-EXE wurde nicht erzeugt: $ServerTriggerExe"
}
Copy-Item $ServerTriggerExe (Join-Path $Dist 'PlandentRdpClientTrigger.exe') -Force
Write-Host "[3/3] Client-Konfigurations-EXE als x64 Single-File veröffentlichen..." -ForegroundColor Cyan
& dotnet publish $ConfiguratorProject `
-c $Configuration `
-r win-x64 `
@@ -60,13 +74,15 @@ if ($LASTEXITCODE -ne 0) {
throw "Configurator Publish fehlgeschlagen (ExitCode $LASTEXITCODE)."
}
$Exe = Join-Path $Dist 'PlandentMstscScriptHook.exe'
if (-not (Test-Path $Exe)) {
throw "Erwartete EXE wurde nicht erzeugt: $Exe"
$ConfiguratorExe = Join-Path $Dist 'PlandentMstscScriptHook.exe'
if (-not (Test-Path $ConfiguratorExe)) {
throw "Erwartete Konfigurations-EXE wurde nicht erzeugt: $ConfiguratorExe"
}
Write-Host ''
Write-Host 'Build erfolgreich:' -ForegroundColor Green
Write-Host " $Exe"
Write-Host " Client: $ConfiguratorExe"
Write-Host " Server: $(Join-Path $Dist 'PlandentRdpClientTrigger.exe')"
Write-Host ''
Write-Host 'Diese EXE enthält die native DLL als eingebettete Resource.'
Write-Host 'Die Client-EXE enthält die native MSTSC-Plugin-DLL als eingebettete Resource.'
Write-Host 'Die Server-EXE sendet ausschließlich den festen START-Trigger über den RDP-DVC.'