
Getting IP Address of a user on a network
I had found some information on that and tried it, but it
did not work. This is the script and the error received.
I know that the script is not what I want but can be
edited that I may use it to do what I want to do. So I
gest that will also be my next question :).
<% Response.Buffer = true %>
<%
url = "www.espn.com"
Set objWShell = CreateObject("WScript.Shell")
Set objCmd = objWShell.Exec("ping " & url)
strPResult = objCmd.StdOut.Readall()
set objCmd = nothing: Set objWShell = nothing
strStatus = "offline"
if InStr(strPResult,"TTL=")>0 then strStatus
= "online"
response.write url & " is " & strStatus
response.write ".<br>" & replace
(strPResult,vbCrLf,"<br>")
%>
The ERROR:
Error Type:
Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or
method: 'objWShell.Exec'
/newsite/test9.asp, line 6
Is there some thing that I have to setup in IIS or install
on the server?
Quote:
>-----Original Message-----
>Try WMI.
>> I have somewhat of a problem, which I hope you can
answer.
>> I have been asked to provide a script, which will make a
>> computer on the network beep. I have setup IIS so that I
>> will get the user name but the problem is that the IP
>> address changes from day to day.
>> So therefore how can I get the IP and make that person's
>> system beep whether they have IE up or not?
>> Windows2000-IIS5
>> This should be done through ASP if possible.
>.