You need to encode the greater-than sign. Try this:
<target name="test" > <exec program="psexec" basedir="." workingdir="."> <arg line="-accepteula"/> <arg line="\\10.47.27.142"/> <arg line="-u administrator"/> <arg line="-p TANDBERG"/> <arg line="ping 127.0.0.1"/> <arg line="> nul"/> </exec> </target> -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steve Kapinos Sent: Monday, September 15, 2008 8:34 AM To: nant Subject: [NAnt-users] Adding a redirect to null in exec? When doing an exec task, how can I add a > nul at the end of the command? Trying to work around issues with psexec, they suggest piping the output to Null. But I can't seem to modify my task to get the desired effect. The command I'm trying to incorporate is simply Psexec.exe -accepteula \\10.0.27.142 -u administrator -p TANDBERG ping 127.0.0.1 > nul Trying to put that into an exec task with arg line <target name="test" > <exec program="psexec" basedir="." workingdir="."> <arg line="-accepteula"/> <arg line="\\10.47.27.142"/> <arg line="-u administrator"/> <arg line="-p TANDBERG"/> <arg line="ping 127.0.0.1"/> <arg line="> nul"/> </exec> </target> I get [exec] [exec] PsExec v1.94 - Execute processes remotely [exec] Copyright (C) 2001-2008 Mark Russinovich [exec] Sysinternals - www.sysinternals.com [exec] [exec] Bad parameter >. Is there any way to add a pipe to the end of an exec statement like this? Only thing else I've considered is putting the command itself into a batch file. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users