Kaseya Community

Getting vbscript output from a script

This question has suggested answer(s)

I need to run a report of service setting on multiple systems.   I have found a vbscript program that appears to do that, but it is hard-coded to output to a specific file.   I don't want to do that: I want to let the Kaseya procedure use its normal text redirection to output to a log file I can associate with the machine (or better, perhaps, a "real" Kaseya report that a number of servers at once -- yes, I'm dreaming).

So, question:  what's the best way to get vbscript output in redirectable format for a Kaseya script?   



[edited by: Ken Wallewein at 8:22 AM (GMT -7) on 7-8-2011] typos
All Replies
  • Take a look at this post. I had a similar requirement


  • what you do is you change the bit in your VB script that specifies the file name (hint: it will be encapsulated in quotes) to a variable e.g.: strFile and then at the top of your Vb script you want to declare it like this: strFile = WScript.Arguments(0)

    Remember each value that you want to read to a variable needs its own Arguments array number starting from 0

  • sorry left the rest out once you have done this you can then  run you VB script and specify an argument which in this case will be the output file;

    e.g.: cscript.exe //nologo "c:\kworking\yourscript.vbs" c:\kworking\outputfile.txt

    once you can do this you just turn the argument into a Kaseya variable and you can then make Kaseya execute your vbscript to the log file of your choice Big Smile

    Hope I explained it okay...

    If you are VB script newbie or pro try this Vbs editor http://www.vbsedit.com/ might not look like much but it is pretty kewl what you can do with it for a freeware tool, I liked it so much that I paid for a license.

    [edited by: HardKnoX at 4:31 PM (GMT -7) on 7-10-2011] blah