JStop is a free program to turn off the computer, put it to sleep, restart it, or disconnect the current user.
There is already a lot of software that can do that, so why did I write JStop?
To be able to save the currently works in the currrent applications, on the one hand, and, on the other hand, to launch this sleep
or this power off, or this restart, etc., either immediately, or after a certain duration, or at a given time.
The program does not need installation: just copy it and run JStop.exe (as administrator if necessary). It can also be run from a U.S.B key.
This program requires little space and can be useful.
A first tip: put a shortcut to JStop.exe on your desktop.
A second tip: before the countdown time, and during it, you can cancel the action by launching the Cancel.exe program, or by creating a file named Cancel in
the folder of Joff.exe.
Another tip: You can use the simple program Sleep.exe to put your pc into sleep state. Just put a shortcut to Sleep.exe on your desktop.
How it works: we must distinguish between the sleep mode and other end modes of windows.
-For entering into the sleep mode, we call powrprof.dll with the SetSuspendState command.
-For the other modes, power off, restart and user change, there are three steps. First, the program sends a close message to all the windows running.
Secondly, the program waits thirty seconds. Meanwhile, the user can save his current work.
After this time, the program calls automatically shutdown.exe with parameters varying according to the stop mode.
For example, to power off the pc, it calls shutdown.exe -s -f.
If any applications are still running, they are forced to close immediately (there is always -f in the shutdown.exe parameters).
Last tip: JStop.exe calls JOff.exe when it is time to perform the action. Then, JOff do it.
So, put a shortcut to JOff.exe on your desktop. Edit his properties. You will see, in the "Target" field, JOff.exe preceded by its path,
for example C:\Bin\Sys\JStop\JOff.exe. Without deleting anything, add a space, then type restart. This will give, for example, C:\Bin\Sys\JStop\JOff.exe restart.
Then change the icon, to choose a Windows icon better matching a restart. Now, by launching this shortcut,
your computer will automatically restart without asking any questions. You can rename your shortcut "Restart".
This program requires Windows XP or later. It is a 32-bit program.
Note: The downloaded archive contains several programs, JStop.exe, JOff.exe, Cancel.exe, Sleep.exe and CloseAll.exe.
Sleep.exe just put immediately the computer into the sleep mode.
CloseAll.exe closes all applications with at least one active window. You can launch it before disconnecting you from Windows.
JStop.exe is the main program for the user. Normally, he can forget JOff.exe and Cancel.exe. JStop.exe calls JOff.exe by passing him parameters in the command line.
If he runs JOff.exe directly, with an empty command line, it will do what its name says: it will shut down the computer after thirty seconds without asking for confirmation.
During the countdown time, the user can call Cancel.exe. The Cancel.exe program creates a file named Cancel.
When this file exists, JOff.exe cancels the current action (it will not calls shutdown.exe), deletes the Cancel file and exits.
|