Problem With Custom Script In Windows

by Feb 26, 2013

Hi Guys

I have an interesting problem here using a custom script in Windows 2008. The script outputs a string to standard output which can be viewed from the command line, however calling the script from the agentcmd or with netcat results in the string missing from the output. This is the details of the script and configuration.

On Client server,


status = “Test”
Wscript.echo “Status: ” & status

The script is called in the up.time agent as “cscript.exe //nologo “C:test.vbs””
Agent version: 5.0.49 and 5.3.2 (tested on both)

On Up.time server,

echo -n rexec [pw] Test | nc [Client server IP] 9998
“Status: “

I've tried every possible variation of Wscript I can think of (Wscript.stdout.write, Wscript.stdout.writeline, stream objects, Set fso = CreateObject (“Scripting.FileSystemObject”) Set stdout = fso.GetStandardStream (1), etc) no luck at all.

Is this a problem with the agent or is it a fundamental problem with vbscript variables and tcp/ip?

-Mr. F