There is no way of globally preventing it, unfortunately for your problem.
But there is a way, to turn off the automatic restarts after windows update (at least).
Go to Run and type in: gpedit.msc
Now go to: Local Computer Policy > Computer Configuration > Administrative Templates > Windows Components > Windows Update > No auto-restart with logged on users scheduled automatic updates installation
And maybe you could also disable the "sleep"-mode, this is also a thing that is a nuisance (in my eyes).
Go to Start->Control Panel->Power Options
Select **Change when the computer sleeps**
Choose **Never** and Save changes
For future readers,
gpedit.msc
is only available on Windows 7 Professional and Ultimate Edtitions. It is not available on Home Premium. – Moses – 2013-09-09T04:04:57.693