找回密码  加入

AUTOIT CN

搜索
查看: 169|回复: 6

[系统综合] RDP协议远程登陆怎么挂载指定的盘符

[复制链接]
发表于 6 天前 | 显示全部楼层 |阅读模式
本帖最后由 redapple2008 于 2021-4-7 15:16 编辑
  1. #include <GUIConstants.au3>
  2. #include <WindowsConstants.au3>

  3. $oRDP = ObjCreate("MsTscAx.MsTscAx")
  4. GUICreate("au3远程桌面连接测试", 640, 480, -1 , -1, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)
  5. $GUIActiveX = GUICtrlCreateObj($oRDP, 10, 10, 620, 460)
  6. GUICtrlSetStyle ( $GUIActiveX,  $WS_VISIBLE )
  7. GUICtrlSetResizing ($GUIActiveX,$GUI_DOCKAUTO)

  8. GUISetState()

  9. $oRDP.Server = "192.168.1.200"        ;IP
  10. $oRDP.Domain = "" ;登录域
  11. $oRDP.UserName = "guest" ; 用户名
  12. $oRDP.AdvancedSettings2.ClearTextPassword = "demo888" ; 密码
  13. $oRDP.FullScreen = False ; 全屏是/否
  14. $oRDP.AdvancedSettings2.RedirectDrives = True ; 本地设备和资源是否被带到远程会话中
  15. $oRDP.AdvancedSettings2.RedirectPrinters = False ; 打印机
  16. $oRDP.AdvancedSettings2.RedirectPorts = False ; LPT1等端口
  17. $oRDP.AdvancedSettings2.RedirectSmartCards = False ; 智能卡身份验证
  18. $oRDP.ConnectingText = "正在在连接 ...." ;
  19. $oRDP.AdvancedSettings2.EnableAutoReconnect = True
  20. $oRDP.AdvancedSettings2.allowBackgroundInput = true
  21. $oRDP.AdvancedSettings2.ConnectionBarShowRestoreButton = False
  22. $oRDP.AdvancedSettings5.AudioRedirectionMode = 0

  23. $oRDP.Connect()

  24. While 1
  25.     $msg = GUIGetMsg()
  26.     Select
  27.         Case $msg = $GUI_EVENT_CLOSE
  28.             ExitLoop
  29.     EndSelect
  30. WEnd

  31. GUIDelete()

  32. Exit
复制代码

mstsc 怎么带d盘过去?如图操作在AU3怎么写?上面是全部带过去,我只想要部分盘符怎么办?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?加入

x
 楼主| 发表于 6 天前 | 显示全部楼层
