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>