<%@ Language=VBScript %> <% Option Explicit %> <% '================================================== ' Terminal Services Web Client ' ' Copyright (c) Microsoft Corporation. All rights reserved. ' '================================================== %> <% Function GetPathToHost() GetPathToHost = m_VirtualRoot End Function Function GetUserName() Dim domainAndUser Dim loginUser Dim user loginUser = Request.ServerVariables("LOGON_USER") domainAndUser = Split(loginUser, "\") If IsArray(domainAndUser) Then GetUserName = domainAndUser(UBound(domainAndUser)) Else GetUserName = loginUser End If End Function %> <% Dim WinNTSysInfo 'Getting object Dim strComputerName(1) 'Computer name DIM L_PAGEDESCRIPTION_TEXT L_PAGEDESCRIPTION_TEXT = GetLocString("diskmsg.dll", "40420005", "") Dim L_HELP_TEXT L_HELP_TEXT = GetLocString("diskmsg.dll", "40420006", "") DIM L_PAGETITLE_TEXT DIM L_WINCLIENT_ERROR L_WINCLIENT_ERROR = GetLocString("diskmsg.dll", "C0420001", "") Set WinNTSysInfo = CreateObject("WinNTSystemInfo") strComputerName(0) = WinNTSysInfo.ComputerName L_PAGETITLE_TEXT = GetLocString("diskmsg.dll", "40420000", strComputerName ) DIM L_ERRMSG_TITLE DIM L_ERRMSG_PROMPT L_ERRMSG_TITLE = GetLocString("tserver.dll", "40420007", "") L_ERRMSG_PROMPT = GetLocString("tserver.dll", "40420006", strComputerName) ServePage %> <% Function ServeContent() %> <% If ( IsIE() AND InStr( Request.ServerVariables("HTTP_USER_AGENT"), "Windows")) Then %> <% End If %>
<%If CONST_OSNAME_XPE = GetServerOSName() Then%> <%Else%> <%End If%>
<%=L_HELP_TEXT%>
<%=L_PAGEDESCRIPTION_TEXT%>
<% If ( IsIE() AND InStr( Request.ServerVariables("HTTP_USER_AGENT"), "Windows")) Then %> 1600 Then resWidth = 800 End If Response.Write("WIDTH="+CStr(resWidth)+" ") Dim resHeight resHeight = Request.QueryString("rH") If resHeight < 200 or resHeight > 1200 Then resHeight = 600 End If Response.Write("HEIGHT="+CStr(resHeight) + " " ) %> <% End If %>
<% End Function %> <% Sub ServePage %> <%=L_PAGETITLE_TEXT%> <% NASServeStatusBar ServeTabBar Dim bIsSupported bIsSupported = false ' ' The Terminal Server ActiveX control is only supported on Windows Clients ' running Internet Explorer. ' If IsIE() Then If InStr( Request.ServerVariables("HTTP_USER_AGENT"), "Windows") Then bIsSupported = true End If End If If ( bIsSupported ) Then ServeContent Else Response.Write("
") Response.Write("

"+Server.HTMLEncode(L_WINCLIENT_ERROR)+"

") Response.Write("
") End If %> <% End Sub %>