absolutely bizarre script behavior behavior

Discussion in 'Scripting' started by Jimmy D, Nov 22, 2005.

  1. Jimmy D

    Jimmy D Guest

    this script works perfectly on SOME computers. on others it opens up command
    windows in an endless loop... thousands of them. im simply opening a text
    file and pinging the name of the server in the text file:

    Dim strServer, ObjFSO, ObjShell, ObjFile

    Set ObjFSO = CreateObject("Scripting.FileSystemObject")
    Set ObjShell = CreateObject("WScript.Shell")
    Set ObjFile = ObjFSO.OpenTextFile("c:\server.txt", 1, True)

    strServer = ObjFile.ReadLine

    ObjShell.Run "cmd /K ping " & strServer

    Set ObjFSO = Nothing
    Set ObjShell = Nothing
    Set ObjFile = Nothing
     
    Jimmy D, Nov 22, 2005
    #1
    1. Advertisements

  2. Check those machines for another executable script in the path by the name
    of ping and blocking the way to the real ping.
     
    Michael Harris \(MVP\), Nov 23, 2005
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.