There are lot of cases when you shut down your computer accidentally or just think I should not have done. May be your friend did even when you asked him not to shutdown. These things happen and you really can help it either.
The idea of preventing shutdown can be done by a registry hack where we talked on how to remove the shutdown button it self but with Shut Down Guard you get the easiest approach.
This software prevents anything from shutting down your computer. It runs all the time and when you do try to shut down it notifies that shutdown auto guard is running and you can do it directly. This saves lot of accidents and sometimes a huge work which we loose when the shutdown starts and you can do anything except worrying.
Another place it might be handy is blocking the update applications from shutting down though they are configurable not to prompt for next 4 hrs in Vista. Download Shutdown Guard ( Via Madhur ) which works both in XP, Vista and Windows 7.