Prevent Windows 10 nag updates from being installed on Windows 7

During their Windows 10 blitz, some blockhead at Microsoft thought it would be a great idea to push out "nag" marketing messages to Windows 7 users, under the guise of Windows Updates. To make matters worse, it took them a few tries to get it right, resulting in several related patches which might be shown.

When I install new Windows 7 SP1 computers from scratch (and yes, there are still legitimate reasons for doing so), what's the quickest and easiest way to prevent these unwanted "updates" from ever getting applied in the first place?


I found some manual steps here and here, and attempted to automate them using the dirty-and-not-so-quick script below (based on this). But it takes over half an hour to run and I'm leaving the question open in hopes someone can suggest a more convenient solution.

Dim msg
msg = "Searching for and hiding six Windows Updates related to Windows 10 nagging." & vbCrLf
msg = msg & "Be patient; this may take a LONG time during which nothing appears to happen."
msg = msg & " You can tell the script is still running by using Task Manager and looking for wscript.exe"
Wscript.echo msg

Dim hideupdates(5)
hideupdates(0) = "KB3035583"
hideupdates(1) = "KB2952664"
hideupdates(2) = "KB2976978"
hideupdates(3) = "KB3021917"
hideupdates(4) = "KB3044374"
hideupdates(5) = "KB2990214"

Dim status(5)
For i = 0 to UBound(status)
  status(i) = "notfound"
Next

set updateSession = createObject("Microsoft.Update.Session")
set updateSearcher = updateSession.CreateupdateSearcher()

Set searchResult = updateSearcher.Search("IsInstalled=0 and Type='Software'")

dim results
Set results = searchResult.Updates
For i = 0 To results.Count-1
  set update = results.Item(i)
  For j = LBound(hideupdates) To UBound(hideupdates)
    if instr(1, update.Title, hideupdates(j), vbTextCompare) > 0 then
      if update.IsHidden then
        status(j) = "alreadyhidden"
      else
        update.IsHidden = True
        status(j) = "hidden"
      end if
    end if
  Next
Next

Dim alreadyhidden
Dim hidden
Dim notfound

for i = 0 to UBound(status)
  Select Case status(i)
    Case "alreadyhidden"
      alreadyhidden = alreadyhidden & hideupdates(i) & vbCrLf
    Case "notfound"
      notfound = notfound & hideupdates(i) & vbCrLf
    Case "hidden"
      hidden = hidden & hideupdates(i) & vbCrLf
  End Select
next
msg = "Hid these Windows 10 related updates:" & vbCrLf
msg = msg & hidden & vbCrLf
msg = msg & "These ones were already hidden:" & vbCrLf
msg = msg & alreadyhidden & vbCrLf
msg = msg & "These ones were not found on this machine:" & vbCrLf
msg = msg & notfound

Wscript.echo msg

5]