in reply to system command can't spawn cmd.exe

I've had similar problems before, you might want to try using the File:Spec module. So:

#!/usr/bin/perl -w use strict; use File::Spec; my $prog = File::Spec->catfile('program files', 'agent', 'agent.bat'); system($prog);

Also perl generally doesn't like paths that have spaces so you might want to try quoting the path and then running it again.

-Hokie
all code is untested