Hi - I am going crazy here trying to get this to work !

I am using Sysinternals psservice.exe to enumerate a service on another server. From a command prompt, the following works:

"C:\Program Files\Symantec\LiveState Recovery\Advanced Server 3.0\Agent\CommandFiles\psservice.exe" \\hocacomms1 query "totalcoms agent" > "test54.txt"

The full paths need to be there for another reason I wont go into now. I have replicated the exact command line string in Kix, but it wont gernerate the piped output:

$source = CHR(34) + "C:\Program Files\Symantec\LiveState Recovery\Advanced Server 3.0\Agent\CommandFiles\psservice.exe" + CHR(34)

$dest = CHR(32) + CHR(62) + CHR(32) + CHR(34) + "test54.txt" + CHR(34)

$command = $source + " \\hocacomms1 query " + CHR(34) + "totalcoms agent" + CHR(34) + $DEST

SHELL $COMMAND
? $COMMAND

This gives:

"C:\Program Files\Symantec\LiveState Recovery\Advanced Server 3.0\Agent\CommandFiles\psservice.exe" \\hocacomms1 query "totalcoms agent" > "test54.txt"

I cant understand why it wont piep as in normal CMD window ?

Also, it seems that if the string is wider than the CMD window in windows, the string starts to write over itself....

I really just need to get this command to pipe output to a text file through kix, it workls PERFECTLY in a batch file


Edited by Brant_Winter (2005-05-08 01:43 PM)