Does the event log get an entry when automatic updates are turned off on Windows Server 2003

571

The Automated Updates client doesn't generate any specific Event Log messages when its configuration is changed. You'll have better luck locating information about how it is behaving in %SystemRoot%\WindowsUpdate.Log, where the Automated Updates client puts most of its logging information.

Share:
571

Related videos on Youtube

jackmott
Author by

jackmott

Updated on September 18, 2022

Comments

  • jackmott
    jackmott almost 2 years

    I'd like to take a List or Array, and given two elements in the collection, get all elements between them. But I want to do this in a circular fashion, such that given a list [1;2;3;4;5;6] and if I ask for the elements that lie between 4 then 2, I get back [5;6;1]

    Being used to imperative programming I can easily do this with loops, but I imagine there may be a nicer idiomatic approach to it in F#.

    Edit

    Here is an approach I came up with, having found the Array.indexed function

    let elementsBetween (first:int) (second:int) (elements: array<'T>) =
        let diff = second - first
        elements 
        |> Array.indexed
        |> Array.filter (fun (index,element) -> if diff = 0 then false
                                                else if diff > 0 then index > first && index < second
                                                else if diff < 0 then index > first || index < second
                                                else false
    

    This approach will only work with arrays obviously but this seems pretty good. I have a feeling I could clean it up by replacing the if/then/else with pattern matching but am not sure how to do that cleanly.

    • user
      user over 12 years
      You might notice the lack thereof in Windows->Setup
    • joeqwerty
      joeqwerty over 12 years
      Rather than turning Automatic Updates off, you might try disabling the Automatic Updates service. That will ensure that no updates will be downloaded or installed. You can do this via GPO, which will make it much easier to manage if you have more than a few servers.
    • Guy Coder
      Guy Coder over 8 years
      You need to provide your attempt. While most of us can easily answer this, you need to show your effort. As such I am giving this a down vote.
    • Mark Seemann
      Mark Seemann over 8 years
      What should happen in case of duplicates? What if one of the limit values aren't found?
    • Guy Coder
      Guy Coder over 8 years
      Thanks for showing your attempt. I reversed my down vote.
    • jackmott
      jackmott over 8 years
      duplicates are ok. Limit values not being found should be an error. I don't need exact code for this just some general approaches.
    • Guy Coder
      Guy Coder over 8 years
      A variation of this would be to use list slicing, e.g. <someList>.[(first+1) .. (second-1)].
    • jackmott
      jackmott over 8 years
      Thank you everyone for the responses, they are all helpful. I may have to select an official answer partly at random.
  • jackmott
    jackmott over 8 years
    Thank you, it is good to see an approach both for Lists and Arrays.
  • Phillip Scott Givens
    Phillip Scott Givens over 8 years
    @FoggyFinder Thank you. I usually use www.tryfsharp.com, but it requires an install that I didn't have on that computer.
  • Phillip Scott Givens
    Phillip Scott Givens over 8 years
    This looks like it will only work if first is both the index and the value of the first element. Perhaps I misunderstood, but I thought that [1;2;3;4;5;6] was only an example. I do not think that this will work for an arbitrary buffer such as [11;13;14;16]. This needs the list to start with 0 [0;1;2;3;4;5;6]
  • Guy Coder
    Guy Coder over 8 years
    @PhillipScottGivens I did not check the code for exact correctness because the OP stated in a comment I don't need exact code for this just some general approaches.. Since the answer is CC feel free to edit the answer.