<script type="text/javascript" src="http://api.map.baidu.com/api?key=b9f6baa86431c277d63400cc3ae8b606&v=1.0&services=true" />
<script type="text/vbscript">
<!--
const L_FullScreenWarn1_Text
= "当前的安全设置不允许自动切换到全屏模式。"
const L_FullScreenWarn2_Text
= "您可以用 ctrl-alt-pause 将远程桌面会话切换到全屏模式"
const L_FullScreenTitle_Text
= "远程桌面 Web 连接"
const L_ErrMsg_Text
= "连接到远程计算机时的错误: "
const L_PlatformCheck_ErrorMessage
= "远程桌面 Web 连接 ActiveX 控件只能在 32 位版本的 Internet Explorer 中运行。"

' error messages
const L_DisconnectedCaption_ErrorMessage = "远程桌面连接已被中断"
const L_ErrConnectCallFailed_ErrorMessage = "客户端连接到远程计算机时出现错误。请检查系统内存,然后重新连接。"
const L_DisconnectRemoteByServer_ErrorMessage = "远程计算机已结束连接。"
const L_LowMemory_ErrorMessage = "本地计算机内存不足。请关闭一些程序,然后再连接到远程计算机。"
const L_SecurityErr_ErrorMessage = "由于安全错误,客户端无法连接到远程计算机。请确认您已登录到网络,然后重新连接。"
const L_BadServerName_ErrorMessage = "找不到指定的远程计算机。请确认您键入的计算机名和 IP 地址是否正确,然后重新连接。"
const L_ConnectFailedProtocol_ErrorMessage = "由于一个协议错误,客户端无法连接到远程计算机。请重新连接到远程计算机。如果客户端依旧无法连接,请跟网络管理员联系。"
const L_CannotLoopBackConnect_ErrorMessage = "客户端无法连接,您无法从同一台计算机的控制台会话连接到控制台。"
const L_NetworkErr_ErrorMessage = "由于网络错误,连接被结束。请重新连接到远程计算机。"
const L_InternalErr_ErrorMessage = "出现了一个内部错误。"
const L_NotResponding_ErrorMessage = "客户端无法连接到远程计算机。远程连接没有启用,或者计算机太忙,无法接受新连接。也有可能网络问题阻碍了连接。请重新连接。如果问题继续出现,请跟系统管理员联系。"
const L_VersionMismatch_ErrorMessage = "客户端和服务器版本不相符。请升级客户端软件,然后重新连接。"
const L_EncryptionError_ErrorMessage = "由于数据加密的错误,这个会话将结束。请重新连接到远程计算机。"
const L_ProtocolErr_ErrorMessage = "由于协议错误,这个会话将被中断。请重新连接到远程计算机。"
const L_IllegalServerName_ErrorMessage = "指定的计算机名含有无效字符。请确认计算机名,重试一次。"
const L_ConnectionTimeout_ErrorMessage = "远程连接已超时。请重新连接到远程计算机。"
const L_DisconnectIdleTimeout_ErrorMessage = "由于达到了空闲超时限度,远程会话被结束。这个限度是服务器管理员或网络策略设置的。"
const L_DisconnectLogonTimeout_ErrorMessage ="由于达到了总登录时间限度,远程会话被结束。这个限度是服务器管理员或网络策略设置的。"
const L_ProtocolErrWITHCODE_ErrorMessage = "由于内部协议错误,客户端已中断连接: "
const L_LicensingTimeout_ErrorMessage = "客户端试图连接时,出现了一个授权错误(授权超时)。请重新跟远程计算机连接。"
const L_LicensingNegotFailed_ErrorMessage = "由于授权协议中的一个错误,远程计算机中断了会话。请重新跟远程计算机连接;或者跟服务器管理员联系。"
const L_DisconnectRemoteByServerTool_ErrorMessage = "跟远程计算机的远程会话被一个管理工具结束。可能是您的管理员中断了您的连接。"
const L_LogoffRemoteByServer_ErrorMessage = "由于会话在远程计算机上被注销,远程会话被中断。您的系统管理员或另一个用户结束了您的连接。"
const L_DisconnectByOtherConnection_ErrorMessage = "由于另一个用户连接到了会话,远程会话被中断。"
const L_ConnectionBroken_ErrorMessage = "跟远程计算机的连接被打断。请重新连接到远程计算机。"
const L_ServerOutOfMemory_ErrorMessage = "由于远程计算机内存不足,连接被中断。"
const L_LicenseInternal_ErrorMessage = "由于远程计算机的授权协议中有一个内部错误,远程会话被中断。"
const L_NoLicenseServer_ErrorMessage = "由于没有终端服务器许可证服务器可以提供许可证,远程会话被中断。请跟服务器管理员联系。"
const L_NoLicense_ErrorMessage = "由于这台计算机没有终端服务器客户端访问许可证,远程会话被中断。请跟服务器管理员联系。"
const L_LicenseBadClientMsg_ErrorMessage = "由于远程计算机从这台计算机收到一个无效的授权消息,远程会话被中断。"
const L_LicenseHwidDoesntMatch_ErrorMessage = "由于这台计算机上储存的终端服务器客户端访问许可证已被修改,远程会话被中断。"
const L_BadClientLicense_ErrorMessage = "由于这台计算机上储存的终端服务器客户端访问许可证的格式无效,远程会话被中断。"
const L_LicenseCantFinishProtocol_ErrorMessage = "由于授权协议中有网络问题,远程会话被中断。请重新跟远程计算机连接。"
const L_LicenseClientEndedProtocol_ErrorMessage = "由于客户端过早地结束了授权协议,远程会话被中断。"
const L_LicenseBadClientEncryption_ErrorMessage = "由于授权消息的加密不正确,远程会话被中断。"
const L_CantUpgradeLicense_ErrorMessage = "由于无法升级或重续本地计算机的客户端访问许可证,远程会话被中断。请跟服务器管理员联系。"
const L_LicenseNoRemoteConnections_ErrorMessage = "由于远程计算机没有授权接受远程连接,远程会话被中断。请跟服务器管理员联系。"
const L_DecompressionFailed_ErrorMessage = "由于客户端的解压缩操作失败,远程会话被中断。请重新连接到远程计算机。"
const L_ServerDeniedConnection_ErrorMessage ="客户端无法建立跟远程计算机的连接。导致这个错误的可能的原因是: 1) 远程计算机上的远程连接可能没有启用。2) 已超出远程计算机上的连接最大数。3) 建立连接时出现了一个网络错误。"

