Return-Path: Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 70692 invoked by uid 500); 21 Jul 2003 12:27:12 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 70538 invoked from network); 21 Jul 2003 12:27:11 -0000 Received: from unknown (HELO pegasus.axiomsystems.com) (194.42.245.4) by daedalus.apache.org with SMTP; 21 Jul 2003 12:27:11 -0000 X-MimeOLE: Produced By Microsoft Exchange V6.0.5762.3 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Zvi_Q: invoking net send in windows Date: Mon, 21 Jul 2003 13:27:10 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: XSLT task question Thread-Index: AcM1yblVxAGpBv9hRk+sWVmHbst1vwAXqaXwAMhVtcAFjhPDwAAAHsKQAAAacIAAAA3BUA== From: "Keith Hatton" To: "Ant Users List" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi Zvi, I do not think you can use "net send" as the executable. "net" is the executable. "send" is the first argument. I guess Ant is trying to be Windows-friendly by putting quotes around = the executable when it has space chars in it (e.g. "Program Files"). Hope this helps Keith -----Original Message----- From: Rahamim, Zvi (Zvi) ** CTR ** [mailto:rahamim@avaya.com] Sent: 21 July 2003 13:24 To: Ant Users List Subject: RE: Zvi_Q: invoking net send in windows I'm using it from my java code: public static int netSend(Task task, String user, String message){ Commandline commandLine =3D new Commandline(); commandLine.setExecutable("net send"); commandLine.createArgument().setValue(user); commandLine.createArgument().setValue(message); try { Execute exe =3D new Execute(new LogStreamHandler(task, = Project.MSG_INFO, Project.MSG_WARN)); exe.setAntRun(task.getProject()); exe.setWorkingDirectory(task.getProject().getBaseDir()); exe.setCommandline(commandLine.getCommandline()); return exe.execute(); } catch (java.io.IOException e) { throw new BuildException(e, task.getLocation()); } } Zvi=20 -----Original Message----- From: Keith Hatton [mailto:khatton@axiomsystems.com] Sent: Monday, July 21, 2003 3:22 PM To: Ant Users List Subject: RE: Zvi_Q: invoking net send in windows Hi Zvi, Please post your XML so that we can take a look. But, at a guess, check the difference between and = - it may well give you what you need. Keith -----Original Message----- From: Rahamim, Zvi (Zvi) ** CTR ** [mailto:rahamim@avaya.com] Sent: 21 July 2003 13:20 To: Ant Users List Subject: Zvi_Q: invoking net send in windows Hi! I want to execute the command:=20 net send user message but when I execute it it executes: "net send" user message=20 and therfore it fails! How can I prevent it from addint the ' " '? (is there a way to prevent = it from adding the ' " ' in the arguments even if they contains spaces?) Thanks! --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org