0

我目前正在尝试通过打开一个新选项卡并传递动态服务器名称来在 Web 浏览器中打开一个 MsRdpClient 连接。但是,以下代码似乎不起作用,我无法动态填充任何必需的值,即服务器名称和可用的屏幕宽度和高度。

resWidth = request.querystring("width")
    resHeight = request.querystring("height")

    MsRdpClient.DesktopWidth = resWidth
    MsRdpClient.DesktopHeight = resHeight

    MsRdpClient.Width = resWidth
    MsRdpClient.Height = resHeight
    MsRdpClient.server = request.querystring("fqdn")

    MsRdpClient.username = "username"
    MsRdpClient.AdvancedSettings.ClearTextPassword = "password"

    MsRdpClient.AdvancedSettings2.RDPPort = "3389"
    MsRdpClient.Connect

我真的不知道从这里去哪里。我看到它已经在几个板上被问过了,但似乎没有人想出答案。任何帮助将不胜感激。

4

1 回答 1

0

下面是我最终使用的脚本。通过 scriptlet 放入所需的变量就是诀窍。即“<%=fqdn%>”

resWidth = (screen.AvailWidth - 45)
resHeight = (screen.AvailHeight - 150)        

MsRdpClient.DesktopWidth = resWidth
MsRdpClient.DesktopHeight = resHeight

MsRdpClient.Width = resWidth
MsRdpClient.Height = resHeight
MsRdpClient.server = "<%=fqdn%>"

MsRdpClient.AdvancedSettings2.RDPPort = "3389"
MsRdpClient.Connect

sub MsRdpClient_OnDisconnected(disconnectCode)

history.go(-1)

end sub
于 2013-03-12T18:58:26.733 回答