RDP Verbindungen mit AutoIT - RDP Fenster eingebettet in eigene GUI - Beispiel mit allen Parametern

  • Moin,

    auf der Suche danach wie ich ein Fenster einer RDP Sitzung in eine eigene GUI einbinden kann bin ich auf ein Beispiel im Internet gestoßen:
    http://www.autoitscript.com/forum/topic/39…bed-rdp-in-gui/

    Für alle die es nicht kennen: RDP = Remote Desktop Verbindung (schaut mal im Startmenü nach, das habt auch Ihr, heisst Remotdesktopclient oder Remotedesktopverbindung), damit kann man sich mit entfernten Rechnern verbinden.

    Naja, da hatte ich einige Parameter vermisst - z.B. wie ich ein Passwort übergeben kann, z.B. für AutoLogon.
    Die Parameter dazu habe ich mir aus einigen Microsoft Webseiten zusammensuchen können - und möchte die "Sammlung" euch nicht vorenthalten (in der Suche hier fand ich dazu nichts)

    Das Beispiel stammt nahezu 1:1 vom obigen Link (Ich will mich nicht mit falschen Lorbeeren schmücken), ich habe es nur ergänzt um Sachen die mir Wichtig waren.
    Den Server, Benutzernamen und Passwort darin müsst Ihr natürlich anpassen an einen Rechner wo Ihr mit RDP raufkommt. (Bei den Parametern findet Ihr auch den, der den Port ändert)

    Beispielskript:

    Spoiler anzeigen
    [autoit]


    ; gefunden unter http://www.autoitscript.com/forum/topic/39…bed-rdp-in-gui/ (aus dem Jahre 2007)
    ; ergänzt durch BLinz Oktober 2011 für autoit.de
    ; Demo für eine RDP Sitzung - Wobei das RDP Fenster innerhalb einer eigenen GUI sitzt

    [/autoit] [autoit][/autoit] [autoit]

    #include <GUIConstants.au3>
    #include <WindowsConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    $oRDP = ObjCreate("MsTscAx.MsTscAx")
    GUICreate("Embedded RDP control Test", 640, 480, -1 , -1, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)
    $GUIActiveX = GUICtrlCreateObj($oRDP, 10, 10, 620, 460)
    GUICtrlSetStyle ( $GUIActiveX, $WS_VISIBLE )
    GUICtrlSetResizing ($GUIActiveX,$GUI_DOCKAUTO)

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState()

    [/autoit] [autoit][/autoit] [autoit]

    $oRDP.Server = "FILESERVER.meinnetzwerk.local" ;NetBIOS, DNS oder IP des Gerätes
    $oRDP.Domain = "FILESERVER" ;Anmeldedomäne (Rechnername oder NetBIOS Domänenname)
    $oRDP.UserName = "Mustermann" ; Benutzername
    $oRDP.AdvancedSettings2.ClearTextPassword = "Passw0rd" ; das Passwort dazu
    $oRDP.FullScreen = False ; Vollbild ja/nein - hat nichts mit der Auflösung zu tun
    $oRDP.AdvancedSettings2.RedirectDrives = True ; Sollen die Laufwerke mitgenommen werden
    $oRDP.AdvancedSettings2.RedirectPrinters = False ; Sollen die Drucker mitgenommen werden
    $oRDP.AdvancedSettings2.RedirectPorts = False ; Ports wie LPT1 etc
    $oRDP.AdvancedSettings2.RedirectSmartCards = False ; SmartCards für Authentifizierung
    $oRDP.ConnectingText = "Ich verbinde jetzt ...." ; Text der erscheint bevor das Bild des Servers erscheint
    ; Nachfolgende Zeilen von eigenen Test's - ich musste mal das mit den "AdvancedSettings2" 3 4 etc. ausklingeln
    $oRDP.AdvancedSettings2.EnableAutoReconnect = True
    $oRDP.AdvancedSettings2.allowBackgroundInput = true
    $oRDP.AdvancedSettings2.ConnectionBarShowRestoreButton = False
    $oRDP.AdvancedSettings5.AudioRedirectionMode = 0

    [/autoit] [autoit][/autoit] [autoit]

    $oRDP.Connect()

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
    ExitLoop
    EndSelect
    WEnd
    GUIDelete()
    Exit

    [/autoit]

    Alle Parameter dafür bis RDP Version 7 (ist die aktuelle bis Windows Server 2008R2 / Windows 7) findet Ihr nachfolgend.
    Das AdvancedSettings2 - die Zahl am Ende, hier 2, steht für die RDP Version ab der es funktioniert.

    Alle Parameter als AutoIt Code - Kommentar

    Spoiler anzeigen
    [autoit]


    ;Hier noch mal alle Parameter bis RDP Version 7
    ;Das "AdvancedSettings2" <- die Zahl am Ende Symbolisiert ab welcher RDP Version dieser Parameter verfügbar ist

    [/autoit] [autoit][/autoit] [autoit]

    ;CipherStrength Read-only The maximum encryption strength of the current control.
    ;Connected Read-only The connection state of the current control.
    ;ConnectingText Read/write The text that appears centered in the control while the control is connecting.
    ;DesktopHeight Read/write The current control's height, in pixels, on the initial remote desktop.
    ;DesktopWidth Read/write The current control's width, in pixels, on the initial remote desktop.
    ;DisconnectedText Read/write The text that appears centered in the control before a connection is terminated.
    ;Domain Read/write The domain to which the current user logs on.
    ;FullScreenTitle Write-only The window title displayed when the control is in full-screen mode.
    ;HorizontalScrollBarVisible Read-only Indicates whether the control has displayed a horizontal scroll bar.
    ;SecuredSettings Read-only A IMsTscSecuredSettings interface pointer.
    ;SecuredSettingsEnabled Read-only Indicates whether the IMsTscSecuredSettings interface is available.
    ;Server Read/write The name of the server to which the current control is connected.
    ;StartConnected Read/write Indicates whether the control will establish the RD Session Host server connection immediately upon startup.
    ;UserName Read/write The user name logon credential.
    ;Version Read-only The version number of the current control.
    ;VerticalScrollBarVisible Read-only Indicates whether the control displays a vertical scroll bar.
    ;AdvancedSettings2.AcceleratorPassthrough Read/write Specifies if keyboard accelerators should be passed to the server.
    ;AdvancedSettings2.BitmapCacheSize Read/write The size, in kilobytes, of the bitmap cache file used for 8-bits-per-pixel bitmaps. Valid numeric values of this property are 1 to 32 inclusive.
    ;AdvancedSettings2.BitmapPersistence Read/write Specifies if persistent bitmap caching should be used. Persistent caching can improve performance but requires additional disk space.
    ;AdvancedSettings2.BitmapVirtualCache16BppSize Read/write Specifies the size, in megabytes, of the persistent bitmap cache file to use for the 15 and 16 bits-per-pixel high-color settings.
    ;AdvancedSettings2.BitmapVirtualCache24BppSize Read/write Specifies the size, in megabytes, of the persistent bitmap cache file to use for the 24 bits-per-pixel high-color setting.
    ;AdvancedSettings2.BitmapVirtualCacheSize Read/write Specifies the size, in megabytes, of the persistent bitmap cache file to use for 8-bits-per-pixel color. Valid numeric values of this property are 1 to 32 inclusive. Note that the maximum size for all virtual cache files is 128 MB. Related properties include the BitmapVirtualCache16BppSize and BitmapVirtualCache24BppSize properties.
    ;AdvancedSettings2.brushSupportLevel Read/write This property is not supported.
    ;AdvancedSettings2.CachePersistenceActive Read/write Specifies whether persistent bitmap caching should be used.
    ;AdvancedSettings2.ClearTextPassword Write-only Specifies the password with which to connect. For more information, see the IMsTscNonScriptable interface.
    ;AdvancedSettings2.ConnectToServerConsole Read/write Windows Server 2003, Windows XP with SP2, Windows XP with SP1, and Windows XP: Specifies if the control should attempt to connect to the console session of a server.
    ;AdvancedSettings2.ConnectWithEndpoint Write-only This property is not supported.
    ;AdvancedSettings2.DedicatedTerminal Read/write Windows XP with SP1 and Windows XP: Specifies if the client should run in dedicated-terminal mode.
    ;AdvancedSettings2.DisableCtrlAltDel Read/write Specifies if the initial explanatory screen in Winlogon should display.
    ;AdvancedSettings2.DisplayConnectionBar Read/write Specifies whether to use the connection bar. The default value is VARIANT_TRUE, which enables the property.
    ;AdvancedSettings2.DoubleClickDetect Read/write Specifies if the client identifies double-clicks for the server.
    ;AdvancedSettings2.EnableMouse Read/write Windows XP with SP1 and Windows XP: Specifies if the client sends mouse-button messages to the server.
    ;AdvancedSettings2.EnableWindowsKey Read/write Specifies if the Windows key can be used in the remote session.
    ;AdvancedSettings2.EncryptionEnabled Read/write This property is not supported. Encryption cannot be disabled.
    ;AdvancedSettings2.GrabFocusOnConnect Read/write Specifies if the client control should have the focus while connecting.
    ;AdvancedSettings2.HotKeyAltEsc Read/write Specifies the virtual-key code to add to ALT to determine the hotkey replacement for ALT+ESC. VK_INSERT is the default value, with ALT+INSERT as the resulting sequence. This property is valid only when the KeyboardHookMode property is not enabled.
    ;AdvancedSettings2.HotKeyAltShiftTab Read/write Specifies the virtual-key code to add to ALT to determine the hotkey replacement for ALT+SHIFT+TAB. VK_NEXT is the default value, with ALT+PAGE DOWN as the resulting sequence. This property is valid only when the KeyboardHookMode property is not enabled.
    ;AdvancedSettings2.HotKeyAltSpace Read/write Specifies the virtual-key code to add to ALT to determine the hotkey replacement for ALT+SPACE. VK_DELETE is the default, with ALT+DELETE as the resulting sequence. This property is valid only when the KeyboardHookMode property is not enabled.
    ;AdvancedSettings2.HotKeyAltTab Read/write Specifies the virtual-key code to add to ALT to determine the hotkey replacement for ALT+TAB. VK_PRIOR is the default value, with ALT+PAGE UP as the resulting sequence. This property is valid only when the KeyboardHookMode property is not enabled.
    ;AdvancedSettings2.HotKeyCtrlAltDel Read/write Specifies the virtual-key code to add to CTRL+ALT to determine the hotkey replacement for CTRL+ALT+DELETE, also called the secure attention sequence (SAS). VK_END is the default. Note that even when the KeyboardHookMode property is enabled, CTRL+ALT+DELETE is never redirected to the remote server; CTRL+ALT+DELETE is the local SAS sequence.
    ;AdvancedSettings2.HotKeyCtrlEsc Read/write Specifies the virtual-key code to add to ALT to determine the hotkey replacement for CTRL+ESC. VK_HOME is the default value, with ALT+HOME as the resulting sequence. This property is valid only when the KeyboardHookMode property is not enabled.
    ;AdvancedSettings2.HotKeyFullScreen Read/write Specifies the virtual-key code to add to CTRL+ALT to determine the hotkey replacement for switching to full-screen mode. VK_CANCEL is the default value.
    ;AdvancedSettings2.InputEventsAtOnce Read/write This property is not supported. Windows XP with SP1 and Windows XP: Specifies the typical number of input events to batch together.
    ;AdvancedSettings2.keepAliveInterval Read/write Specifies an interval, in milliseconds, at which the client sends keep-alive messages to the server. The default value of the property is zero, which disables keep-alive messages. The minimum valid value of this property is 10,000, which represents 10 seconds. Note that a group policy setting that specifies whether persistent client connections to the server are allowed can override this property setting.
    ;AdvancedSettings2.KeyboardFunctionKey Read/write Valid for Windows CE only.
    ;AdvancedSettings2.KeyboardSubType Read/write Valid for Windows CE only.
    ;AdvancedSettings2.KeyboardType Read/write Valid for Windows CE only.
    ;AdvancedSettings2.LoadBalanceInfo Read/write Specifies the load balancing cookie that will be placed in the X.224 Connection Request packet in the RD Session Host server protocol connection sequence.
    ;AdvancedSettings2.maxEventCount Read/write This property is not supported. Windows XP with SP1 and Windows XP: Specifies the maximum number of input events to batch together.
    ;AdvancedSettings2.MaximizeShell Read/write Specifies if programs launched with the StartProgram property should be maximized.
    ;AdvancedSettings2.minInputSendInterval Read/write Specifies the minimum interval, in milliseconds, between the sending of mouse events.
    ;AdvancedSettings2.MinutesToIdleTimeout Read/write Specifies the maximum length of time, in minutes, that the client should remain connected without user input. If the specified time elapses, the control calls the IMsTscAxEvents::OnIdleTimeoutNotification method.
    ;AdvancedSettings2.NotifyTSPublicKey Read/write This property is not supported.
    ;AdvancedSettings2.NumBitmapCaches Read/write This property is not supported. Windows XP with SP1 and Windows XP: Specifies the number of bitmap caches to use.
    ;AdvancedSettings2.orderDrawThreshold Read/write This property is not supported. Windows XP with SP1 and Windows XP: Specifies the maximum number of drawing operations to batch together for rendering.
    ;AdvancedSettings2.overallConnectionTimeout Read/write Specifies the total length of time, in seconds, that the client control waits for a connection to complete. The maximum valid value of this property is 600, which represents 10 minutes. If the specified time elapses before connection completes, the control disconnects and calls the IMsTscAxEvents::OnDisconnected method. A related property is singleConnectionTimeout.
    ;AdvancedSettings2.PerformanceFlags Read/write Specifies a set of features that can be set at the server to improve performance.
    ;AdvancedSettings2.PersistCacheDirectory Write-only This property is not supported. Windows XP with SP1 and Windows XP: Specifies the path to the directory for storage of bitmap cache files.
    ;AdvancedSettings2.PinConnectionBar Read/write Specifies the state of the UI connection bar. Setting this property to VARIANT_TRUE sets the state to "lowered", that is, invisible to the user and unavailable for input. VARIANT_FALSE sets the state to "raised" and available for user input.
    ;AdvancedSettings2.RdpdrClipCleanTempDirString Read/write Windows XP with SP1 and Windows XP: Specifies the message to be displayed before exiting while the client control is deleting files in a temporary directory; for example, "Cleaning up temporary directory"
    ;AdvancedSettings2.RdpdrClipPasteInfoString Read/write Windows XP with SP1 and Windows XP: Specifies the message to be displayed while the client control processes clipboard information in preparation for pasting the data; for example, "Preparing to paste information".
    ;AdvancedSettings2.RdpdrLocalPrintingDocName Read/write Windows XP with SP1 and Windows XP: Specifies the name to be used for printer documents that are redirected; for example, "Remote Desktop Redirected Printer Document".
    ;AdvancedSettings2.RDPPort Read/write Specifies the connection port. The default value is 3389.
    ;AdvancedSettings2.RedirectDrives Read/write Specifies if redirection of disk drives is allowed.
    ;AdvancedSettings2.RedirectPorts Read/write Specifies if redirection of local ports (for example, COM and LPT) is allowed.
    ;AdvancedSettings2.RedirectPrinters Read/write Specifies if redirection of printers is allowed.
    ;AdvancedSettings2.RedirectSmartCards Read/write Specifies if redirection of smart cards is allowed.
    ;AdvancedSettings2.SasSequence Read/write Specifies the secure access sequence the client will use to access the login screen on the server.
    ;AdvancedSettings2.ScaleBitmapCachesByBPP Read/write Windows XP with SP1 and Windows XP: Specifies if the size of bitmap caches should be scaled by bit depth (bits per pixel). The default value, enabled or nonzero, is recommended.
    ;AdvancedSettings2.ShadowBitmap Read/write Windows Vista, Windows Server 2003, and Windows XP: Specifies if shadow bitmaps should be used.
    ;AdvancedSettings2.shutdownTimeout Read/write Specifies the length of time, in seconds, to wait for the server to respond to a disconnection request. The default value of the property is 10. The maximum valid value of the property is 600, which represents 10 minutes. If the server does not reply within the specified time, the client control disconnects.
    ;AdvancedSettings2.singleConnectionTimeout Read/write Specifies the maximum length of time, in seconds, that the client control waits for a connection to an IP address. During connection the control may attempt to connect to multiple IP addresses. The maximum valid value of this property is 600. A related property is overallConnectionTimeout.
    ;AdvancedSettings2.SmartSizing Read/write Specifies if the display should be scaled to fit the client area of the control. VARIANT_TRUE enables scaling. Note that scroll bars do not appear when the SmartSizing property is enabled.
    ;AdvancedSettings2.SmoothScroll Read/write Windows XP with SP1 and Windows XP: Specifies if the Remote Desktop window should scroll smoothly when scroll bars are used. The default is a nonzero value, which enables smooth scrolling and increases the scrolling response on slower computers. The property has no effect on scrolling in the actual remote session.
    ;AdvancedSettings2.TransportType Read/write Specifies the transport type used by the client. This property is not used by the Remote Desktop ActiveX control.
    ;AdvancedSettings2.WinCEFixedPalette Read/write Valid for Windows CE only.
    ;AdvancedSettings2.CanAutoReconnect Read-only Specifies whether the client control is able to reconnect automatically to the current session in the event of a network disconnection.
    ;AdvancedSettings2.EnableAutoReconnect Read/write Specifies whether to enable the client control to reconnect automatically to a session in the event of a network disconnection.
    ;AdvancedSettings2.MaxReconnectAttempts Read/write Specifies the number of times to try to reconnect during automatic reconnection. The valid values of this property are 0 to 200 inclusive.
    ;AdvancedSettings2.allowBackgroundInput Read/write Specifies whether background input mode is enabled.
    ;AdvancedSettings2.BitmapPeristence Read/write Specifies whether bitmap caching is enabled. Note The spelling error in the name of the property is in the released version of the control.
    ;AdvancedSettings2.Compress Read/write Specifies whether compression is enabled.
    ;AdvancedSettings2.ContainerHandledFullScreen Read/write Specifies whether the container-handled full-screen mode is enabled.
    ;AdvancedSettings2.DisableRdpdr Read/write Specifies whether printer and clipboard redirection is enabled.
    ;AdvancedSettings2.IconFile Write-only Specifies the name of the file containing icon data that will be accessed when displaying the client in full-screen mode.
    ;AdvancedSettings2.IconIndex Write-only Specifies the index of the icon within the current icon file.
    ;AdvancedSettings2.KeyBoardLayoutStr Write-only Specifies the name of the active input locale identifier (formerly called the keyboard layout) to use for the connection.
    ;AdvancedSettings2.PluginDlls Write-only Specifies the names of virtual channel client DLLs to be loaded.
    ;AdvancedSettings4.AuthenticationLevel Read/write Specifies the authentication level to use for the connection.;AdvancedSettings3.ConnectionBarShowMinimizeButton Read/write Specifies whether to display the Minimize button on the connection bar.
    ;AdvancedSettings3.ConnectionBarShowRestoreButton Read/write Specifies whether to display the Restore button on the connection bar.
    ;AdvancedSettings5.AudioRedirectionMode Read/write The audio redirection mode. The AudioRedirectionMode property has the following possible values.
    ; AUDIO_MODE_REDIRECT 0 (Audio redirection is enabled and the option for redirection is "Bring to this computer". This is the default mode.)
    ; AUDIO_MODE_PLAY_ON_SERVER 1 (Audio redirection is enabled and the option is "Leave at remote computer". The "Leave at remote computer" option is supported only when connecting remotely to a host computer that is running Windows Vista. If the connection is to a host computer that is running Windows Server 2008, the option "Leave at remote computer" is changed to "Do not play". )
    ; AUDIO_MODE_NONE 2 (Audio redirection is enabled and the mode is "Do not play".)
    ;AdvancedSettings5.BitmapVirtualCache32BppSize Read/write Specifies the virtual cache file size for 32 bits per pixel (bpp) bitmaps. The maximum value is 48 megabytes (MB).
    ;AdvancedSettings5.ConnectionBarShowPinButton Read/write Specifies whether the pin button should be shown on the connection bar. By default, the value is TRUE.
    ;AdvancedSettings5.PublicMode Read/write Specifies whether public mode should be enabled or disabled. By default, public mode is set to FALSE.
    ;AdvancedSettings5.RedirectClipboard Read/write Specifies whether clipboard redirection should be enabled or disabled. By default, clipboard redirection mode is set to TRUE (enabled).
    ;AdvancedSettings5.RedirectDevices Read/write Specifies whether redirected devices should be enabled or disabled. By default, redirected devices mode is set to FALSE.
    ;AdvancedSettings5.RedirectPOSDevices Read/write Specifies whether Point of Service redirected devices should be enabled or disabled. By default, Point of Service redirected devices mode is set to FALSE.
    ;AdvancedSettings6.AuthenticationServiceClass Read/write Specifies the service principal name (SPN) to use for authentication to the server.
    ;AdvancedSettings6.AuthenticationType Read-only Specifies the type of authentication used for this connection.
    ;AdvancedSettings6.ConnectToAdministerServer Read/write Retrieves or specifies whether the ActiveX control should attempt to connect to the server for administrative purposes.
    ;AdvancedSettings6.EnableCredSspSupport Read/write Specifies whether the Credential Security Service Provider (CredSSP) is enabled for this connection.
    ;AdvancedSettings6.HotKeyFocusReleaseLeft Read/write Specifies the virtual-key code to add to CTRL+ALT to determine the hotkey replacement for CTRL+ALT+LEFT ARROW.
    ;AdvancedSettings6.HotKeyFocusReleaseRight Read/write Specifies the virtual-key code to add to CTRL+ALT to determine the hotkey replacement for CTRL+ALT+RIGHT ARROW.
    ;AdvancedSettings6.PCB Read/write Specifies the preconnection BLOB (PCB) setting to use prior to connecting for transmission to the server.
    ;AdvancedSettings6.RelativeMouseMode Read/write Specifies whether the mouse should use relative mode.
    ;AdvancedSettings7.AudioCaptureRedirectionMode Read/write Specifies or retrieves a value that indicates whether the default audio input device is redirected from the client to the remote session.
    ;AdvancedSettings7.AudioQualityMode Read/write Specifies or retrieves a value that indicates the audio quality mode setting for redirected audio.
    ;AdvancedSettings7.EnableSuperPan Read/write Specifies or retrieves a value that indicates whether SuperPan is enabled or disabled.
    ;AdvancedSettings7.NetworkConnectionType Read/write Specifies or retrieves a value that indicates the network connection type.
    ;AdvancedSettings7.RedirectDirectX Read/write This property is not used.
    ;AdvancedSettings7.SuperPanAccelerationFactor Read/write Specifies or retrieves a value that indicates the SuperPan acceleration factor.
    ;AdvancedSettings7.VideoPlaybackMode Read/write Specifies or retrieves a value that indicates the video playback mode.

    [/autoit]


    (Ich habe den Kommentar so in meinen privaten Beispielen und Gedächnisstützen - und anders sah es noch schlimmer aus)

    Das komplette Skript hab ich zum Download hier herangehängt.

    BLinz(ler)

  • Hy BLinz,

    ich find das ja super geil :D

    Danke für die Mühe.
    Kann ich fein gebrauchen.....

    MfG Schnuffel

    "Sarkasmus ist die niedrigste Form des Witzes, aber die höchste Form der Intelligenz."
    Val McDermid

    ein paar Infos ...

    Wer mehr als "nur" Hilfe benötigt, kann sich gern im Forum "Programmieranfragen" an uns wenden. Wir helfen in allen Fällen, die die Forenregeln zulassen.

    Für schnelle Hilfe benötigen wir ein ! lauffähiges ! Script, dass wir als Demonstration des Problems testen können. Wer von uns erwartet ein Teilscript erstmal lauffähig zu bekommen, der hat
    1. keine wirkliche Not
    2. keinen Respekt vor Menschen die ihm in ihrer Freizeit Ihre Hilfe anbieten
    3. oder ist einfach nur faul und meint wir coden das für ihn

    In solchen Fällen erlaube ich mir, die Anfrage einfach zu ignorieren. ;)

  • Hallo BLinz,

    eine Sache ist mir noch aufgefallen.
    Wenn man die GUI minimiert und wieder herstellt wird der Inhalt nicht neu gezeichnet.

    Wenn das auch noch geht, dann ist das Script perfekt ;)

    MfG Schnuffel

    "Sarkasmus ist die niedrigste Form des Witzes, aber die höchste Form der Intelligenz."
    Val McDermid

    ein paar Infos ...

    Wer mehr als "nur" Hilfe benötigt, kann sich gern im Forum "Programmieranfragen" an uns wenden. Wir helfen in allen Fällen, die die Forenregeln zulassen.

    Für schnelle Hilfe benötigen wir ein ! lauffähiges ! Script, dass wir als Demonstration des Problems testen können. Wer von uns erwartet ein Teilscript erstmal lauffähig zu bekommen, der hat
    1. keine wirkliche Not
    2. keinen Respekt vor Menschen die ihm in ihrer Freizeit Ihre Hilfe anbieten
    3. oder ist einfach nur faul und meint wir coden das für ihn

    In solchen Fällen erlaube ich mir, die Anfrage einfach zu ignorieren. ;)

  • Cool wäre noch Tabs zu implementieren, wo man mehrere Sessions gleichzeitig auf hat!

    Gruß,
    UEZ

    Auch am Arsch geht ein Weg vorbei...

    ¯\_(ツ)_/¯

  • Also Schnuffel, genau um so etwas zu schreiben habe ich mir das ganze ja herausgesucht.

    Das zählt aber zu den Projekten die gerade etwas hinten anstehen.
    Ich wollte hier nur das grundsätzliche Wissen teilen, wie es geht (das mit den RDP Verbindungen in einer eigenen GUI)

    BLinz

  • Hi BLinz,

    ich hoffe Dir nicht zu nahe zu treten, aber mich hatte das Thema mal interessiert
    und da hab ich den Tip aus dem engl. Forum gleich mal umgesetzt.

    Das mit den Tab's konnte schwieriger werden oder wenn überhaupt möglich nicht sonderlich performant.
    Da würde ich dann eher mit einer separaten GUI arbeiten, in der man die einzelnen Sitzungen an-/abwählen kann.

    Auf jeden Fall wird jetzt das Fenster immer neu gezeichnet.

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>
    #include <WindowsConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Opt("WinTitleMatchMode", 4)
    Opt("WinSearchChildren", 1)
    Opt("MustDeclareVars", 1)

    [/autoit] [autoit][/autoit] [autoit]

    Global $msg, $sATLClass
    Global $GuiWidth = @DesktopWidth -25
    Global $GuiHeight = @DesktopHeight -35
    Global $GuiTitle = "Remote Zugang"
    Global $oRDP = ObjCreate("MsTscAx.MsTscAx")
    Global $GUI = GUICreate($GuiTitle, $GuiWidth, $GuiHeight, 5, 0, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)
    Global $GUIActiveX = GUICtrlCreateObj($oRDP, 5, 5, $GuiWidth -10, $GuiHeight -10)
    GUISetBkColor(0x6c3C42)

    [/autoit] [autoit][/autoit] [autoit]

    $oRDP.Server = "Server / IP-Adresse"
    $oRDP.Domain = "muss nicht sein"
    $oRDP.UserName = "Username"
    $oRDP.ConnectingText = "Die Verbindung wird hergestellt ..."
    $oRDP.DisconnectedText = "Die Verbindung wurde getrennt ..."
    $oRDP.AdvancedSettings2.RedirectDrives = False
    $oRDP.AdvancedSettings2.RedirectPrinters = True
    $oRDP.AdvancedSettings2.RedirectPorts = False
    $oRDP.AdvancedSettings2.RedirectSmartCards = False
    $oRDP.AdvancedSettings2.EnableAutoReconnect = True
    $oRDP.AdvancedSettings2.AllowBackgroundInput = True
    $oRDP.AdvancedSettings2.ConnectionBarShowRestoreButton = False
    $oRDP.AdvancedSettings2.keepAliveInterval = 500
    $oRDP.AdvancedSettings5.AudioRedirectionMode = 0
    $oRDP.AdvancedSettings7.PerformanceFlags = 0x00000000
    $oRDP.Connect()

    [/autoit] [autoit][/autoit] [autoit]

    _Styles() ; setzen der Styles für die Control's und die GUI
    AdlibRegister("checkconn", 500) ; checken, ob die Verbindung noch besteht. Ansonsten wird in diesem Fall beendet...
    While GUIGetMsg() <> -3
    Sleep(10)
    WEnd
    _Exit()

    [/autoit] [autoit][/autoit] [autoit]

    ;====================================================================> ab hier kommen die Funktionen

    [/autoit] [autoit][/autoit] [autoit]

    Func _Styles()
    Local $aClasses = StringSplit(WinGetClassList($GUI, ""), @LF)
    For $i = 1 To $aClasses[0]
    If StringLeft($aClasses[$i], 4) = "ATL:" Then
    $sATLClass = $aClasses[$i]
    ExitLoop
    EndIf
    Next
    Global $hUIContainerClass = ControlGetHandle($GUI, "", "[CLASS:UIContainerClass]")
    Global $hUIMainClass = ControlGetHandle($GUI, "", "[CLASS:UIMainClass]")
    Global $hATL = ControlGetHandle($GUI, "", "[CLASS:" & $sATLClass & "]")
    _SetStyle($hUIContainerClass, BitOR($WS_CHILD, $WS_CLIPCHILDREN, $WS_CLIPSIBLINGS, $WS_VISIBLE), BitOR(0x100000, 0x4))
    _SetStyle($hUIMainClass, BitOR($WS_CHILD, $WS_CLIPCHILDREN, $WS_CLIPSIBLINGS, $WS_VISIBLE))
    _SetStyle($hATL, BitOR($WS_CHILD, $WS_CLIPCHILDREN, $WS_CLIPSIBLINGS, $WS_VISIBLE))
    _SetStyle($GUI, BitOR($WS_BORDER, $WS_CAPTION, $WS_CLIPCHILDREN, $WS_CLIPSIBLINGS, $WS_DLGFRAME, $WS_GROUP, $WS_SYSMENU,$WS_THICKFRAME, $WS_VISIBLE))
    EndFunc ;==>_Styles

    [/autoit] [autoit][/autoit] [autoit]

    Func _Exit()
    GUIDelete()
    AdlibUnRegister("checkconn")
    Exit
    EndFunc ;==>_Exit

    [/autoit] [autoit][/autoit] [autoit]

    Func checkconn()
    If $oRDP.Connected = 0 Then _Exit()
    EndFunc ;==>checkconn

    [/autoit] [autoit][/autoit] [autoit]

    Func _SetStyle($hwnd, $style, $exstyle = 0x0)
    DllCall("user32.dll", "long", "SetWindowLong", "hwnd", $hwnd, "int", -16, "long", $style)
    DllCall("user32.dll", "long", "SetWindowLong", "hwnd", $hwnd, "int", -20, "long", $exstyle)
    EndFunc ;==>_SetStyle

    [/autoit] [autoit][/autoit] [autoit]

    ;Hier noch mal alle Parameter bis RDP Version 7
    ;Das "AdvancedSettings2" <- die Zahl am Ende Symbolisiert ab welcher RDP Version dieser Parameter verfügbar ist

    [/autoit] [autoit][/autoit] [autoit]

    ;CipherStrength Read-only The maximum encryption strength of the current control.
    ;Connected Read-only The connection state of the current control.
    ;ConnectingText Read/write The text that appears centered in the control while the control is connecting.
    ;DesktopHeight Read/write The current control's height, in pixels, on the initial remote desktop.
    ;DesktopWidth Read/write The current control's width, in pixels, on the initial remote desktop.
    ;DisconnectedText Read/write The text that appears centered in the control before a connection is terminated.
    ;Domain Read/write The domain to which the current user logs on.
    ;FullScreenTitle Write-only The window title displayed when the control is in full-screen mode.
    ;HorizontalScrollBarVisible Read-only Indicates whether the control has displayed a horizontal scroll bar.
    ;SecuredSettings Read-only A IMsTscSecuredSettings interface pointer.
    ;SecuredSettingsEnabled Read-only Indicates whether the IMsTscSecuredSettings interface is available.
    ;Server Read/write The name of the server to which the current control is connected.
    ;StartConnected Read/write Indicates whether the control will establish the RD Session Host server connection immediately upon startup.
    ;UserName Read/write The user name logon credential.
    ;Version Read-only The version number of the current control.
    ;VerticalScrollBarVisible Read-only Indicates whether the control displays a vertical scroll bar.
    ;AdvancedSettings2.AcceleratorPassthrough Read/write Specifies if keyboard accelerators should be passed to the server.
    ;AdvancedSettings2.BitmapCacheSize Read/write The size, in kilobytes, of the bitmap cache file used for 8-bits-per-pixel bitmaps. Valid numeric values of this property are 1 to 32 inclusive.
    ;AdvancedSettings2.BitmapPersistence Read/write Specifies if persistent bitmap caching should be used. Persistent caching can improve performance but requires additional disk space.
    ;AdvancedSettings2.BitmapVirtualCache16BppSize Read/write Specifies the size, in megabytes, of the persistent bitmap cache file to use for the 15 and 16 bits-per-pixel high-color settings.
    ;AdvancedSettings2.BitmapVirtualCache24BppSize Read/write Specifies the size, in megabytes, of the persistent bitmap cache file to use for the 24 bits-per-pixel high-color setting.
    ;AdvancedSettings2.BitmapVirtualCacheSize Read/write Specifies the size, in megabytes, of the persistent bitmap cache file to use for 8-bits-per-pixel color. Valid numeric values of this property are 1 to 32 inclusive. Note that the maximum size for all virtual cache files is 128 MB. Related properties include the BitmapVirtualCache16BppSize and BitmapVirtualCache24BppSize properties.
    ;AdvancedSettings2.brushSupportLevel Read/write This property is not supported.
    ;AdvancedSettings2.CachePersistenceActive Read/write Specifies whether persistent bitmap caching should be used.
    ;AdvancedSettings2.ClearTextPassword Write-only Specifies the password with which to connect. For more information, see the IMsTscNonScriptable interface.
    ;AdvancedSettings2.ConnectToServerConsole Read/write Windows Server 2003, Windows XP with SP2, Windows XP with SP1, and Windows XP: Specifies if the control should attempt to connect to the console session of a server.
    ;AdvancedSettings2.ConnectWithEndpoint Write-only This property is not supported.
    ;AdvancedSettings2.DedicatedTerminal Read/write Windows XP with SP1 and Windows XP: Specifies if the client should run in dedicated-terminal mode.
    ;AdvancedSettings2.DisableCtrlAltDel Read/write Specifies if the initial explanatory screen in Winlogon should display.
    ;AdvancedSettings2.DisplayConnectionBar Read/write Specifies whether to use the connection bar. The default value is VARIANT_TRUE, which enables the property.
    ;AdvancedSettings2.DoubleClickDetect Read/write Specifies if the client identifies double-clicks for the server.
    ;AdvancedSettings2.EnableMouse Read/write Windows XP with SP1 and Windows XP: Specifies if the client sends mouse-button messages to the server.
    ;AdvancedSettings2.EnableWindowsKey Read/write Specifies if the Windows key can be used in the remote session.
    ;AdvancedSettings2.EncryptionEnabled Read/write This property is not supported. Encryption cannot be disabled.
    ;AdvancedSettings2.GrabFocusOnConnect Read/write Specifies if the client control should have the focus while connecting.
    ;AdvancedSettings2.HotKeyAltEsc Read/write Specifies the virtual-key code to add to ALT to determine the hotkey replacement for ALT+ESC. VK_INSERT is the default value, with ALT+INSERT as the resulting sequence. This property is valid only when the KeyboardHookMode property is not enabled.
    ;AdvancedSettings2.HotKeyAltShiftTab Read/write Specifies the virtual-key code to add to ALT to determine the hotkey replacement for ALT+SHIFT+TAB. VK_NEXT is the default value, with ALT+PAGE DOWN as the resulting sequence. This property is valid only when the KeyboardHookMode property is not enabled.
    ;AdvancedSettings2.HotKeyAltSpace Read/write Specifies the virtual-key code to add to ALT to determine the hotkey replacement for ALT+SPACE. VK_DELETE is the default, with ALT+DELETE as the resulting sequence. This property is valid only when the KeyboardHookMode property is not enabled.
    ;AdvancedSettings2.HotKeyAltTab Read/write Specifies the virtual-key code to add to ALT to determine the hotkey replacement for ALT+TAB. VK_PRIOR is the default value, with ALT+PAGE UP as the resulting sequence. This property is valid only when the KeyboardHookMode property is not enabled.
    ;AdvancedSettings2.HotKeyCtrlAltDel Read/write Specifies the virtual-key code to add to CTRL+ALT to determine the hotkey replacement for CTRL+ALT+DELETE, also called the secure attention sequence (SAS). VK_END is the default. Note that even when the KeyboardHookMode property is enabled, CTRL+ALT+DELETE is never redirected to the remote server; CTRL+ALT+DELETE is the local SAS sequence.
    ;AdvancedSettings2.HotKeyCtrlEsc Read/write Specifies the virtual-key code to add to ALT to determine the hotkey replacement for CTRL+ESC. VK_HOME is the default value, with ALT+HOME as the resulting sequence. This property is valid only when the KeyboardHookMode property is not enabled.
    ;AdvancedSettings2.HotKeyFullScreen Read/write Specifies the virtual-key code to add to CTRL+ALT to determine the hotkey replacement for switching to full-screen mode. VK_CANCEL is the default value.
    ;AdvancedSettings2.InputEventsAtOnce Read/write This property is not supported. Windows XP with SP1 and Windows XP: Specifies the typical number of input events to batch together.
    ;AdvancedSettings2.keepAliveInterval Read/write Specifies an interval, in milliseconds, at which the client sends keep-alive messages to the server. The default value of the property is zero, which disables keep-alive messages. The minimum valid value of this property is 10,000, which represents 10 seconds. Note that a group policy setting that specifies whether persistent client connections to the server are allowed can override this property setting.
    ;AdvancedSettings2.KeyboardFunctionKey Read/write Valid for Windows CE only.
    ;AdvancedSettings2.KeyboardSubType Read/write Valid for Windows CE only.
    ;AdvancedSettings2.KeyboardType Read/write Valid for Windows CE only.
    ;AdvancedSettings2.LoadBalanceInfo Read/write Specifies the load balancing cookie that will be placed in the X.224 Connection Request packet in the RD Session Host server protocol connection sequence.
    ;AdvancedSettings2.maxEventCount Read/write This property is not supported. Windows XP with SP1 and Windows XP: Specifies the maximum number of input events to batch together.
    ;AdvancedSettings2.MaximizeShell Read/write Specifies if programs launched with the StartProgram property should be maximized.
    ;AdvancedSettings2.minInputSendInterval Read/write Specifies the minimum interval, in milliseconds, between the sending of mouse events.
    ;AdvancedSettings2.MinutesToIdleTimeout Read/write Specifies the maximum length of time, in minutes, that the client should remain connected without user input. If the specified time elapses, the control calls the IMsTscAxEvents::OnIdleTimeoutNotification method.
    ;AdvancedSettings2.NotifyTSPublicKey Read/write This property is not supported.
    ;AdvancedSettings2.NumBitmapCaches Read/write This property is not supported. Windows XP with SP1 and Windows XP: Specifies the number of bitmap caches to use.
    ;AdvancedSettings2.orderDrawThreshold Read/write This property is not supported. Windows XP with SP1 and Windows XP: Specifies the maximum number of drawing operations to batch together for rendering.
    ;AdvancedSettings2.overallConnectionTimeout Read/write Specifies the total length of time, in seconds, that the client control waits for a connection to complete. The maximum valid value of this property is 600, which represents 10 minutes. If the specified time elapses before connection completes, the control disconnects and calls the IMsTscAxEvents::OnDisconnected method. A related property is singleConnectionTimeout.
    ;AdvancedSettings2.PerformanceFlags Read/write Specifies a set of features that can be set at the server to improve performance.
    ;AdvancedSettings2.PersistCacheDirectory Write-only This property is not supported. Windows XP with SP1 and Windows XP: Specifies the path to the directory for storage of bitmap cache files.
    ;AdvancedSettings2.PinConnectionBar Read/write Specifies the state of the UI connection bar. Setting this property to VARIANT_TRUE sets the state to "lowered", that is, invisible to the user and unavailable for input. VARIANT_FALSE sets the state to "raised" and available for user input.
    ;AdvancedSettings2.RdpdrClipCleanTempDirString Read/write Windows XP with SP1 and Windows XP: Specifies the message to be displayed before exiting while the client control is deleting files in a temporary directory; for example, "Cleaning up temporary directory"
    ;AdvancedSettings2.RdpdrClipPasteInfoString Read/write Windows XP with SP1 and Windows XP: Specifies the message to be displayed while the client control processes clipboard information in preparation for pasting the data; for example, "Preparing to paste information".
    ;AdvancedSettings2.RdpdrLocalPrintingDocName Read/write Windows XP with SP1 and Windows XP: Specifies the name to be used for printer documents that are redirected; for example, "Remote Desktop Redirected Printer Document".
    ;AdvancedSettings2.RDPPort Read/write Specifies the connection port. The default value is 3389.
    ;AdvancedSettings2.RedirectDrives Read/write Specifies if redirection of disk drives is allowed.
    ;AdvancedSettings2.RedirectPorts Read/write Specifies if redirection of local ports (for example, COM and LPT) is allowed.
    ;AdvancedSettings2.RedirectPrinters Read/write Specifies if redirection of printers is allowed.
    ;AdvancedSettings2.RedirectSmartCards Read/write Specifies if redirection of smart cards is allowed.
    ;AdvancedSettings2.SasSequence Read/write Specifies the secure access sequence the client will use to access the login screen on the server.
    ;AdvancedSettings2.ScaleBitmapCachesByBPP Read/write Windows XP with SP1 and Windows XP: Specifies if the size of bitmap caches should be scaled by bit depth (bits per pixel). The default value, enabled or nonzero, is recommended.
    ;AdvancedSettings2.ShadowBitmap Read/write Windows Vista, Windows Server 2003, and Windows XP: Specifies if shadow bitmaps should be used.
    ;AdvancedSettings2.shutdownTimeout Read/write Specifies the length of time, in seconds, to wait for the server to respond to a disconnection request. The default value of the property is 10. The maximum valid value of the property is 600, which represents 10 minutes. If the server does not reply within the specified time, the client control disconnects.
    ;AdvancedSettings2.singleConnectionTimeout Read/write Specifies the maximum length of time, in seconds, that the client control waits for a connection to an IP address. During connection the control may attempt to connect to multiple IP addresses. The maximum valid value of this property is 600. A related property is overallConnectionTimeout.
    ;AdvancedSettings2.SmartSizing Read/write Specifies if the display should be scaled to fit the client area of the control. VARIANT_TRUE enables scaling. Note that scroll bars do not appear when the SmartSizing property is enabled.
    ;AdvancedSettings2.SmoothScroll Read/write Windows XP with SP1 and Windows XP: Specifies if the Remote Desktop window should scroll smoothly when scroll bars are used. The default is a nonzero value, which enables smooth scrolling and increases the scrolling response on slower computers. The property has no effect on scrolling in the actual remote session.
    ;AdvancedSettings2.TransportType Read/write Specifies the transport type used by the client. This property is not used by the Remote Desktop ActiveX control.
    ;AdvancedSettings2.WinCEFixedPalette Read/write Valid for Windows CE only.
    ;AdvancedSettings2.CanAutoReconnect Read-only Specifies whether the client control is able to reconnect automatically to the current session in the event of a network disconnection.
    ;AdvancedSettings2.EnableAutoReconnect Read/write Specifies whether to enable the client control to reconnect automatically to a session in the event of a network disconnection.
    ;AdvancedSettings2.MaxReconnectAttempts Read/write Specifies the number of times to try to reconnect during automatic reconnection. The valid values of this property are 0 to 200 inclusive.
    ;AdvancedSettings2.allowBackgroundInput Read/write Specifies whether background input mode is enabled.
    ;AdvancedSettings2.BitmapPeristence Read/write Specifies whether bitmap caching is enabled. Note The spelling error in the name of the property is in the released version of the control.
    ;AdvancedSettings2.Compress Read/write Specifies whether compression is enabled.
    ;AdvancedSettings2.ContainerHandledFullScreen Read/write Specifies whether the container-handled full-screen mode is enabled.
    ;AdvancedSettings2.DisableRdpdr Read/write Specifies whether printer and clipboard redirection is enabled.
    ;AdvancedSettings2.IconFile Write-only Specifies the name of the file containing icon data that will be accessed when displaying the client in full-screen mode.
    ;AdvancedSettings2.IconIndex Write-only Specifies the index of the icon within the current icon file.
    ;AdvancedSettings2.KeyBoardLayoutStr Write-only Specifies the name of the active input locale identifier (formerly called the keyboard layout) to use for the connection.
    ;AdvancedSettings2.PluginDlls Write-only Specifies the names of virtual channel client DLLs to be loaded.
    ;AdvancedSettings4.AuthenticationLevel Read/write Specifies the authentication level to use for the connection.;AdvancedSettings3.ConnectionBarShowMinimizeButton Read/write Specifies whether to display the Minimize button on the connection bar.
    ;AdvancedSettings3.ConnectionBarShowRestoreButton Read/write Specifies whether to display the Restore button on the connection bar.
    ;AdvancedSettings5.AudioRedirectionMode Read/write The audio redirection mode. The AudioRedirectionMode property has the following possible values.
    ; AUDIO_MODE_REDIRECT 0 (Audio redirection is enabled and the option for redirection is "Bring to this computer". This is the default mode.)
    ; AUDIO_MODE_PLAY_ON_SERVER 1 (Audio redirection is enabled and the option is "Leave at remote computer". The "Leave at remote computer" option is supported only when connecting remotely to a host computer that is running Windows Vista. If the connection is to a host computer that is running Windows Server 2008, the option "Leave at remote computer" is changed to "Do not play". )
    ; AUDIO_MODE_NONE 2 (Audio redirection is enabled and the mode is "Do not play".)
    ;AdvancedSettings5.BitmapVirtualCache32BppSize Read/write Specifies the virtual cache file size for 32 bits per pixel (bpp) bitmaps. The maximum value is 48 megabytes (MB).
    ;AdvancedSettings5.ConnectionBarShowPinButton Read/write Specifies whether the pin button should be shown on the connection bar. By default, the value is TRUE.
    ;AdvancedSettings5.PublicMode Read/write Specifies whether public mode should be enabled or disabled. By default, public mode is set to FALSE.
    ;AdvancedSettings5.RedirectClipboard Read/write Specifies whether clipboard redirection should be enabled or disabled. By default, clipboard redirection mode is set to TRUE (enabled).
    ;AdvancedSettings5.RedirectDevices Read/write Specifies whether redirected devices should be enabled or disabled. By default, redirected devices mode is set to FALSE.
    ;AdvancedSettings5.RedirectPOSDevices Read/write Specifies whether Point of Service redirected devices should be enabled or disabled. By default, Point of Service redirected devices mode is set to FALSE.
    ;AdvancedSettings6.AuthenticationServiceClass Read/write Specifies the service principal name (SPN) to use for authentication to the server.
    ;AdvancedSettings6.AuthenticationType Read-only Specifies the type of authentication used for this connection.
    ;AdvancedSettings6.ConnectToAdministerServer Read/write Retrieves or specifies whether the ActiveX control should attempt to connect to the server for administrative purposes.
    ;AdvancedSettings6.EnableCredSspSupport Read/write Specifies whether the Credential Security Service Provider (CredSSP) is enabled for this connection.
    ;AdvancedSettings6.HotKeyFocusReleaseLeft Read/write Specifies the virtual-key code to add to CTRL+ALT to determine the hotkey replacement for CTRL+ALT+LEFT ARROW.
    ;AdvancedSettings6.HotKeyFocusReleaseRight Read/write Specifies the virtual-key code to add to CTRL+ALT to determine the hotkey replacement for CTRL+ALT+RIGHT ARROW.
    ;AdvancedSettings6.PCB Read/write Specifies the preconnection BLOB (PCB) setting to use prior to connecting for transmission to the server.
    ;AdvancedSettings6.RelativeMouseMode Read/write Specifies whether the mouse should use relative mode.
    ;AdvancedSettings7.AudioCaptureRedirectionMode Read/write Specifies or retrieves a value that indicates whether the default audio input device is redirected from the client to the remote session.
    ;AdvancedSettings7.AudioQualityMode Read/write Specifies or retrieves a value that indicates the audio quality mode setting for redirected audio.
    ;AdvancedSettings7.EnableSuperPan Read/write Specifies or retrieves a value that indicates whether SuperPan is enabled or disabled.
    ;AdvancedSettings7.NetworkConnectionType Read/write Specifies or retrieves a value that indicates the network connection type.
    ;AdvancedSettings7.RedirectDirectX Read/write This property is not used.
    ;AdvancedSettings7.SuperPanAccelerationFactor Read/write Specifies or retrieves a value that indicates the SuperPan acceleration factor.
    ;AdvancedSettings7.VideoPlaybackMode Read/write Specifies or retrieves a value that indicates the video playback mode.

    [/autoit]

    MfG Schnuffel

    "Sarkasmus ist die niedrigste Form des Witzes, aber die höchste Form der Intelligenz."
    Val McDermid

    ein paar Infos ...

    Wer mehr als "nur" Hilfe benötigt, kann sich gern im Forum "Programmieranfragen" an uns wenden. Wir helfen in allen Fällen, die die Forenregeln zulassen.

    Für schnelle Hilfe benötigen wir ein ! lauffähiges ! Script, dass wir als Demonstration des Problems testen können. Wer von uns erwartet ein Teilscript erstmal lauffähig zu bekommen, der hat
    1. keine wirkliche Not
    2. keinen Respekt vor Menschen die ihm in ihrer Freizeit Ihre Hilfe anbieten
    3. oder ist einfach nur faul und meint wir coden das für ihn

    In solchen Fällen erlaube ich mir, die Anfrage einfach zu ignorieren. ;)

  • Aber Schnuffel,

    ich wollte nicht schroff wirken :)
    Ich habe das heruasgesucht um damit - grob gesagt - so eine Art Remotemanagement Software zu schreiben. Da gibt es auch schon durzende von und auch ich werde mich nicht von meinem RoyalTS trennen - aber der Weg ist das Ziel :)

    An Tabs habe ich auch gedacht, wobei ich die RDP Fenster in anderen Anwendungen immer in separaten Fenster öffne. Mal sehen

    BLinz

  • Hi zusammen,

    sry dass ich hier einen uralten Thread aufwärme, aber einen neueren mit embedded rdp hab ich nicht gefunden.

    Ich hab den Code mal ausprobiert und erhalte nichts ausser einem leeren Fenster. Wenn ich noch die Eigenschaft $oRDP.DisconnectedText = "Disconnected...." setze, erhalte ich diese Meldung direkt nach dem Start des Programms. Verschiedene Möglichkeiten für Username und Domain hab ich schon ausprobiert, hat aber nichts geändert. Hat jemand eine Idee woran das liegen könnte?

    Client ist ein Win 7 x64 mit aktuellem Patchlevel, Ziel ein Server 2008 R2 x64 ebenfalls aktuell gepatched.

    Grüsse

    Edit: Vergessen zu erwähnen, Fehlermeldung kommt keine, mit Wireshark kann man aber sehen, dass es Kommunikation zwischen dem Client und dem Server gibt, aber nicht warum es nciht funktioniert.

  • hi,

    wie schaut es aus mit parameter wie diese:

    gatewayusagemethod:i:2
    gatewayprofileusagemethod:i:1
    gatewaycredentialssource:i:0
    full address:s:UG-VSRV03.TEST.INT
    gatewayhostname:s:UG-VSRV03.test.int
    workspace id:s:UG-VSRV03.test.int
    use redirection server name:i:1
    loadbalanceinfo:s:tsv://MS Terminal Services Plugin.1.Terminal-Server


    wie kann ich diese ebenfalls angeben?


    Gruss

  • ich habe das Rätsel mit dem loadbalanceinfo mittels Wireshark im Vergleich zur mstsc.exe etc. geknackt - es gibt bislang leider nirgends ein Codebeispiel, wie Autoit per GUI auf eine Sammlung zugreifen kann:

    Beispiel:

    Code
    $oRDP.Server = "IP des Verbindungsbrokers"
    $oRDP.Domain = "Domain"
    $oRDP.UserName = "Username"
    $oRDP.AdvancedSettings2.ClearTextPassword = "Passwort"
    $oRDP.AdvancedSettings8.EnableCredSspSupport = "TRUE"
    $lbinfo = "tsv://MS Terminal Services Plugin.1.Name_der_Sammlung_aus_Broker_RDP_Datei" & @CRLF
    $lbinfo = StringToBinary($lbinfo, 1) ;<<- damit wird der Sammlungs-Cookie korrekt formatiert, damit er als RDP-Protokoll an den Broker übergeben wird.
    $oRDP.AdvancedSettings2.LoadBalanceInfo = $lbinfo
    $oRDP.Connect()

    In diversen Foren habe ich noch gelesen, das es sein kann, das hinter dem Namen der Sammlung noch ein Leerzeichen muss, wenn es sich um eine gerade/ungerade Anzahl Zeichen handelt - das müsstet ihr ggf ausprobieren - bei mir hat es mit meiner Sammlung so geklappt - mein String hieß "tsv://MS Terminal Services Plugin.1.TS-MS-Office"

    ich habe mich damit zu einer RDP-Sammlung innerhalb einer Windows Server 2022-Domäne (alles W2022-Server) verbunden.

    Mein gesamter Testcode

    3 Mal editiert, zuletzt von card0384 (15. Januar 2024 um 17:01)

  • Hallo!

    Erstklassig Dein Tool! :thumbup:

    Vielleicht hilft Dir der opensource Code weiter: https://github.com/1Remote/1Remote Das Besondere daran: Es kann die Fenstergröße dynamisch verändern. Kein stauchen oder dehnen, sondern die RDP-Sitztung wird angepasst. Leider ist dadurch das Fenster etwas langsam.

    Wenn Du noch Parameter brauchst: https://www.donkz.nl/overview-rdp-file-settings/

    Für den Multieinstieg (auch auf einen Client) https://github.com/stascorp/rdpwrap Damit machst Du jeden Client zu einen Terminalserver bis bis zu 15 Sitztungen - sollte für den Hausgebrauch reichen

    lg

    Racer

  • Ja, nachdem ich hier fast 2 Wochen rumprobiert habe, konnte ich das (undokumentierte) Rätsel lösen. Das wollte ich euch nicht vorenthalten, denn während meiner ganzen Recherchen habe ich immer nur Beiträge gefunden, die danach gesucht haben.
    Racer Danke dir für deine Links, das schau ich mir gern an. In welcher dieser Dateien dort findet die eigentliche Magie statt? Ich hab mal durchgeschaut, aber nirgends ein RDP-Objekt gefunden, was bestückt wird?

    3 Mal editiert, zuletzt von card0384 (17. Januar 2024 um 13:31)