Re: Shutdown computer with message



christopher_board@xxxxxxxxxxx wrote in news:1188509418.398860.228520
@q4g2000prc.googlegroups.com:

It doesn't seem to like a shutdown message with spaces in.

Try to put each element of your command line in an array.

Something like

String[] cmd = { "myProgram.exe", "-o=This is an option" };
Runtime.getRuntime().exec(cmd);

Bye.
--
Real Gagnon from Quebec, Canada
* Java, Javascript, VBScript and PowerBuilder code snippets
* http://www.rgagnon.com/howto.html
* http://www.rgagnon.com/bigindex.html
.



Relevant Pages