doug

Forum Replies Created

Viewing 30 posts - 661 through 690 (of 1,981 total)
  • Author
    Posts
  • in reply to: Use .vbs to delete registry keys for HKEY USER #11973
    doug
    Moderator

    I don’t know why you are having problems, but I would suggest you test your script directly on a computer without using BatchPatch. Then you can add some error handling to figure out exactly why it’s failing. For example if you run the following script it will print out the return code and error code if it fails:

    strComputer = "."
    strRegPathSuffix = "\Software\Microsoft\Office\16.0\Outlook\Resiliency\DisabledItems"
    Const HKEY_USERS = &H80000003
     
    Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
    strKeyPath = ""
    oReg.EnumKey HKEY_USERS, strKeyPath, arrSubKeys 
    For Each subkey In arrSubKeys
    'wscript.echo subkey
    	If NOT ((InStr(1,subkey,".DEFAULT",1) > 0) OR (InStr(1,subkey,"S-1-5-18",1) > 0) OR (InStr(1,subkey,"S-1-5-19",1) > 0) OR (InStr(1,subkey,"S-1-5-20",1) > 0) OR (InStr(1,subkey,"_Classes",1) > 0)) Then    
    		strKeyPath = subkey & strRegPathSuffix
    		wscript.echo strKeyPath
    	Return = oReg.DeleteKey(HKEY_USERS, strKeyPath)
    		If (Return = 0) And (Err.Number = 0) Then    
    			Wscript.Echo HKEY_USERS & strKeyPath & " successfully deleted"
    		Else
    			Wscript.Echo ".DeleteKey failed. Return value = " & Return & ". Error value = " & Err.Number
    		End If
    	End If
    Next

    You can then 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

    in reply to: Windows Server 2019 no update history on target machine #11972
    doug
    Moderator

    Thanks. Unfortunately this is not a BatchPatch issue. It’s a Windows issue. Microsoft made changes in Windows 2019 in how it shows the update history. We actually don’t know if it’s intentional on their part or if they would consider it a bug. There are a couple of things to know:

    1. You can see the proper update history if you use BatchPatch ‘Actions > Windows Updates > Generate consolidated report of update history (Windows Update Agent)’

    2. On the target computer itself Windows now has two separate views for seeing update history. The two views do not both report the same information. One of them does show at least *some* of the updates that were installed by BatchPatch. The second screen is visible only after you click the ‘Uninstall updates’ link on the first screen or by going directly to the Windows ‘control panel > programs and features > view installed updates’.

    These are the two screens that you can see in Windows:

    UpdateHistory01
    UpdateHistory02

    ———————————————
    ———————————————
    This is the screen that you you can see by querying the history from within BatchPatch for the same target computer:

    UpdateHistory03

    in reply to: Use .vbs to delete registry keys for HKEY USER #11969
    doug
    Moderator

    To delete a single registry key on target computers you could use the syntax described in this posting: deleting-registry-key

    If you are trying to delete a key from all users in HKU then yes you could certainly modify the script at this link: deploying-a-registry-key-value-to-hkey_current_user-hkcu-or-all-users-in-hkey_users-hku That script currently uses StdRegProv.EnumKey, StdRegProv.CreateKey, and StdRegProv.SetStringValue. You could modify the script to fit your needs and to use StdRegProv.DeleteKey as the deletion method.

    More on the aforementioned StdRegProv methods:
    https://docs.microsoft.com/en-us/previous-versions/windows/desktop/regprov/enumkey-method-in-class-stdregprov
    https://docs.microsoft.com/en-us/previous-versions/windows/desktop/regprov/createkey-method-in-class-stdregprov
    https://docs.microsoft.com/en-us/previous-versions/windows/desktop/regprov/setstringvalue-method-in-class-stdregprov
    https://docs.microsoft.com/en-us/previous-versions/windows/desktop/regprov/deletekey-method-in-class-stdregprov

    doug
    Moderator

    Great, glad you got it figured out

    -Doug

    doug
    Moderator

    I guess I’m confused. Your original deployment works because you followed the instructions in that link to create it. But the second one does not work because you didn’t follow the instructions in that link. I can’t tell from the log you provided exactly what is going on, but I can see that there are some weirdnesses there. For example… when a deployment is performed there is no need to perform a manual separate file copy operation. The deployment itself handles the file copy. Second, the deployment looks to the deployment staging folder for the file that is being executed, but your log shows that it is looking at C:\dnsfix.reg, which is not in the deployment staging folder. I know you said the file exists at that location, but that’s not my point. My point is that what you have created is not a normal/standard/expected deployment, though I don’t fully understand exactly what you have created without being able to see the actual deployment configuration window. At this point where I’m confused is if you had a successful deployment that you created by following the instructions in the aforementioned link, why would you not follow it again to create a new deployment? Why are you trying to do something differently in the new deployment rather than following the instructions for how a .reg deployment is created in BP? It seems, based on the logs you showed, that you have somehow modified the deployment in a way that won’t work (such as, for example, modifying the actual command to execute instead of using the command to execute that BP automatically creates when you setup the deployment).

    If you can provide me with a screenshot of your deployment configuration (I mean the actual window where you create the deployment in BP) I might be able to see where things aren’t setup right. This forum doesn’t allow you to upload images, so you would either have to post the image on imgur or similar and then link to it from here, or you may email us through the contact form on our website for further support.

    Thanks,
    Doug

    doug
    Moderator

    Please follow the instructions at this link, which shows how to deploy a single .reg file:

    Deploy Registry Keys to Multiple Computers Using BatchPatch

    in reply to: Deleting Registry Key #11957
    doug
    Moderator

    {89820200-ECBD-11cf-8B85-00AA005B4340} is a registry key, not a value. So it needs to be deleted with the syntax for removing a registry key, not the syntax for removing a registry value.

    This command does NOT work at the cmd prompt (nor in BP) because the syntax is wrong:

    reg delete “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components” /v {89820200-ECBD-11cf-8B85-00AA005B4340} /f

    This correct syntax works both at the cmd prompt and in BP:

    reg delete "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\{89820200-ECBD-11cf-8B85-00AA005B4340}" /f

    in reply to: Error -102 Windows 2012 – #11951
    doug
    Moderator

    For all other -102 HRESULT values, please see batchpatch-error-102-failed-to-execute-the-search-hresult-xxxxxxxxxx

    in reply to: Searching for Microsoft Update via microsoft cannot be reach #11950
    doug
    Moderator

    For all other -102 HRESULT values, please see batchpatch-error-102-failed-to-execute-the-search-hresult-xxxxxxxxxx

    in reply to: cant search for windows updates on host #11949
    doug
    Moderator

    For all other -102 HRESULT values, please see batchpatch-error-102-failed-to-execute-the-search-hresult-xxxxxxxxxx

    in reply to: Error -102 #11948
    doug
    Moderator

    For all other -102 HRESULT values, please see batchpatch-error-102-failed-to-execute-the-search-hresult-xxxxxxxxxx

    in reply to: 102: Failed to execute the search. HRESULT: -2145107940 #11947
    doug
    Moderator

    For all other -102 HRESULT values, please see batchpatch-error-102-failed-to-execute-the-search-hresult-xxxxxxxxxx

    in reply to: -102: Failed to execute the search. HRESULT: -2147024882 #11946
    doug
    Moderator

    For all other -102 HRESULT values, please see batchpatch-error-102-failed-to-execute-the-search-hresult-xxxxxxxxxx

    in reply to: -102: Failed to execute the search. HRESULT: -2145107941 #11945
    doug
    Moderator

    For all other -102 HRESULT values, please see batchpatch-error-102-failed-to-execute-the-search-hresult-xxxxxxxxxx

    in reply to: -102: Failed to execute the search. HRESULT: -2145107921 #11944
    doug
    Moderator

    For all other -102 HRESULT values, please see batchpatch-error-102-failed-to-execute-the-search-hresult-xxxxxxxxxx

    in reply to: -102: Failed to execute the search. HRESULT: -2145103860 #11943
    doug
    Moderator

    For all other -102 HRESULT values, please see batchpatch-error-102-failed-to-execute-the-search-hresult-xxxxxxxxxx

    doug
    Moderator

    For all other -102 HRESULT values, please see batchpatch-error-102-failed-to-execute-the-search-hresult-xxxxxxxxxx

    in reply to: -102: Failed to execute the search. #11941
    doug
    Moderator

    For all other -102 HRESULT values, please see batchpatch-error-102-failed-to-execute-the-search-hresult-xxxxxxxxxx

    in reply to: -102: Failed to execute the search. HRESULT: -2147023838 #11940
    doug
    Moderator

    For all other -102 HRESULT values, please see batchpatch-error-102-failed-to-execute-the-search-hresult-xxxxxxxxxx

    in reply to: Error 198 from Batch Patch Server #11938
    doug
    Moderator

    The age of the file wouldn’t be the issue, which is why I suggested looking at the digital signature in order to confirm if the file had been corrupted since the error message that you are getting indicates that the file is corrupted (a corrupted/modified file would not contain a valid signature). If your BP computer can’t download the WsusScn2.cab file then there is either a transient issue with Microsoft’s server or there is some kind of issue with your BP computer… not sure if you have a proxy or a web filter/firewall that prevents it from getting the file. In either of those cases you can certainly put the file there yourself, and then BP will use it.

    in reply to: Error 198 from Batch Patch Server #11935
    doug
    Moderator

    0x8007000D The data is invalid. ERROR_INVALID_DATA

    This implies that there is probably an issue (presumably some type of file corruption) with the WsusScn2.cab file that ServerA is using. Either there was corruption when downloading it from Microsoft to ServerA, or the corruption is being introduced when ServerA copies it to the target computers. If you manually inspect the WsusScn2.cab file (both on ServerA as well as on a couple of targets) you can right click on the file and view ‘Properties > Digital Signatures’ as a way to verify that the file has not been corrupted/modified. If the Digital Signatures tab is present with signatures listed, then the file is good. If it is not present or if it is present but with no signatures listed, then the file is not good. If it’s not good then you can delete the WsusScn2.cab file and let BatchPatch re-download it. If it’s good on ServerA but not good on the targets, then the corruption is being introduced during the file copy from ServerA to the targets. This would be unusual, but it would imply that you have issues with your network.

    in reply to: Exit Code:6 #11931
    doug
    Moderator

    Under normal circumstances when performing a deployment, the exit code is actually coming from the setup/installer application, not from psexec or BatchPatch. So if BatchPatch ‘check for available updates’ runs successfully on that same target computer where your deployment fails, then you’ll know that the issue is nothing to do with psexec but rather is due to either a problem with the deployment configuration or is the return code that the setup/installer is returning. Since you said you can successfully run the same deployment on other computers, then that would imply that there could just be an error running the setup/installer on this particular computer. In that case I would remove BatchPatch from the equation and run the setup manually on that target computer and see what it says.

    in reply to: Error 102 #11929
    doug
    Moderator

    The error in question is:

    0x80072EE2 -2147012894 ERROR_INTERNET_TIMEOUT

    We have never seen (nor would we ever expect to see) this error occur when using offline mode because when operating in offline mode, the target computer does not try to check for updates on a network/internet location. That said, I’m not quite sure what to make of it.

    Things that I would look at:

    1. Review all Windows Update policies applied to the target computer via group or local policy. I am not aware of any Windows Update policy that could cause the behavior that you are seeing, but it’s something worth reviewing nevertheless.

    2. Review any type of software installed on the target computer that could cause unexpected behavior… this would typically be some type of antivirus software, host intrusion prevention/protection software, a software firewall, a software proxy, or any other security related software that is installed on the machine that could possibly interrupt what is happening.

    3. Also review the Windows proxy settings on the system. I’m not sure if/how the Windows proxy settings could affect this behavior, but it’s another thing that should be reviewed.

    in reply to: Send mail before terminate the queue #11928
    doug
    Moderator

    Your suggested queue will work as desired. Step 2 will not be logged as a normal action, so after the email is sent, the queue will be terminated.

    -Doug

    in reply to: Column details/filter #11924
    doug
    Moderator

    A job queue step that comes after ‘check for available updates’ will not start until after ‘check for available updates’ has completed.

    in reply to: Error 102 #11710
    doug
    Moderator

    There is no mention of Silverlight in the link you referenced, so I really have no idea what you’re talking about when you mention that, but in that link there is a description of what your error means and suggestions on how to resolve it. Please review it again:

    batchpatch-error-102-failed-to-execute-the-search-hresult-xxxxxxxxxx

    in reply to: Get Windows Update Config #11708
    doug
    Moderator

    We’ll consider this.

    Thanks,

    Doug

    in reply to: Windows 7 to 10 In place upgrade #11707
    doug
    Moderator
    in reply to: Column details/filter #11701
    doug
    Moderator

    For what you are describing and wanting to do it does sound like you really want a tab with the “not yet complete” and a tab with the “already complete” hosts. However, if you don’t actually want to move completed hosts into a new tab then there are other options available:

    For example you could assign a category or description or custom notes to rows that have been completed. Use ‘Actions > Modify category, description, location, notes, color etc’ Then sort by that column.

    Another option is to use the Task Scheduler option to ‘Run task immediately upon detecting target computer online’. Apply that to every row in the grid and then start the scheduler and just leave it be and check back later.

    in reply to: Exit Code:6 #11700
    doug
    Moderator

    If the same deployment is working on other computers but failing on just the one computer, then it’s likely an issue with psexec not being able to properly/successfully run on that particular computer.

    If the same deployment fails on all computers, then the exit code 6 is likely being produced by the actual setup/installer that you are deploying. In that case you would need to refer to the vendor’s guide for what each exit code means.

    Another thing you can test is just running ‘Check for available updates’ on the computer that is generating the exit code 6. See if it also fails with the same error, which would indicate that the issue is psexec. Also you can check ‘Check for available updates’ on all computers to further confirm the exact source of the issue.

    1. If all target computers are affected then first try ‘Tools > Settings > Remote Execution > Use PsExec -r switch…’ and provide a name in that field such as BatchPatchExeSvc.

    If the suggestion in 1. works, then it indicates that probably the issue is being caused by anti-virus or HIPS or other security software in your environment that is blocking PsExec from working. If it does not work, then try 2.

    2. Try running BatchPatch from a different computer. If this works, then it indicates that PsExec has somehow broken or failed on the original computer. If this does not work try 3.

    3. Try substituting PaExec for PsExec by renaming PaExec to PsExec. See if it also fails. Frequently when PsExec “breaks” on a computer, PaExec also breaks, further indicating something is not functioning properly in the system.

    4. If you’re still stuck, try the BatchPatch troubleshooting guide to narrow down the source of the problem.

Viewing 30 posts - 661 through 690 (of 1,981 total)