in message : In the meantime I tried something else :
:
: <%@ Language=VBScript %>
: <%
: Dim oSysInfo
: Set oSysInfo = CreateObject("WinNTSystemInfo")
:
: Dim CompName
: CompName = oSysInfo.ComputerName
: msgbox CompName
: %>
:
: But then I get an access denied on msgbox
This will work but I'm not sure about how it works with a cluster. Patrice
is right, you cannot use MsgBox server-side. It can only be used with
client-side code. You can pass the result to client-side and call an alert
with javascript or vbscript (Intranet).
<%@ Language=VBScript %>
<%
Dim oSysInfo : Set oSysInfo = Server.CreateObject("WinNTSystemInfo")
Dim CompName : CompName = oSysInfo.ComputerName
'o---> Pass to Javascript alert <---o
Response.Write "<script type=""text/javascript"">" & vbCrLf & _
" alert('Computer Name: " & CompName & "');" & vbCrLf & _
"</script>"
'o---> Pass to VBScript MsgBox <---o
Response.Write "<script type=""text/vbscript"">" & vbCrLf & _
" Msgbox """ & CompName & """,64,""Computer Name""" & vbCrLf & _
"</script>"
%>
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center -
http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation -
http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library -
http://msdn.microsoft.com/library/default.asp