用hta实现的远程桌面连接脚本

代码征途
• 阅读 190

这是一个HTA的脚本,复制下面代码,然后将文件后缀修改为CCC.HTA即可使用,脚本原文出自: myITforum.Com
“Connection File”
/Console
/Admin
/W:xxx
/H:xxx
/Public
/Span
/Edit
/Migrate
For a complete list of available remote desktop connection usage switches from the Run line enter: Mstsc /?
Tip: On the line(s) that read:

<input type="radio" name="RadioOption" value="ServerOne">Server One

You can change the value="ServerOne" to the machines IP address if needed or you can change the Server One machine name value to a more descriptive name such as in the example below:
<input type="radio" name="RadioOption" value="SMS001">Primary

<input type="radio" name="RadioOption" value="SMS002">Secondary

HTA Script:


<Html> 
<Head> 
<Title>Remote Desktop Chooser</Title> 
<Style> 
Body {Background-Color: CornSilk} 
</Style> 
<HTA:Application 
Caption = Yes 
Border = Thick 
Scroll = No 
ShowInTaskBar = No 
MaximizeButton = Yes 
MinimizeButton = Yes> 
<script Language = VBScript> 
Sub Window_OnLoad 
Window.ResizeTo 400,250 
End Sub 
Sub WindowsLoad 
For Each objButton in RadioOption 
If objButton.Checked Then 
Set wshShell = CreateObject("WScript.Shell") 
WshShell.Run "Mstsc /V " & objButton.Value & " /F" 
End If 
Next 
Self.Close() 
End Sub 
</script><Body> 
<p><h3 align = center><font color='Orange'>Please Visit myITforum.Com</font></h3> 
<div></div> 
<table align='center'> 
<input type="radio" name="172.16.24.100" value="ServerOne">172.16.24.100<BR> 
<input type="radio" name="RadioOption" value="ServerTwo">Server Two<BR> 
<input type="radio" name="RadioOption" value="ServerThree">Server Three<P> 
<input id=runbutton  class="button" type="button" value="Run Script" name="run_button"  onClick="WindowsLoad"> 
<Span Id = "DataArea"></Span></Body></html> 
点赞
收藏
评论区
推荐文章
前端尾随者 前端尾随者
3年前
sourceTree 添加 ssh key 方法
1.使用git客户的生成公私钥:id\rsa、id\rsa.pub1.1设置Git的username和email:$gitconfigglobaluser.name"xxx"$gitconfig\globaluser.email"xxx.mail@xxx.com"1.2.生成SSH密钥过程:1.2.1.检查是不是已经存在密钥(
Easter79 Easter79
3年前
tp5中index.php的隐藏
一,找到/public/.htaccess文件,如果你的入口文件已经移动到根目录下,那么你的.htaccess文件也要剪切到根目录下,总之要确保.htaccess跟入口的index.php保持同级。二,根据你的php环境分别设置.htaccess文件:Apache:!复制代码(https://oscimg.oschina.net/os
Easter79 Easter79
3年前
ssh+scp基本使用
1sshssh一般用于连接服务器,可以使用密码认证与密钥认证的方式。1.1密码认证直接使用ssh即可:sshusername@xxx.xxx.xxx.xxxusername为用户名,后面为公网ip.若需要使用特定端口登录,加上p参数,比如使用12345端口:sshp
Jacquelyn38 Jacquelyn38
4年前
2020年前端实用代码段,为你的工作保驾护航
有空的时候,自己总结了几个代码段,在开发中也经常使用,谢谢。1、使用解构获取json数据let jsonData  id: 1,status: "OK",data: 'a', 'b';let  id, status, data: number   jsonData;console.log(id, status, number )
Stella981 Stella981
3年前
27行Python代码批量将ppt转换为pdf
!(https://oscimg.oschina.net/oscnet/e7c4cb85d0ce49e986e5fcb7db93e062.gif)这是一个Python脚本,能够批量地将微软Powerpoint文件(.ppt或者.pptx)转换为pdf格式。使用说明1、将这个脚本跟PPT文件放置在同一个文件夹下。2、
Wesley13 Wesley13
3年前
VMware Remote Console 使用
通过console可以实现类似远程桌面的功能,但它的实现方式和远程桌面不同,一般来说远程桌面必须要有网络支持,在机器关闭或者启动过程中无法连接。而console是通过esx的虚拟化组件实现远程桌面。在其sample代码中有一个用htmljs编写ActiveX插件的示例。下方是一个用winform写的console远程截图。!1(https://
Stella981 Stella981
3年前
Ecshop用户中心的收藏列表里显示商品缩略图
1)、修改includes/lib\_clips.php文件将下面代码$sql'SELECTg.goods_id,g.goods_name,g.market_price,g.shop_priceASorg_price,'.修改为$sql'SELECTg.goods_id,g.goods_nam
Wesley13 Wesley13
3年前
Ubuntu 创建开机自启动脚本的方法
1)将你的启动脚本复制到 /etc/init.d目录下以下假设你的脚本文件名为test.sh。2)设置脚本文件的权限$ sudo chmod 755 /etc/init.d/test.sh3)执行如下命令将脚本放到启动脚本中去:$ cd /etc/init.d$ sudo upda
Stella981 Stella981
3年前
PostgreSQL自动安装脚本
抽空写了一个postgresql的自动安装部署脚本,方便集群化安装环境:OS:CentOS6.3DB:PostgreSQL9.3.2使用步骤:分两个脚本,一个是执行文件,另一个是初始化脚本,实际只要点击执行文件install\_postgres.sh即可。1.上传这两个文件到/tmp目
Stella981 Stella981
3年前
SpringBoot2.1.3修改tomcat参数支持请求特殊符号
最近遇到一个问题,比如GET请求中,key,value中带有特殊符号,请求会报错,见如下URL:http://xxx.xxx.xxx:8081/aaa?key1val1&a.\\.id123&ba\1\现在,我们进入boot启动类,添加如下代码即可:publicclassDemoApp{   publicstatic
Easter79 Easter79
3年前
SpringBoot2.1.3修改tomcat参数支持请求特殊符号
最近遇到一个问题,比如GET请求中,key,value中带有特殊符号,请求会报错,见如下URL:http://xxx.xxx.xxx:8081/aaa?key1val1&a.\\.id123&ba\1\现在,我们进入boot启动类,添加如下代码即可:publicclassDemoApp{   publicstatic