Remote Desktop Connection script implemented with HTA _hta

Source: Internet
Author: User
Tags mstsc

This is a script for an HTA, copy the following code, and then modify the file suffix to Ccc.hta to use, the original script from: 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 to the Run line ENTER:MSTSC/?
Tip:on the line (s) this read:

<input type= "Radio" name= "Radiooption" value= "ServerOne" >server one<br>
Can change the value= ' ServerOne ' to the ' machines IP address if needed or you can change the Server one machine name VA Lue 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:

Copy Code code as follows:

<Html>
<Head>
<title>remote Desktop chooser</title>
<Style>
Body {Background-color:cornsilk}
</Style>
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>

<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>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.