All users Windows faced at a time (or more times) with closing ACCIDENTAL (or automata, for several reasons such as installing some system updates or of certain Applications) a the operating system in quite inopportune situations that led to Data loss or a few good hours of work.
Fortunately, Microsoft included in systems Windows and API which applications can use to delay the processes of shutdown and restart and which gives users the opportunity to stop This process. ShutdownGuard It's O Free application for Windows that is used by this API To help users avoid such situations, preventing accidental closure or automatic restart and without confirmation of the system.
How does shutdownguard work?
After installing the application, it places a ICON in SYSTRAY (in the form of a closed lock), and when a Shutdown signal or restart is sent to the computer, if ShutdownGuard is active (the application can be DISABLED by the user) displays an screen that warns the user as the application a Prevent the closing/restart of the system, and gives him the opportunity to choose if he wants to close/restart the system anyway, or if he wants cancellation the respective process (in Windows XP O Notification announcing the user that the closing of the system has been prevented and if the user wants to continue the process of shutdown/restart you only have to give Click on the notification respective).

options ShutdownGuard can be accessed by clicking-right on iconita of the application from Systray; users can choose SA Disable the application (its icon will change in an open lock), thus allowing the Shutdown/Restart process to continue without interruption, and can also set the application to start automatically Windows Startup (module Silent, activated by the option Hide tray, is compatible only with Windows XP; In addition, it is not recommended to use this option, because in this way the application does not display any notification when a Shutdown/Restart process is prevented, the users having to hold the key Shift to display that notification).

Also, advanced settings of the application are displayed in a This physiier (in the form of text) where users can customiza (With the help of one Text editor, like Notepad-ul) posts displayed when blocking a shutdown/restart, or other options (such as Choosing the language for the application).

Download Shutdownguard for Windows.
Note: The application is only available for Windows operating systems (32-bit and 64-bit).
STEALTH SETTINGS – Prevent Windows from shutting down accidentally with ShutdownGuard