Some worms, such as the Blaster worm, use known bugs in Microsoft Operating Systems to force the computer to shut down itself. you may also get the shutdown command by inadvertently ending a system program in the Task Manager. You can create a shortcut on the Desktop for a command that will allow you to quickly abort any un-wanted shutdown commands you might get.
Simply right-click on an empty space on the Desktop and select 'New->Shortcut'. In the Location box type in 'shutdown.exe -a' and click on the 'Next' button. In the Title box enter any name you want for the shortcut then click on the 'Finish' button. Whenever you see the shutdown command appear on your screen, simply double-click on the shortcut to abort the forced shutdown.