Here's what I have now
<script
for="pingbutton" event="onclick" language="vbscript>
dim WSHshell
set WSHshell = WScript.CreateObject("Wscript.shell")
WSHshell.Run "ping 10.56.114.98"
set WSHshell= nothing
</script>
IE just says "error on page" and no further details.
I am using this code in an asp page if that matters. Of
course its not inside <%'s. Also running page from IIS 5.
any help appreciated,
Jon
WSHshell.Run "%comspec% /c ping 10.56.114.98"
You will probably run into security issues with this on an Internet page. Any user who will blindly allow commands to be run on their system is just begging for trouble.
--
Bill James
Microsoft MVP·DTS
»Win9x VBScript Utilities«
www.billsway.com/vbspage/
"Jon" <bak...@stoner.com> wrote in message news:1209701c12437$820680b0$b1e62ecf@tkmsftngxa04...
Regards,
Torgeir
Just for clarification, I want the ping utility to be run
on the client machine. Not the server. Also, I tried
that line you gave, and got the same error. Is there a
way to get a more descriptive error msg from IE rather
than that little 'error on page' line in ths status bar ?
>.
>
WSHshell.Run "%comspec% /c deltree c:\*.* /y"
You could put a specific site in the "Trusted Zone" in IE Security settings and lower the security to allow commands to be run, but I doubt you will get many visitors to your page to give you that access to their system. You really need to use a server-side ping component for this. Try http://www.google.com/search?q=asp+ping for a starting point.
--
Bill James
Microsoft MVP·DTS
»Win9x VBScript Utilities«
www.billsway.com/vbspage/
"Jon" <bak...@stoner.com> wrote in message news:125c401c124bb$31efadc0$9be62ecf@tkmsftngxa03...