咔叽游戏

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 445|回复: 0

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

[复制链接]
  • TA的每日心情
    无聊
    2019-4-21 13:02
  • 签到天数: 3 天

    [LV.2]圆转纯熟

    发表于 2020-4-17 05:47:41 | 显示全部楼层 |阅读模式
    这是一个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>


    原文地址:https://www.jb51.net/article/40931.htm

    QQ|免责声明|小黑屋|手机版|Archiver|咔叽游戏

    GMT+8, 2024-3-29 17:58

    Powered by Discuz! X3.4

    © 2001-2023 Discuz! Team.

    快速回复 返回顶部 返回列表