Why does Windows apply updates when shutting down AND turning on? I'm working on Windows 7 and would like to know if this can be disabled. It's really bad when I need to leave and turn off my laptop to have it go through a bunch of updates. It's also annoying when I want to use a computer and don't expect to wait for updates to be installed. If Microsoft wanted to force people to install updates why can't Windows wait until the user has logged in and started working?
Some updates require that system dlls are replaced.
The way that Windows works means that these often can't be replaced while a user is logged in so the machine has to be rebooted to allow this.
You can get the update to happen while you are still using the machine, but once it's complete it will nag you to reboot. You can postpone this, but you will eventually have to do it.
As to why Windows 7 performs part of the update on shut-down and the rest on the next reboot I'm not sure - unless it's because certain files are still in use at that point or as Robert points out the update needs to access the registry which needs to be done early in the boot process to prevent hijacking.
Windows does that when the files it needs to update are in use during the normal operation of the operating system.
It attempts to get as many as it can while shutting down but there are still some core files that must be used to perform that update, what it does in that case is catch those files next time the OS boots before the files get used for the first time.
Also some updates require registry patches, which are done very early on in the boot process to prevent hijacking. (Thanks Robert)
This cannot be deferred "until the user logs in" because the files would be in use again so therefore could not be replaced.
The only thing you can do is run the update manually by hand (updates come out the 2nd Tuesday of every month unless it is an emergency patch) when you are not in a rush.