In the past I demonstrated how to use BatchPatch to deploy registry changes to multiple remote computers. For your reference those tutorials are available at the following links:
Remote Registry Updates with BatchPatch
Deploy Registry Keys to Multiple Computers Using BatchPatch
Deploying a Registry Key / Value to HKEY_CURRENT_USER (HKCU) or All Users in HKEY_USERS (HKU)
Today I’m going to show you another simple way that you can use to create or modify the registry on multiple remote target computers, using BatchPatch. This method is very simple. Essentially we are just going to use the ‘REG ADD‘ functionality that exists in Windows, but we are going to use BatchPatch to remotely execute that functionality on the desired target computers. Microsoft has documentation for ‘REG ADD’ at this link. If you plan to use this method, you’ll almost definitely want to read through that documentation before you begin. You’ll use the instructions in the documentation to create the actual string that you’ll input into BatchPatch for remote execution. In this example the REG ADD command does all the work of creating/modifying the desired registry key/value. BatchPatch in this case is simply providing you with a simple method for remotely executing the command on numerous remote computers.
For this tutorial we are going to set the value of the ‘Start’ DWORD under HKLM\SYSTEM\CurrentControlSet\Services\USBSTOR to 3. The REG ADD command to accomplish this is:
REG ADD HKLM\SYSTEM\CurrentControlSet\Services\USBSTOR /v Start /t REG_DWORD /d 3 /f |
IMPORTANT: Aside from making sure that you create the correct syntax for the desired registry key/value to be applied to target computers, the most important component of the command above for running remotely from inside of BatchPatch is the ‘/f’ parameter. The reason for this is because the /f instructs the target computer to skip any confirmation prompts that would otherwise popup invisibly and prevent the command from completing. Under normal circumstances if you were to execute the REG ADD command at the cmd prompt of a given computer, it would prompt you to confirm that you want to proceed. However, if you run the same command remotely with BatchPatch, the confirmation prompt will not be visible. This will cause the command to hang indefinitely without ever completing. So, in order to ensure that the command proceeds without any kind of confirmation prompt, you need to add /f to the end of it.
- The most important step of this process is to make sure that your command does what you want it to do without actually using BatchPatch. That is to say that you need to run the command at the cmd prompt of a test computer to make sure that it inserts the desired registry key/value, and make sure that it does not prompt for confirmation after it is executed. Once you confirm that the command does what you want it to do, then you are ready to insert that command into BatchPatch for remote execution on numerous systems.
- At this point you should have already tested your REG ADD command at the cmd prompt of a test computer. Now that it works as desired, all you need to do is add it to BatchPatch. For this we’ll use a BatchPatch remote command. Highlight the desired target computers in your BatchPatch grid, and then select ‘Actions > Execute remote process/command > Create/modify remote command 1’. You can actually use any of the remote commands 1, 2, 3, or 4 to accomplish this, but for this tutorial we’re just using 1.
- Copy and paste your command into the BatchPatch remote command window.
- The last thing to do is execute the command. When you do this BatchPatch will connect to all of the highlighted target computers in the grid, and it will submit this command to be executed on all of those machines. That’s all there is to it.