$oRDP.AdvancedSettings2.RedirectDrives = True ; 本地设备和资源是否被带到远程会话中
如果只想用c盘或者d盘有没有操作办法?
 楼主| 发表于 6 天前 | 显示全部楼层
  1. ;Hier noch mal alle Parameter bis RDP Version 7
  2. ;Das "AdvancedSettings2" <- die Zahl am Ende Symbolisiert ab welcher RDP Version dieser Parameter verfügbar ist

  3. ;CipherStrength                                     Read-only               The maximum encryption strength of the current control.
  4. ;Connected                                          Read-only               The connection state of the current control.
  5. ;ConnectingText                                     Read/write              The text that appears centered in the control while the control is connecting.
  6. ;DesktopHeight                                      Read/write              The current control's height, in pixels, on the initial remote desktop.
  7. ;DesktopWidth                                       Read/write              The current control's width, in pixels, on the initial remote desktop.
  8. ;DisconnectedText                                   Read/write              The text that appears centered in the control before a connection is terminated.
  9. ;Domain                                             Read/write              The domain to which the current user logs on.
  10. ;FullScreenTitle                                    Write-only              The window title displayed when the control is in full-screen mode.
  11. ;HorizontalScrollBarVisible                         Read-only               Indicates whether the control has displayed a horizontal scroll bar.
  12. ;SecuredSettings                                    Read-only               A IMsTscSecuredSettings interface pointer.
  13. ;SecuredSettingsEnabled                             Read-only               Indicates whether the IMsTscSecuredSettings interface is available.
  14. ;Server                                             Read/write              The name of the server to which the current control is connected.
  15. ;StartConnected                                     Read/write              Indicates whether the control will establish the RD Session Host server connection immediately upon startup.
  16. ;UserName                                           Read/write              The user name logon credential.
  17. ;Version                                            Read-only               The version number of the current control.
  18. ;VerticalScrollBarVisible                           Read-only               Indicates whether the control displays a vertical scroll bar.
  19. ;AdvancedSettings2.AcceleratorPassthrough           Read/write              Specifies if keyboard accelerators should be passed to the server.
  20. ;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.
  21. ;AdvancedSettings2.BitmapPersistence                Read/write              Specifies if persistent bitmap caching should be used. Persistent caching can improve performance but requires additional disk space.
  22. ;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.
  23. ;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.
  24. ;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.
  25. ;AdvancedSettings2.brushSupportLevel                Read/write              This property is not supported.
  26. ;AdvancedSettings2.CachePersistenceActive           Read/write              Specifies whether persistent bitmap caching should be used.
  27. ;AdvancedSettings2.ClearTextPassword                Write-only              Specifies the password with which to connect. For more information, see the IMsTscNonScriptable interface.
  28. ;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.
  29. ;AdvancedSettings2.ConnectWithEndpoint              Write-only              This property is not supported.
  30. ;AdvancedSettings2.DedicatedTerminal                Read/write              Windows XP with SP1 and Windows XP:  Specifies if the client should run in dedicated-terminal mode.
  31. ;AdvancedSettings2.DisableCtrlAltDel                Read/write              Specifies if the initial explanatory screen in Winlogon should display.
  32. ;AdvancedSettings2.DisplayConnectionBar             Read/write              Specifies whether to use the connection bar. The default value is VARIANT_TRUE, which enables the property.
  33. ;AdvancedSettings2.DoubleClickDetect                Read/write              Specifies if the client identifies double-clicks for the server.
  34. ;AdvancedSettings2.EnableMouse                      Read/write              Windows XP with SP1 and Windows XP:  Specifies if the client sends mouse-button messages to the server.
  35. ;AdvancedSettings2.EnableWindowsKey                 Read/write              Specifies if the Windows key can be used in the remote session.
  36. ;AdvancedSettings2.EncryptionEnabled                Read/write              This property is not supported. Encryption cannot be disabled.
  37. ;AdvancedSettings2.GrabFocusOnConnect               Read/write              Specifies if the client control should have the focus while connecting.
  38. ;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.
  39. ;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.
  40. ;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.
  41. ;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.
  42. ;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.
  43. ;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.
  44. ;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.
  45. ;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.
  46. ;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.
  47. ;AdvancedSettings2.KeyboardFunctionKey              Read/write              Valid for Windows CE only.
  48. ;AdvancedSettings2.KeyboardSubType                  Read/write              Valid for Windows CE only.
  49. ;AdvancedSettings2.KeyboardType                     Read/write              Valid for Windows CE only.
  50. ;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.
  51. ;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.
  52. ;AdvancedSettings2.MaximizeShell                    Read/write              Specifies if programs launched with the StartProgram property should be maximized.
  53. ;AdvancedSettings2.minInputSendInterval             Read/write              Specifies the minimum interval, in milliseconds, between the sending of mouse events.
  54. ;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.
  55. ;AdvancedSettings2.NotifyTSPublicKey                Read/write              This property is not supported.
  56. ;AdvancedSettings2.NumBitmapCaches                  Read/write              This property is not supported. Windows XP with SP1 and Windows XP:  Specifies the number of bitmap caches to use.
  57. ;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.
  58. ;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.
  59. ;AdvancedSettings2.PerformanceFlags                 Read/write              Specifies a set of features that can be set at the server to improve performance.
  60. ;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.
  61. ;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.
  62. ;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"
  63. ;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".
  64. ;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".
  65. ;AdvancedSettings2.RDPPort                          Read/write              Specifies the connection port. The default value is 3389.
  66. ;AdvancedSettings2.RedirectDrives                   Read/write              Specifies if redirection of disk drives is allowed.
  67. ;AdvancedSettings2.RedirectPorts                    Read/write              Specifies if redirection of local ports (for example, COM and LPT) is allowed.
  68. ;AdvancedSettings2.RedirectPrinters                 Read/write              Specifies if redirection of printers is allowed.
  69. ;AdvancedSettings2.RedirectSmartCards               Read/write              Specifies if redirection of smart cards is allowed.
  70. ;AdvancedSettings2.SasSequence                      Read/write              Specifies the secure access sequence the client will use to access the login screen on the server.
  71. ;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.
  72. ;AdvancedSettings2.ShadowBitmap                     Read/write              Windows Vista, Windows Server 2003, and Windows XP:  Specifies if shadow bitmaps should be used.
  73. ;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.
  74. ;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.
  75. ;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.
  76. ;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.
  77. ;AdvancedSettings2.TransportType                    Read/write              Specifies the transport type used by the client. This property is not used by the Remote Desktop ActiveX control.
  78. ;AdvancedSettings2.WinCEFixedPalette                Read/write              Valid for Windows CE only.
  79. ;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.
  80. ;AdvancedSettings2.EnableAutoReconnect              Read/write              Specifies whether to enable the client control to reconnect automatically to a session in the event of a network disconnection.
  81. ;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.
  82. ;AdvancedSettings2.allowBackgroundInput             Read/write              Specifies whether background input mode is enabled.
  83. ;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.
  84. ;AdvancedSettings2.Compress                         Read/write              Specifies whether compression is enabled.
  85. ;AdvancedSettings2.ContainerHandledFullScreen       Read/write              Specifies whether the container-handled full-screen mode is enabled.
  86. ;AdvancedSettings2.DisableRdpdr                     Read/write              Specifies whether printer and clipboard redirection is enabled.
  87. ;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.
  88. ;AdvancedSettings2.IconIndex                        Write-only              Specifies the index of the icon within the current icon file.
  89. ;AdvancedSettings2.KeyBoardLayoutStr                Write-only              Specifies the name of the active input locale identifier (formerly called the keyboard layout) to use for the connection.
  90. ;AdvancedSettings2.PluginDlls                       Write-only              Specifies the names of virtual channel client DLLs to be loaded.
  91. ;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.
  92. ;AdvancedSettings3.ConnectionBarShowRestoreButton   Read/write          Specifies whether to display the Restore button on the connection bar.
  93. ;AdvancedSettings5.AudioRedirectionMode             Read/write              The audio redirection mode. The AudioRedirectionMode property has the following possible values.
  94. ;                                                                           AUDIO_MODE_REDIRECT 0 (Audio redirection is enabled and the option for redirection is "Bring to this computer". This is the default mode.)
  95. ;                                                                           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". )
  96. ;                                                                           AUDIO_MODE_NONE 2 (Audio redirection is enabled and the mode is "Do not play".)
  97. ;AdvancedSettings5.BitmapVirtualCache32BppSize      Read/write              Specifies the virtual cache file size for 32 bits per pixel (bpp) bitmaps. The maximum value is 48 megabytes (MB).
  98. ;AdvancedSettings5.ConnectionBarShowPinButton       Read/write              Specifies whether the pin button should be shown on the connection bar. By default, the value is TRUE.
  99. ;AdvancedSettings5.PublicMode                       Read/write              Specifies whether public mode should be enabled or disabled. By default, public mode is set to FALSE.
  100. ;AdvancedSettings5.RedirectClipboard                Read/write              Specifies whether clipboard redirection should be enabled or disabled. By default, clipboard redirection mode is set to TRUE (enabled).
  101. ;AdvancedSettings5.RedirectDevices                  Read/write              Specifies whether redirected devices should be enabled or disabled. By default, redirected devices mode is set to FALSE.
  102. ;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.
  103. ;AdvancedSettings6.AuthenticationServiceClass       Read/write              Specifies the service principal name (SPN) to use for authentication to the server.
  104. ;AdvancedSettings6.AuthenticationType               Read-only               Specifies the type of authentication used for this connection.
  105. ;AdvancedSettings6.ConnectToAdministerServer        Read/write              Retrieves or specifies whether the ActiveX control should attempt to connect to the server for administrative purposes.
  106. ;AdvancedSettings6.EnableCredSspSupport             Read/write              Specifies whether the Credential Security Service Provider (CredSSP) is enabled for this connection.
  107. ;AdvancedSettings6.HotKeyFocusReleaseLeft           Read/write              Specifies the virtual-key code to add to CTRL+ALT to determine the hotkey replacement for CTRL+ALT+LEFT ARROW.
  108. ;AdvancedSettings6.HotKeyFocusReleaseRight          Read/write              Specifies the virtual-key code to add to CTRL+ALT to determine the hotkey replacement for CTRL+ALT+RIGHT ARROW.
  109. ;AdvancedSettings6.PCB                              Read/write              Specifies the preconnection BLOB (PCB) setting to use prior to connecting for transmission to the server.
  110. ;AdvancedSettings6.RelativeMouseMode                Read/write              Specifies whether the mouse should use relative mode.
  111. ;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.
  112. ;AdvancedSettings7.AudioQualityMode                 Read/write              Specifies or retrieves a value that indicates the audio quality mode setting for redirected audio.
  113. ;AdvancedSettings7.EnableSuperPan                   Read/write              Specifies or retrieves a value that indicates whether SuperPan is enabled or disabled.
  114. ;AdvancedSettings7.NetworkConnectionType            Read/write              Specifies or retrieves a value that indicates the network connection type.
  115. ;AdvancedSettings7.RedirectDirectX                  Read/write              This property is not used.
  116. ;AdvancedSettings7.SuperPanAccelerationFactor       Read/write              Specifies or retrieves a value that indicates the SuperPan acceleration factor.
  117. ;AdvancedSettings7.VideoPlaybackMode                Read/write              Specifies or retrieves a value that indicates the video playback mode.
复制代码
 楼主| 发表于 6 天前 | 显示全部楼层
竟然没有找到可以用的。
发表于 5 天前 | 显示全部楼层
指定硬盘带过去,要考虑生成rdp的方法,在rdp里面设置,然后连接的时候用rdp连接
 楼主| 发表于 5 天前 | 显示全部楼层
austere 发表于 2021-4-8 11:58
指定硬盘带过去,要考虑生成rdp的方法,在rdp里面设置,然后连接的时候用rdp连接

com组件不支持吗?配置文件没问题,可以带过去。
 楼主| 发表于 昨天 10:21 | 显示全部楼层
问题怎么可以看到dll文件里面的函数?
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|小黑屋|手机版|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2021-4-13 05:51 , Processed in 0.140625 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表