用hta实现的远程桌面连接脚本,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>


远程桌面连接怎实现, 一定要固定IP?两边都没固定IP怎办,

192.168.x.x这是内网的IP.连接远程桌面要用到一个叫LCX(内网端口转发)的工具.
实现连接远程桌面.对方不一定要是固定IP.满足以下条件就成了.
1.开启了远程终端端口(一般为3389).开启方法是.我的电脑--属性--远程--启用这台计算机的远程桌面前面打勾.
2.你知道这台电脑的用户及密码.
 

怎实现远程桌面双击自动连接

创建一个批处理文件,并生成桌面快捷方式,批处理文件中用命令行运行远程桌面程序,如mstsc /v:hostname:port,如此应该能满足你的需求。具体命令行参数可用mstsc /?命令查阅,如图所示。



 

评论关闭