feat: initiale Version 0.1.0 des MSTSC Script Hooks

- Native x64 MSTSC-DVC-Erweiterung für lokalen Programmstart
- Automatischer Script-/Programmstart bei RDP-Verbindungsaufbau
- Separater Programmstart über Trigger innerhalb der RDP-Sitzung
- Bidirektionaler DVC zur Ermittlung des lokalen Client-Hostnamens
- SIOMIN-Trigger zur Anbindung lokaler Sidexis-Installationen
- SIOMIN-Datensatzlängen und Hostname-Felder bytegenau angepasst
- Temporäre SIOMIN-Einträge nach erfolgreicher Übernahme bereinigt
- Native Win32-Konfigurationsoberfläche ohne .NET-Abhängigkeit
- Mehrfachstartschutz und optionaler unsichtbarer Programmstart
- Debug- und Plugin-Logging ergänzt
- RemoteVDDS-Anwendungsfall integriert
- Installer/Registrierung des MSTSC-Plugins über Client-Konfigurator
- Techniker-, Entwickler- und Projektdokumentation ergänzt
- Proprietäre Lizenz für Copyright Patrick Gniza hinzugefügt
This commit is contained in:
2026-08-11 16:32:33 +02:00
parent ee88f1ff30
commit 4c51989600
37 changed files with 4885 additions and 1475 deletions
+23 -41
View File
@@ -7,11 +7,10 @@ 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'
$Solution = Join-Path $Root 'PlandentMstscScriptHook.sln'
$Dist = Join-Path $Root 'dist'
$Artifacts = Join-Path $Root 'artifacts'
$GeneratedPayload = Join-Path $Root 'Configurator\Generated'
function Find-MSBuild {
$cmd = Get-Command msbuild.exe -ErrorAction SilentlyContinue
@@ -31,58 +30,41 @@ function Find-MSBuild {
if ($Clean) {
Remove-Item $Artifacts -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item $Dist -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item $GeneratedPayload -Recurse -Force -ErrorAction SilentlyContinue
}
New-Item -ItemType Directory -Path $Dist -Force | Out-Null
$MSBuild = Find-MSBuild
Write-Host "[1/3] Native MSTSC Plugin-DLL bauen ($Configuration|x64)..." -ForegroundColor Cyan
& $MSBuild $PluginProject /m /nologo "/p:Configuration=$Configuration" '/p:Platform=x64'
Write-Host "[1/2] Native x64-Projektmappe neu bauen ($Configuration|x64)..." -ForegroundColor Cyan
& $MSBuild $Solution /t:Rebuild /m /nologo "/p:Configuration=$Configuration" '/p:Platform=x64'
if ($LASTEXITCODE -ne 0) {
throw "Native DLL Build fehlgeschlagen (ExitCode $LASTEXITCODE)."
throw "Build fehlgeschlagen (ExitCode $LASTEXITCODE)."
}
$PluginDll = Join-Path $Artifacts "x64\$Configuration\PlandentMstscScriptHook.dll"
if (-not (Test-Path $PluginDll)) {
throw "Erwartete DLL wurde nicht erzeugt: $PluginDll"
}
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)."
}
$ConfiguratorExe = Join-Path $Artifacts "x64\$Configuration\PlandentMstscScriptHook.exe"
$ServerTriggerExe = Join-Path $Artifacts "x64\$Configuration\PlandentRdpClientTrigger.exe"
if (-not (Test-Path $ServerTriggerExe)) {
throw "Erwartete Server-Trigger-EXE wurde nicht erzeugt: $ServerTriggerExe"
$SiominTriggerExe = Join-Path $Artifacts "x64\$Configuration\PlandentSiominClientTrigger.exe"
foreach ($file in @($PluginDll, $ConfiguratorExe, $ServerTriggerExe, $SiominTriggerExe)) {
if (-not (Test-Path $file)) {
throw "Erwartete Build-Datei wurde nicht erzeugt: $file"
}
}
Write-Host '[2/2] Verteilbare Dateien nach dist kopieren...' -ForegroundColor Cyan
Copy-Item $ConfiguratorExe (Join-Path $Dist 'PlandentMstscScriptHook.exe') -Force
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 `
--self-contained true `
-p:Platform=x64 `
-p:PublishSingleFile=true `
-p:DebugType=embedded `
-p:DebugSymbols=false `
-o $Dist
if ($LASTEXITCODE -ne 0) {
throw "Configurator Publish fehlgeschlagen (ExitCode $LASTEXITCODE)."
}
$ConfiguratorExe = Join-Path $Dist 'PlandentMstscScriptHook.exe'
if (-not (Test-Path $ConfiguratorExe)) {
throw "Erwartete Konfigurations-EXE wurde nicht erzeugt: $ConfiguratorExe"
}
Copy-Item $SiominTriggerExe (Join-Path $Dist 'PlandentSiominClientTrigger.exe') -Force
Write-Host ''
Write-Host 'Build erfolgreich:' -ForegroundColor Green
Write-Host " Client: $ConfiguratorExe"
Write-Host " Client: $(Join-Path $Dist 'PlandentMstscScriptHook.exe')"
Write-Host " Server: $(Join-Path $Dist 'PlandentRdpClientTrigger.exe')"
Write-Host " SIOMIN: $(Join-Path $Dist 'PlandentSiominClientTrigger.exe')"
Write-Host ''
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.'
Write-Host 'Alle Komponenten sind native x64-C++-Binaries; .NET/NuGet wird nicht benötigt.'
Write-Host 'Die Client-EXE enthält die native MSTSC-Plugin-DLL als RCDATA-Resource.'
Write-Host 'Die generische Server-EXE sendet ausschließlich den festen START-Trigger über den RDP-DVC.'
Write-Host 'Die SIOMIN-EXE fragt den Client-Hostname über den DVC ab, passt die SDX bytegenau an und sendet danach START.'