我目前正试图在web浏览器中打开一个MsRdpClient连接,方法是打开一个新选项卡并传递动态服务器名称。然而,下面的代码似乎不起作用,我无法动态填充任何所需的值,即servername和可用的屏幕宽度和高度。
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
我真的不知道从这里到哪里去。我看到有几个董事会问过这个问题,但似乎没有人能给出答案。如有任何帮助,我们将不胜感激。
下面是我最终使用的脚本。通过scriptlets放入所需的变量就是诀窍所在。即"<%=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