用hta实现的远程桌面连接脚本
来源:易贤网 阅读:747 次 日期:2014-08-12 16:00:09
温馨提示:易贤网小编为您整理了“用hta实现的远程桌面连接脚本”,方便广大网友查阅!

这是一个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>

更多信息请查看IT技术专栏

更多信息请查看脚本栏目
易贤网手机网站地址:用hta实现的远程桌面连接脚本
由于各方面情况的不断调整与变化,易贤网提供的所有考试信息和咨询回复仅供参考,敬请考生以权威部门公布的正式信息和咨询为准!
关于我们 | 联系我们 | 人才招聘 | 网站声明 | 网站帮助 | 非正式的简要咨询 | 简要咨询须知 | 加入群交流 | 手机站点 | 投诉建议
工业和信息化部备案号:滇ICP备2023014141号-1 云南省教育厅备案号:云教ICP备0901021 滇公网安备53010202001879号 人力资源服务许可证:(云)人服证字(2023)第0102001523号
云南网警备案专用图标
联系电话:0871-65317125(9:00—18:00) 获取招聘考试信息及咨询关注公众号:hfpxwx
咨询QQ:526150442(9:00—18:00)版权所有:易贤网
云南网警报警专用图标