Bugfixes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user