sub window_onload()
if not LCase(Navigator.CpuClass) = "x86" then
msgbox L_PlatformCheck_ErrorMessage
end if
if not autoConnect() then
Document.all.editServer.Focus
end if
end sub

function autoConnect()
Dim sServer
Dim iFS, iAutoConnect


sServer = getQS ("Server")
iAutoConnect = getQS ("AutoConnect")
iFS = getQS ("FS")

if NOT IsNumeric ( iFS ) then
iFS = 0
else
iFS = CInt ( iFS )
end if

if iAutoConnect <> 1 then
autoConnect = false
exit function
else
if iFS < 0 or iFS >= Document.all.comboResolution.options.length then
iFS = 0
end if

if IsNull ( sServer ) or sServer = "" then
sServer = window.location.hostname
end if

Document.all.comboResolution.selectedIndex = iFS
Document.all.Server.value = sServer

btnConnect ()

autoConnect = true
end if

end function

function getQS ( sKey )
Dim iKeyPos, iDelimPos, iEndPos
Dim sURL, sRetVal
iKeyPos = iDelimPos = iEndPos = 0
sURL = window.location.href

if sKey = "" Or Len(sKey) < 1 then
getQS = ""
exit function
end if

iKeyPos = InStr ( 1, sURL, sKey )

if iKeyPos = 0 then
sRetVal = ""
exit function
end if

iDelimPos = InStr ( iKeyPos, sURL, "=" )
iEndPos = InStr ( iDelimPos, sURL, "&" )

if iEndPos = 0 then
sRetVal = Mid ( sURL, iDelimPos + 1 )
else
sRetVal = Mid ( sURL, iDelimPos + 1, iEndPos - iDelimPos - 1 )
end if

getQS = sRetVal
end function

sub checkClick
if Document.all.Check1.Checked then
Document.all.tableLogonInfo.style.display = ""
Document.all.editUserName.Disabled = false
Document.all.editDomain.Disabled = false
else
Document.all.tableLogonInfo.style.display = "none"
Document.all.editUserName.Disabled = true
Document.all.editDomain.Disabled = true
end if
end sub

sub OnControlLoad
set Control = Document.getElementById("MsRdpClient")
if Not Control is Nothing then
if Control.readyState = 4 then
Document.all.connectButton.disabled = FALSE
end if
end if
end sub


sub BtnConnect
Dim serverName
'server
if not Document.all.Server.value = "" then
serverName
= Document.all.Server.value
else
serverName
= Document.location.hostname
end
if

serverName
= trim(serverName)

MsRdpClient.server
= serverName

'serverName name text
Document.all.srvNameField.innerHtml = serverName

'Username/Domain
if Document.all.CheckBoxAutoLogon.checked then
MsRdpClient.UserName
= Document.all.UserName.Value
MsRdpClient.Domain
= Document.all.Domain.Value
end
if

'Resolution
MsRdpClient.FullScreen = FALSE
select case document.all.comboResolution.value
case "1"
MsRdpClient.FullScreen = TRUE
resWidth = screen.width
resHeight = screen.height
case "2"
resWidth = "640"
resHeight = "480"
case "3"
resWidth = "800"
resHeight = "600"
case "4"
resWidth = "1024"
resHeight = "768"
case "5"
resWidth = "1280"
resHeight = "1024"
case "6"
resWidth = "1600"
resHeight = "1200"
end select
MsRdpClient.DesktopWidth = resWidth
MsRdpClient.DesktopHeight = resHeight


MsRdpClient.Width = resWidth
MsRdpClient.Height = resHeight

'Device redirection options
MsRdpClient.AdvancedSettings2.RedirectDrives
= FALSE
MsRdpClient.AdvancedSettings2.RedirectPrinters
= TRUE
MsRdpClient.AdvancedSettings2.RedirectPorts
= FALSE
MsRdpClient.AdvancedSettings2.RedirectSmartCards
= FALSE

'FullScreen title
MsRdpClient.FullScreenTitle = L_FullScreenTitle_Text & "(" & serverName & ")"

'Display connect region
Document.all.loginArea.style.display
= "none"
Document.all.connectArea.style.display
= "block"

'Connect
MsRdpClient.Connect
end sub

-->
</script>
<!-- =========================LOGIN AREA ========================== -->
<div >>

相关文章:

  • 2021-11-18
  • 2021-11-29
  • 2021-07-11
猜你喜欢
  • 2021-06-06
  • 2021-07-05
  • 2021-11-17
  • 2022-01-28
  • 2021-12-27
  • 2022-12-23
  • 2021-04-01
相关资源
相似解决方案