Patch remedy update loop

Support and question forum for Patch Remedy 4 WUA plugin for LabTech. This plugin was retired on 06/01/2022. All new Patch Remedy 5 is now the current plugin. This forum is for retaining the old posts for Patch Remedy 4.
User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Patch remedy update loop

Post by Cubert »

That's the issue? On line 220 of the else side of script we test for this version and if current we exit script doing nothing. So why does line 220 think that the build is less than that number? Can you add a script log line just after 220 that prints out @CURRENTBUILD@

We need to verify that it truly is matching even though it says only less than.
Capture.PNG
Capture.PNG (4.46 KiB) Viewed 17370 times
As you can see in the image the logic says to exit if a match is made. Is this agent a minority in relation to this issue or are all 1809 agents hitting this test?

It maybe some space or hidden char in the build number breaking the test.

ObeliskStreet
Posts: 9
Joined: Wed Dec 12, 2018 10:36 am
5

Re: Patch remedy update loop

Post by ObeliskStreet »

Hi Cubert, had entered that into the script.

Output from running this morning in chronological order:

10.0.17763.342
10.0.17763.342
1809
Microsoft Windows 10 Pro x64

It has not tried to download again this morning.

Are there any downfalls to leaving Auto Update switched off? We don't really want these applied outside of our patching policy, so if no other downfall to it, I could leave it off.

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Patch remedy update loop

Post by Cubert »

Turning off auto update will stop all updates being applied to agents , yes..

BlooTech
Posts: 27
Joined: Tue Dec 12, 2017 5:05 pm
6

Re: Patch remedy update loop

Post by BlooTech »

Cubert wrote: Mon Feb 25, 2019 2:14 pm That's the issue? On line 220 of the else side of script we test for this version and if current we exit script doing nothing. So why does line 220 think that the build is less than that number? Can you add a script log line just after 220 that prints out @CURRENTBUILD@

We need to verify that it truly is matching even though it says only less than.

Capture.PNG

As you can see in the image the logic says to exit if a match is made. Is this agent a minority in relation to this issue or are all 1809 agents hitting this test?

It maybe some space or hidden char in the build number breaking the test.

We're having this same issue with multiple clients as well even with the latest PR update. Literally downloading 150-200GB+ every 24 hours. The file is windows10.0-kb4487017.msu which is different than OP's though. I believe my agents are 1803 though... Would adding "Log: @CURRENTBUILD@" to line 221 on Else end resolve this for me as well you think? Or would I be putting it on line 210 since its 1803 versions that are failing? (or both lines to prevent possible 1809 future issues?). Why is it only us that are having this issue, faulty PR update?

Image

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Patch remedy update loop

Post by Cubert »

No,

Patch Remedy reads from your database the OS version and builds. If the database has a space or otherwise hidden char in it the the test fails and the patch is assumed to be needed.

(123 = 123) but (12 3 does not = 123)

Sometimes the agents report differently so we get inconsistent test results. So first we need to identify if that's the case buy visually testing the values.

So to answer your first question, yes creating that line will allow you to see the output we are testing against so you can see if there is anything odd about it.

Post your findings here.

BlooTech
Posts: 27
Joined: Tue Dec 12, 2017 5:05 pm
6

Re: Patch remedy update loop

Post by BlooTech »

Hi Cubert,

Is this what you need? Image

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Patch remedy update loop

Post by Cubert »

If that is the print out then I see your issue.

Looks to have a "\cr" between the major and minor numbers

So in your case Automate has collected this data and has a carriage return caught in it. This can be corrected before the tests by inserting a new script line that removes the newline in the middle.

Give me a little while here and I can post the script line that can be added. I will need to play with it and see if I can reproduce the newline for testing.

BlooTech
Posts: 27
Joined: Tue Dec 12, 2017 5:05 pm
6

Re: Patch remedy update loop

Post by BlooTech »

Thank you. Why is automate adding an extra carriage return in my case? I even went as far as fully removing the PR plugin\maintenance script and reinstalled but same issue persists.

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Patch remedy update loop

Post by Cubert »

Keep in mind it not the plugin.. We pull that data from what LabTech DB has in it from agent not what we splice together from scans. So when 1 or 2 agents have a extra newline or something it is typically data stored already in the DB. If your able you might test to see if deleting the agent and letting it recreate a new agent ID and populate its data in the database, that the data corrects itself.


If able give that a try and report back here if that had any effect

BlooTech
Posts: 27
Joined: Tue Dec 12, 2017 5:05 pm
6

Re: Patch remedy update loop

Post by BlooTech »

It could just be a LT bug at this point since I can't see any reason why that return is being added. I've been able to get what looks like the right output by combining the powershell commands into one line instead of multiple. I would be leaving everything in the script intact except for how the Current Build variable is set, do you think that would work? I've copied the script contents below

Code: Select all

$ubr=(Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name UBR).UBR
$build=(Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name CurrentBuildNumber).CurrentBuildNumber
"$build.$ubr"

Post Reply

Return to “Patch Remedy for LabTech (Patch Remedy 4) Retired”