Hi all,
I have the following script:
<HTML>
<HEAD> <TITLE>Getting User Information. </TITLE>
<Script Language="VBScript">
Dim objNet
On Error Resume Next
Set objNet = CreateObject("WScript.NetWork")
If Err.Number <> 0 Then
MsgBox "Don't be Shy." & vbCRLF & "Do not press ""No"" If your browser warns you."
Document.Location = "UserInfo.html"
End if
Dim strInfo
strInfo = "User Name is " & objNet.UserName & vbCRLF & _
"Computer Name is " & objNet.ComputerName & vbCRLF & _
"Domain Name is " & objNet.UserDomain
MsgBox strInfo
Set objNet = Nothing
</Script>
</HEAD>
<BODY>
</Body>
</HTML>
The script works fine when you double click the UserInfo.html. But when I upload it to my server or when i try to run it on my IIS, it gives an empty alert box. Can anyone help me ?
Thanx
Buzzer
I have the following script:
<HTML>
<HEAD> <TITLE>Getting User Information. </TITLE>
<Script Language="VBScript">
Dim objNet
On Error Resume Next
Set objNet = CreateObject("WScript.NetWork")
If Err.Number <> 0 Then
MsgBox "Don't be Shy." & vbCRLF & "Do not press ""No"" If your browser warns you."
Document.Location = "UserInfo.html"
End if
Dim strInfo
strInfo = "User Name is " & objNet.UserName & vbCRLF & _
"Computer Name is " & objNet.ComputerName & vbCRLF & _
"Domain Name is " & objNet.UserDomain
MsgBox strInfo
Set objNet = Nothing
</Script>
</HEAD>
<BODY>
</Body>
</HTML>
The script works fine when you double click the UserInfo.html. But when I upload it to my server or when i try to run it on my IIS, it gives an empty alert box. Can anyone help me ?
Thanx
Buzzer