Forum Replies Created
-
AuthorPosts
-
dougModerator
Your script with the modified If/Then statement would try to remove the key from each of
.DEFAULT, S-1-5-18, S-1-5-19, S-1-5-20. If the key does not exist in at least one of those places then I would expect it to return 2. If you want to delete the key from specific locations, then modify the script to just delete from those locations rather than leaving the script to loop through all of the subkeys.dougModerator1. Your modification to the script is wrong. You should either leave the original If/Then statement as-is, or you should remove the entire If/Then statement. However, your modification to the If/Then statement will produce a result that is not aligned with what you are aiming to do.
2. You can lookup the return code at this link. Note, the enum is zero based, so wbemNoErr == 0, wbemErrFailed == 1, wbemErrNotFound == 2, and so on: https://docs.microsoft.com/en-us/windows/win32/api/wbemdisp/ne-wbemdisp-wbemerrorenum?redirectedfrom=MSDN
You received a return code of 2, indicating that you are trying to delete a reg key that does not exist. This is not surprising because the way that you modified the script would cause the script to the look for the key in places where it would not likely exist.
dougModeratorI’m not sure that the error you posted has anything to do with drivers failing to install in the way that I was suggesting. Error 59 is a network error. So if you were updating VMWare drivers remotely then it certainly makes sense that the VM would lose connectivity while those drivers were being updated. That’s a separate thing from what I was suggesting about drivers not installing successfully via Windows Update.
ERROR_UNEXP_NET_ERR 59 (0x3B) An unexpected network error occurred.
Yeah also it seems that in the newer OSes Microsoft doesn’t even present the driver updates anymore in the normal Windows Update control panel. At least so far as we have seen it appears to be the case that they now hide these from the user, so I guess they recognize that the driver installations through Windows Update aren’t a great method for installation.
dougModeratorGlad that worked. However, it’s also worth noting that the Windows Update Agent has a lot of trouble installing the driver updates that it advertises. We generally do not recommend installing drivers through Windows Update (or through BatchPatch which utilizes the Windows Update Agent). They will frequently fail to install.
dougModeratorThis link explains all of the possible reasons you could be seeing this:
batchpatch-and-the-windows-update-control-panel-report-a-different-number-of-available-updates
dougModeratorIn the future we might provide other options. For now if you want to keep that rule enabled you should consider whitelisting psexec and psexesvc, or have a look at this link which provides instructions for modifying the remote service name, which might enable you to leave everything else as-is: what-to-do-when-psexec-is-blocked-by-your-anti-virus-software
dougModeratorBatchPatch does not use Win32_Product, so it cannot be compared to your custom query. They are two completely different things. As I mentioned above, if you have problems running a query through BP, the first thing to do is try the query directly on the target computer at the command prompt *without* using BP. This is very simple to test. I’m confident that your issue is related to the snippet I posted above about Win32_Product doing quite a lot behind the scenes. For this reason you will find *lots* of people on the internet describing why they never use it. My recommendation to you is to not use Win32_Product.
dougModeratorWhen in doubt you should execute the command directly at the command prompt of the target computer rather than through BatchPatch. This would help you determine if the issue is with the command or the issue is somehow being introduced by executing through BatchPatch. In this case your command syntax looks correct to me. However, note the following warning, which I suspect is part of your issue here, from https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/aa394378(v%3Dvs.85)
Warning Win32_Product is not query optimized. Queries such as “select * from Win32_Product where (name like ‘Sniffer%’)” require WMI to use the MSI provider to enumerate all of the installed products and then parse the full list sequentially to handle the “where” clause. This process also initiates a consistency check of packages installed, verifying and repairing the install. With an account with only user privileges, as the user account may not have access to quite a few locations, may cause delay in application launch and an event 11708 stating an installation failure. For more information, see KB Article 794524.
dougModeratorThanks. We’ll consider this.
dougModeratorThanks for the feedback. What about the ‘title’ field? Is this not sufficient? Let me know.
Thanks,
DougdougModeratorYou can get the local time on a target computer by using the following command inside a BatchPatch ‘Remote Command 3’ or ‘Remote Command 4’ (logged output):
time /t
dougModeratorHelp > check for updates > View changelog
dougModeratordougModeratorCTRL-F or ‘Grid > Find in grid…’
November 8, 2019 at 12:43 pm in reply to: Error 1620:-1 – Doing Windows Check for Available updates #12105dougModeratorOK, great. Thanks for reporting back. I’m glad you got it working.
-Doug
dougModeratorThanks. Yes we are considering this.
dougModeratorOk thanks for letting me know. Yeah that makes sense. I think you’re right it’s very likely ThinApp. Keep me posted.
dougModeratorOK thanks for reporting this. We’ll look into what’s going on.
dougModeratorWhat exactly are you clicking to produce that? It’s not clear from your screencap.
November 6, 2019 at 7:25 am in reply to: Error 1620:-1 – Doing Windows Check for Available updates #12093dougModeratordougModeratorThanks for the suggestion. We’ll consider this for a future build. In the meantime one option that you can use that you probably weren’t aware of to reduce the white glare is the transparency slider. It’s not exactly what you’re looking for of course, but perhaps it will help a bit. In the lower right corner of the BP main window you’ll see a small arrow icon. Click that to reveal the slider, and then adjust to make the BP window more or less transparent.
October 30, 2019 at 4:00 pm in reply to: -102: Failed to execute the search. HRESULT: -2145107921 #12086dougModeratorThis below link has another possible resolution for this error:
-102: Failed to execute the search. HRESULT: -2145107921
https://serverfault.com/questions/741083/unable-to-update-windows-server-2012
dougModeratorThanks. We’ll see what we can find.
-Doug
dougModeratorThanks. Do you know were you using CTRL-A to select all rows, then initiate the action, then click on the next grid tab and repeat? Or were you only selecting some rows in each grid? Or were you selecting all rows in each grid but using the mouse to select them instead of using CTRL-A? And what about rotating between grids? Were you doing that with the mouse by clicking on each grid tab header or were you using some other method?
Thanks
dougModeratorThanks. We are looking into it. If you figure out how to reproduce it, please share those steps here.
October 23, 2019 at 1:45 pm in reply to: Error -102 (Do not connect to any Win. Update Internet Locations) #12075dougModeratorI would direct you to the Microsoft documentation that describes the behavior of this policy:
Do not connect to any Windows Update Internet locations
Even when Windows Update is configured to receive updates from an intranet update service, it will periodically retrieve information from the public Windows Update service to enable future connections to Windows Update, and other services like Microsoft Update or the Microsoft Store.
Use Computer Configuration\Administrative Templates\Windows Components\Windows update\Do not connect to any Windows Update Internet locations to enable this policy. When enabled, this policy will disable the functionality described above, and may cause connection to public services such as the Microsoft Store, Windows Update for Business and Delivery Optimization to stop working.
Note
This policy applies only when the device is configured to connect to an intranet update service using the “Specify intranet Microsoft update service location” policy.
I’m not sure why you are experiencing it only on your 2016 machines. It might be the specific combination of policies applied. I would start by evaluating every single applied policy to see if any one or combination of policies is causing the discrepancy.
If you have the “Specify intranet Microsoft update service location” policy set, then you should not need the “Do not connect to any Windows Update Internet Locations” policy. However, I would suggest that you pay attention to the possibility of “Dual Scan” being enabled on your 2016 computers. I would suggest that you consider enabling “Do not allow update deferral policies to cause scans against Windows Update”.
More on Dual Scan:
dougModeratorYou can create a custom remote command in BatchPatch ( how-to-hard-code-your-own-custom-commands-in-the-batchpatch-actions-menu ) with the following syntax:
taskkill /IM notepad.exe
Then create a job queue that executes this remote command in the step before your deployment is executed. Then when you execute the job queue it will first run the taskkill command to kill your app (maybe firefox.exe or whatever), and then it will run the deployment.
using-the-job-queue-in-batchpatch-for-multi-step-execution
I hope this helps.
-Doug
October 22, 2019 at 4:52 pm in reply to: Error after Update to Version 2019.10.18.12.16 – select OK at "Run As Service"- #12067dougModeratorA fix has now been published.
-Doug
October 22, 2019 at 1:00 pm in reply to: Error after Update to Version 2019.10.18.12.16 – select OK at "Run As Service"- #12066dougModeratorThanks. We are working on it.
-Doug
dougModeratorMakes sense. I would suggest you try to switch back to using PsExec (unless for some reason you aren’t able to get it working). There are two possible ways PAExec would have been in use… Either it would have been renamed to PsExec.exe and just swapped in, or it would have been specified under ‘Tools > Settings > Remove Execution > Use psexec.exe custom filepath’
-Doug
-
AuthorPosts