There are many apps which causes shutdown of your Windows when you are working on something else and you end up losing your unsaved work. ShutdownGuard is a freeware app for Windows which tries to prevents applications to shutdown, reboot or log off your computer. So next time an app tries to restart the PC, you get the screen notification that the shutdown or restart was prevented by ShutdownGuard. For Windows XP users, the notification is from system tray.
Note that ShutdownGuard will not be able to prevent all shutdowns, since some programs explicitly tells Windows to force the shutdown. This means some programs will still be able to shutdown your computer.
There are some settings which can be configured in the config file. You can add a customized message when a shutdown is prevented.
ShutdownGuard does not require administrator privileges and you can add it to start up list so that monitoring is automatically started.