0 Replies Latest reply on Jan 17, 2013 8:26 AM by TGRINDROD

    Help with passing file path arguements to a VBScript Window Script Monitor

    TGRINDROD

      Hi, I'm new to SolarWinds and VBSCript. I'm trying to run a simple script as a Windows Script Monitor in APM. I passing in the Node IP so I can run this against all of my nodes. I would also like to pass the file path as an additional argument but I don't know.

       

      The script runs fine from the command line on any of the target servers but when I try to run it via Solarwinds APM I get the error "Testing on node MACHINE_A: failed with "Undefined" Status. Script output did not contain required field "Statistic:". Actual script output begins "Message:File version for server: ${IP}"

       

      I've search the boards and I am providing the Statistic field so I'm not sure what to do here. I'm thinking it is something to do with the path I'm providing? I've tried the path multiple ways: with single and double slashes. With with and without ${IP} in the path and even just a strait C:\Path\to\file.txt type path. All have the same error. I've been at this for a week. Please help....

       

      I included a screenshot of my config for this Windows Script Monitor. I use ${IP} in the arguments box and run this with a Domain Admin user.

       

      Dim objFSO

      strComputer = wscript.arguments(0)

       

      Set objFSO = Createobject("Scripting.FileSystemObject")

      file = "\\${IP}\\C$\\Program Files (x86)\\APP\\FileServer\\CSMAGIC.EXE"

       

      Wscript.Echo "Message: File version for server: ${IP}"

      Wscript.Echo "Statistic: " & objFSO.GetFileVersion(file)

       

      Undefined Status.PNG