脚本专栏 
首页 > 脚本专栏 > 浏览文章

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

(编辑:jimmy 日期: 2024/11/2 浏览:3 次 )

这是一个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<BR>
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<BR>
<input type="radio" name="RadioOption" value="SMS002">Secondary<BR>
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>

上一篇:什么是hta(HTML Application)
下一篇:hta实现的定时关机小程序
一句话新闻
微软与英特尔等合作伙伴联合定义“AI PC”:键盘需配有Copilot物理按键
几个月来,英特尔、微软、AMD和其它厂商都在共同推动“AI PC”的想法,朝着更多的AI功能迈进。在近日,英特尔在台北举行的开发者活动中,也宣布了关于AI PC加速计划、新的PC开发者计划和独立硬件供应商计划。
在此次发布会上,英特尔还发布了全新的全新的酷睿Ultra Meteor Lake NUC开发套件,以及联合微软等合作伙伴联合定义“AI PC”的定义标准。
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网 SiteMap