The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Restarting the computer w/ a JAVA program

Posted by Hiran on November 18, 2001 at 12:50 AM

Does anyone know if it's possible to restart the machine from a JAVA program? Also, is it possible to bypass the login screen that comes up when the machine starts up? When I say bypass, I mean have a program login as if the user had entered the password? The reason I ask is that I want to create an application that'll restart my machine and login for me and then start the disk defragmenter (or something like that) before any of my programs (like MSN Messenger, etc.) start up and then cause the disk defragmenter to restart constantly. I've set my computer to defragment every day at 5am (since I'm asleep at that time) but the only problem is that if I leave my computer on throughout the night, then all my IM programs are running and cause the defragment program to constanlty restart (the effect being that I wake up and find that the defragmenting hasn't even started yet). I know I could just close all those other programs before I go to bed, but I'm curious now as to whether I can create a program that'll deal with all that. (And I don't want to get into programming to the Windows API to close any programs that are running unless I have to, or unless it's the easiest solution). Thnx in advance!
Hiran



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us