important updates available on Windows 7, or on Windows generally.
I have had problems with various methods so far:
- FindWindow: works on Windows XP, doesn't work on Windows 7
- check system tray icons: fiddly, and the method varies depends on the Windows version
- ComObjCreate("Microsoft.Update.Session"): extremely slow or doesn't work
- Run, control /name Microsoft.WindowsUpdate: cannot be run as a hidden window
Btw on Windows XP I could check for Windows updates via:
Code: Select all
^q:: if (A_OSVersion = "WIN_XP") if DllCall("FindWindow", "str", "wuauclt_icon", "uint", 0) MsgBox NOTE: WINDOWS UPDATES AVAILABLE Return
at the point where it asked if you wanted to shutdown/restart after backup.