![]() |
Sponsored Link •
|
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:
Hi Hiran, These are things that you cannot really do with Java (you can kind of do it using JNI, but you'll still have to write non-Java code). I have done all them except the auto-logon with C++/Windows API. If you want, I can send you some utility programs I've written that will reboot windows and that will terminate all "non-essential" processes. You could run these with Runtime.exec(), which is a lot less work than all the JNI stuff and amounts to the same thing, essentially. If you want to do the JNI for practice and experience (it isn't too tough), I can give you some C++ source code to use on the DLL side. The trick to running a program exclusively on startup is to put it in the RunOnce key in the registry (not the Run); this is because the programs in RunOnce are executed serially, whereas those in Run are all forked "in parallel." As far as the auto-login, I haven't done that before, but I suspect, it may be possible to set things up so that it boots with no login into a mode where it does your defrag, then reboots again and presents you with your normal login. That is, while doing the defrag, it is not logged on as you, but as some user (eg. "D. Frag") who has no login password. By the way, is this Windows 9x/Me, NT, 2k, or XP, or... Depending upon the OS, the login trick may be more or less difficult. - mfg
Replies:
|
Sponsored Links
|