diff --git a/Dokumentation/Classes/cExtProgramme.vb b/Dokumentation/Classes/cExtProgramme.vb index 538a76f..143429d 100644 --- a/Dokumentation/Classes/cExtProgramme.vb +++ b/Dokumentation/Classes/cExtProgramme.vb @@ -272,11 +272,12 @@ Public Class cExtProgramme Threading.Thread.Sleep(3000) End If - + Dim rdpfile As String = RDPFileErstellen(host) mstsc.StartInfo.FileName = "mstsc.exe" mstsc.StartInfo.UseShellExecute = False - mstsc.StartInfo.Arguments = " /v: " & host & rdpASadmin & FensterString + 'mstsc.StartInfo.Arguments = " /v: " & host & rdpASadmin & FensterString + mstsc.StartInfo.Arguments = " " & rdpfile mstsc.Start() @@ -292,4 +293,73 @@ Public Class cExtProgramme End Function + Public Shared Function RDPFileErstellen(targetaddress As String) As String + + ' 1. Zieladresse (kann z. B. per Eingabe oder aus Konfig kommen) + 'Dim targetAddress As String = "haas-vm.verag.ost.dmn" ' <-- Hier Ziel ändern oder dynamisch setzen + + ' 2. Pfad zum Startordner und zur RDP-Datei + Dim startPath As String = AppDomain.CurrentDomain.BaseDirectory + Dim rdpFilePath As String = Path.Combine(startPath, "RemoteConnection.rdp") + + ' 3. RDP-Inhalt mit Platzhalter für das Zielsystem + Dim rdpTemplate As String = " +screen mode id:i:1 +desktopwidth:i:1920 +desktopheight:i:1080 +session bpp:i:32 +winposstr:s:0,1,-2219,191,-283,1310 +compression:i:1 +keyboardhook:i:1 +audiocapturemode:i:0 +videoplaybackmode:i:1 +connection type:i:7 +networkautodetect:i:1 +bandwidthautodetect:i:1 +displayconnectionbar:i:1 +enableworkspacereconnect:i:0 +disable wallpaper:i:0 +allow font smoothing:i:0 +allow desktop composition:i:0 +disable full window drag:i:1 +disable menu anims:i:1 +disable themes:i:0 +disable cursor setting:i:0 +bitmapcachepersistenable:i:1 +full address:s:{TARGET} +audiomode:i:0 +redirectprinters:i:1 +redirectlocation:i:0 +redirectcomports:i:0 +redirectsmartcards:i:1 +redirectwebauthn:i:1 +redirectclipboard:i:1 +redirectposdevices:i:0 +autoreconnection enabled:i:1 +authentication level:i:2 +prompt for credentials:i:0 +negotiate security layer:i:1 +remoteapplicationmode:i:0 +alternate shell:s: +shell working directory:s: +gatewayhostname:s: +gatewayusagemethod:i:4 +gatewaycredentialssource:i:4 +gatewayprofileusagemethod:i:0 +promptcredentialonce:i:0 +gatewaybrokeringtype:i:0 +use redirection server name:i:0 +rdgiskdcproxy:i:0 +kdcproxyname:s: +enablerdsaadauth:i:0 +use multimon:i:0".Trim() + + ' 4. {TARGET} durch tatsächliche Adresse ersetzen + Dim rdpContent As String = rdpTemplate.Replace("{TARGET}", targetaddress) + + ' 5. Datei schreiben + File.WriteAllText(rdpFilePath, rdpContent) + Return rdpFilePath + End Function + End Class diff --git a/Dokumentation/Dokumentation.vbproj b/Dokumentation/Dokumentation.vbproj index bd5f88c..900d50e 100644 --- a/Dokumentation/Dokumentation.vbproj +++ b/Dokumentation/Dokumentation.vbproj @@ -683,9 +683,9 @@ DokuDataSet.xsd - - PreserveNewest - + + Always + MyApplicationCodeGenerator diff --git a/Dokumentation/My Project/Resources.Designer.vb b/Dokumentation/My Project/Resources.Designer.vb index 79e80e9..2d6e32d 100644 --- a/Dokumentation/My Project/Resources.Designer.vb +++ b/Dokumentation/My Project/Resources.Designer.vb @@ -319,7 +319,7 @@ Namespace My.Resources End Property ''' - ''' Sucht eine lokalisierte Zeichenfolge, die 0.0.2.04 ähnelt. + ''' Sucht eine lokalisierte Zeichenfolge, die 0.0.2.05 ähnelt. ''' Friend ReadOnly Property Version() As String Get diff --git a/Dokumentation/My Project/Resources.resx b/Dokumentation/My Project/Resources.resx index a262309..94ae7fa 100644 --- a/Dokumentation/My Project/Resources.resx +++ b/Dokumentation/My Project/Resources.resx @@ -137,7 +137,7 @@ ..\Resources\mail20.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - 0.0.2.04 + 0.0.2.05 ..\Resources\Link.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a diff --git a/Dokumentation/uscntr_DomUserList.vb b/Dokumentation/uscntr_DomUserList.vb index 23d7758..2fecbcd 100644 --- a/Dokumentation/uscntr_DomUserList.vb +++ b/Dokumentation/uscntr_DomUserList.vb @@ -111,7 +111,10 @@ Public Class uscntr_DomUserList usrcntrl.DomUser = testuser usrcntrl.Dock = DockStyle.Fill : frm.PanMain.Controls.Add(usrcntrl) frm.Size = usrcntrl.Size - Me.Parent.Enabled = False + + 'Graut im Hintergrund aus, macht aber nicht viel Sinn, deswegen deaktiviert + 'Me.Parent.Enabled = False + AddHandler frm.FormClosing, Function() Try