Hi all, I am currently trying to develop a java application that
allows the user to shutdown or restart a room full of computers at a
time. I would also like the user to have the option to log off the
user on a computer or on multiple computers. The computers are being
shutdown and restarted by using the command prompt, for example,
shutdown -m \\computername -s -t 10 -f. what would be the simplest way
to allow the user to perform a remote log off on a computer.
Any help in this matter would be highly appreciated.
Thank you
Patricia Shanahan - 25 Oct 2007 15:46 GMT
> Hi all, I am currently trying to develop a java application that
> allows the user to shutdown or restart a room full of computers at a
[quoted text clipped - 7 lines]
>
> Thank you
I think you need to divide the problem into two pieces, and solve each
piece before trying to combine the results.
1. Work out exactly what commands you need to issue for each request.
Write Java code to generate List<String> representations.
2. Use ProcessBuilder to run the command interpreter on simple, easily
tested commands. Include capturing and interpreting standard out and
standard error.
Patricia
Greg R. Broderick - 25 Oct 2007 19:32 GMT
christopher_board@yahoo.co.uk wrote in news:1193318701.711667.68540@
22g2000hsm.googlegroups.com:
> Hi all, I am currently trying to develop a java application that
> allows the user to shutdown or restart a room full of computers at a
[quoted text clipped - 5 lines]
>
> Any help in this matter would be highly appreciated.
1. Java is multi-platform. What platform(s) are the computers that you are
wishing to shut down/log off? The steps necessary to shut down and/or log of
a Windows computer are going to be drastically different from the steps
necessary to shut down a Sun Sparcstation, a Mac, or a linux machine.
2. Google (Groups) is your friend. You should search this group's archives
for the dozens of queries similar to yours that have been posted within the
past several months.
3. Is there a particular reason that you're wanting to do this in Java?
Other languages which are more intimately connected to the Windows API (e.g.
C++, C) are probably much better-suited for this sort of a task, assuming
that all you're wanting to shut down are Windows boxes.
Cheers!
GRB

Signature
---------------------------------------------------------------------
Greg R. Broderick usenet200705@blackholio.dyndns.org
A. Top posters.
Q. What is the most annoying thing on Usenet?
---------------------------------------------------------------------