Use ActiveX controls to automatically log in to WIN2003 Remote Desktop and control it in real time

Source: Internet
Author: User

The first thing to do is to configure and open the Web Remote Desktop service on the managed side, which is in "Add/Remove Windows Components," which I tried only in Windows 2003 server and never tried XP. Below we install the Microsoft-provided Remote Desktop client control on the client, the installation package of this control can be found in the System32 directory of the WINDOWS2003 server, you can put it in the Web virtual directory for the client to download. after the Remote Desktop client control installation is complete, on the client computer, open frontpage2003, create a new page, choose Insert, Insert Web Component, custom ...-> locate Microsoft RDP client control (Redist), (my file location in D:\WINDOWS\Downloaded program Files\msrdp.ocx) and then OK, in the Insert Web Component interface, select Microsoft RDP Client Control ( Redist), and then determine. The following code is automatically generated in the FrontPage code window:

<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<title> New Page 1</title>
<body>

<object classid= "clsid:9059f30f-4eb1-4bd2-9fdc-36f43a218f4a" id= "MsRdpClient21" codebase= "/tsweb/msrdp.cab" Width= "height=" 200 "
>
<param name= "Server" value= "127.0.0.1" >
<param name= "fullscreen" value= "0" >
<param name= "startconnected" value= "1" >
</object>

</body>

We renamed the above MsRdpClient21 to MSTSC and removed three rows with param because we wanted to automate the login with the script. In addition codebase= "/tsweb/msrdp.cab" This you fill in the correct address, such as my server giftren.com/tsweb/msrdp.cab (just assume that I do not provide this download). This installation package is available under the WINDOWS2003 system directory.

Then we add the following code in the Head section (note that the assignment here is to change according to your server configuration):

<script language= "VBScript" >

Sub Window_onload ()
Document.all.MsTsc.Server = "MyName"
Document.all.MsTsc.UserName = "Administrator"
Document.all.MsTsc.AdvancedSettings.ClearTextPassword = "MyPassword"
Document.all.MsTsc.Domain = "MyDomain"

Document.all.MsTsc.Connect ()
End Sub
</script>
The final code looks like this:

<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<title> New Page 1</title>
<script language= "VBScript" >

Sub Window_onload ()
Document.all.MsTsc.Server = "127.0.0.1" ' Remote server address
Document.all.MsTsc.UserName = "Administrator" login account
Document.all.MsTsc.AdvancedSettings.ClearTextPassword = "sinablogshanhaijing" ' Login password
Document.all.MsTsc.Domain = "Gonganmis" ' domain to log on to

Document.all.MsTsc.Connect ()
End Sub
</script>

<body>

<object classid= "clsid:9059f30f-4eb1-4bd2-9fdc-36f43a218f4a" id= "MSTSC" codebase= "www.giftRen.com/tsweb/ Msrdp.cab "width=" "height=" >

</object>


</body>

Finally save the page, open with IE, see our amazing results! Alternatively, you can nest multiple Remote Desktop interfaces on a single Web page with different hosts.
Using this means, you can do a set of B/S (browser/server) mode of the network management system, the company employees of the computer to create an administrative account, all their IP address and password, account number to save to the database, and then through a unified web interface to manage, I want to be more useful to the network administrator, But not for hackers ' purposes.

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.