Shutdown V1.3 + Hibnow 1.0

I wrote this little program, so I could burn CDR's at night, and then shutdown (and switch off if your PC is a ATX).  This saved my having my PC on all night, using electricity.

To Install it:

The shutdown.dll file must be present in either the same directory as shutdown.exe, or in the windows system directory. Either leave both file together in the same dir, or copy the dll to the windows system folder.  Shutdown.exe can then be run from anywhere.

To use it:

Start your CDR Burn.

Calculate how long you will need the PC on for (and an extra 10% just for good measure).  Don't forget to calculate reading of images, and any test writes, also bear in mind the write speed.

I have set the default at 74Mins, but this value can be anywhere from 1 to 1000 Minutes


There are 5 shutdown options, if all of the options have an effect, depends upon you operating system.  Hibernation has been tested in Win98 and Win 2000.

Shutdown - Shutdown and off (if it's a ATX supply)
Suspend - OS PM management suspend
Hibernate - Suspend memory to disk and switch off (Win 2000 and Win 98/ME only)
LogOff - Log Off the current user (only of any use on NT4 and Win 2000)
Reboot - As it says, reboots the machine.


There is also the Force Close option.  With this enabled, the machine will force apps to close, regardless of any open, unsaved work.  Some CDR programs may require this option, as they show a dialog when done.  BE VERY CAREFULL  this will destory any unsaved work.  If you are using this option, then close everything except you CDR program before starting.  If this option is not enabled, then a more controlled shutdown will occur, but be aware that this also has problems, in that if an application is open, and requires user input, then the shutdown process may not occur.

Press Go!

Cancel can be used at anytime during the shutdown timer to cancel the whole shutdown.


Obviously this program can be used for other stuff, like downloading files at night or defragging, but you will have to have a good idea of how long the process will take to complete, as a unfinished download or defrag may destroy data!

1.3 release adds an INI file setting to change the default behaviour, change between seconds, minutes and hour units and to autostart the countdown when executed.

I have tested this program on Windows NT4 (Service Pack 5), Windows 98 SE, WindowsME and Windows 2000 SP1, but should also work on any Win32 system (Win95 onwards) with no problems.


USE THIS PROGRAM AT YOUR OWN RISK, I CANNOT BE HELD RESPONSIBLE FOR LOSS OF DATA, DUE TO THE USE OF THIS PROGRAM.

This program is emailware  If you like it, you can register for free by sending me a email at homersimpson@bigfoot.com, telling me where you live, and where you found the file.

UPDATE:

I have also included a hibnow.exe file (based on shutdown.exe) that will hiberante 10 seconds after launching...  Great for night time defrag batch scripts.....

Altough both the apps and the DLL were written in C++, I have also added some Visual Basic declarations, so you can call the shutdown.dll routines from within your own VB apps.  See VBDEV.TXT for more details.


If you have any suggestions/comments/hate mail basically anything EXCEPT spam, then email me:  
homersimpson@bigfoot.com

TROUBLESHOOTING:


If this does not work, the most likely problem, is the lack of MFC DLL's in your Windows System dir.

You should have at least:

MFC42.DLL
MSVCRT.DLL

You should be able to get them from www.microsoft.com.


Version History

1.3
Added INI file settings to change default behaviour.
Added ability to autostart countdown.
Added ability to change countdown units (seconds, minutes or hours).

1.2
Initial Public Release

