ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahamim, Zvi (Zvi) ** CTR **" <raha...@avaya.com>
Subject RE: Zvi_Q: invoking net send in windows
Date Mon, 21 Jul 2003 12:24:17 GMT
I'm using it from my java code:
	public static int netSend(Task task, String user, String message){
		Commandline commandLine = new Commandline();
		commandLine.setExecutable("net send");
		commandLine.createArgument().setValue(user);
		commandLine.createArgument().setValue(message);
		try {
			Execute exe = 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 

-----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 <arg line = ... > and <arg value =
... > - 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: 

net send user message

but when I execute it it executes:

"net send" user message 

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


Mime
View raw message