重复登录Windows远程桌面-Autoit脚本

Posted bonjov1

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了重复登录Windows远程桌面-Autoit脚本相关的知识,希望对你有一定的参考价值。

  非常抱歉,我先临时把脚本放上来,具体的说明有时间再更新:

都是做成快捷方式,用鼠标点击的操作

#include <AutoItConstants.au3>

Dim $count = 12


while $count < 2000
; Open mstsc program from desktop shortcut by x y.
MouseClick($MOUSE_CLICK_LEFT, 104, 455, 2)

; wait mstsc input frame available.
WinWait("[CLASS:#32770]","",10)

; input remote PC ip address
ControlSetText("Remote Desktop Connection", "", "Edit1", "172.18.0.101")

;ControlFocus("title","text",controlID) Remote Desktop Connection 1
ControlFocus("Remote Desktop Connection", "","1")

 Sleep(2000)
;click connection button
ControlClick("Remote Desktop Connection", "","Button5")

Sleep(2000)

;select another user button
MouseClick($MOUSE_CLICK_LEFT, 798, 338, 1)

;input username
ControlSetText("Windows Security", "", "Edit2", "user"&$count&"")

;input password
ControlSetText("Windows Security", "", "Edit3", "Firewall1")

;click OK button
ControlClick("Windows Security", "","Button2")

;click remote certificate YES button
Sleep(2000)
MouseClick($MOUSE_CLICK_LEFT, 1020, 500, 1)

Sleep(5000)
;select cancel of Windows Activation
MouseClick($MOUSE_CLICK_LEFT, 1230, 782, 2)

Sleep(10000)
;run test bat(send http POST and logoff)
MouseClick($MOUSE_CLICK_LEFT, 31, 343, 2)

Sleep(5000)
$count = $count + 1
WEnd

 

以上是关于重复登录Windows远程桌面-Autoit脚本的主要内容,如果未能解决你的问题,请参考以下文章

运维开发windows下的自动化脚本语言autoit

windows7/windows2008修改远程桌面连接并修改防火墙配置脚本

实战系列 1记一次从SQL注入到3389远程登录Windows桌面并上线CobaltStrike

win10无法远程连接到别的电脑

AutoIt 脚本可以在未登录时作为计划任务运行吗?

CentOS系列001:windows远程桌面连接CentOS