Try to find which process (or processes) is behind the Windows Update. Then once in N minutes your application may scan the list of processes running on your computer.
Also the OS on shutdown may send a certain window message to the running applications. I'm not sure about details, need to do a homework :)