Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Win2022 - "Optional quality update available" #111

Open
username-is-already-taken2 opened this issue Apr 1, 2022 · 5 comments
Open

Win2022 - "Optional quality update available" #111

username-is-already-taken2 opened this issue Apr 1, 2022 · 5 comments

Comments

@username-is-already-taken2

Hi there

Firstly, Thanks very much for this plugin. I'm using it for the first time as I look to build out a Windows 2022 a image.

I wondered if its possible to also include these updates?

Optional_updates

Within my build config I call the plugin a few times as it works through the updates, the last time I call the plugin it reports that there is No Windows updates found so I wondered if these are treated differently or out of scope?

Thanks very much for your help

Gary

@rgl
Copy link
Owner

rgl commented Apr 1, 2022

Did you read and follow the Search Criteria, Filters and Update Limit section on the README?

For example, to install everything you can use filters = ["include:$true"].

@GertVanderstukken
Copy link

Hello all,

I have the same "issue" on Windows 2022
image

My settings are:

  provisioner "windows-update" {
    search_criteria = "IsInstalled=0"
    filters = [
      "include:$true",
    ]
  }

@rgl
Copy link
Owner

rgl commented Jun 2, 2022

Maybe set a search_criteria that explicitly searches for optional updates, have a look at the docs at https://docs.microsoft.com/en-us/windows/desktop/api/wuapi/nf-wuapi-iupdatesearcher-search

@GertVanderstukken
Copy link

Thanks for the (fast) input.
I tried some options, but now I found this article:
https://docs.microsoft.com/en-us/answers/questions/412149/wuapilibiupdatesearcher-not-returning-patches-list.html

it mentions: "IsInstalled = 0 And DeploymentAction=*"

I'm running an install now and it seems to include the patch with these settings:

  provisioner "windows-update" {
    search_criteria = "IsInstalled = 0 And DeploymentAction=*"
    filters = [
      "include:$true",
    ]
  }

I have to leave now, but I will come back on this this evening and let you know if it is all OK now.

Thanks!

@GertVanderstukken
Copy link

OK, it's working.
However, it seems best not to install the optional updates at the same time.
I run it like this:

  # All "Normal" Updates
  provisioner "windows-update" {
    search_criteria = "IsInstalled = 0"
    filters = [
      "include:$true",
    ]
  }

  provisioner "windows-restart" {
    pause_before = "1m"
    restart_timeout = "30m"
  }

  # This run installs Optional updates => best run seperately 
  provisioner "windows-update" {
    pause_before = "1m"
    search_criteria = "IsInstalled = 0 And DeploymentAction=*"
    filters = [
      "include:$true",
    ]
  }

Hopefully this will one day help somebody.
Enjoy and thanks for the great tool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants