How to remotely modify the registry

Shane head shot
Shane Corellian|June 15, 2011
Generic blog header
Generic blog header

Every now and then, you probably find yourself needing to make some modifications to the registry on your local computer. But what about those damn remote computers? No worries; using PDQ Deploy, you can make your changes easily.

One of the cool features of PDQ Deploy is the ability to run a command on the target system. All you have to do is create a New Action of the type Command.

pasted image 0 (11)

In this case, after I added a new Command Action, I deleted the first Action, which is by default, an Installer. (this is PDQ Deploy after all). You can create as many Actions (Installer or Command as you’d like).

pasted image 0 (12)

In the case above I am deleting a registry value called AnnoyingApp from the Run key under HKEY_Local_Machine\Software\Microsoft\Windows\CurrentVersion\Run. Here is the command

REG DELETE HKLM\Software\Microsoft\Windows\CurrentVersion\Run /v AnnoyingApp /f

Or if you want to add a value:

REG.EXE ADD "HKLM\SOFTWARE\Microsoft" /v SourceDirectory /t REG_SZ /f /d \\Southpark\StansStuff

Of course, there are a lot of commands you can run using PDQ Deploy, but remember that any command you run remotely cannot be interactive. In other words, you don’t want to run a command that expects user input after it opens. If the remote command does need user interaction, you will have a process that is hanging.

I like to use the Command Action to kill running processes (taskkill.exe) preparatory to an installation, or perhaps I want to perform some post-deployment tasks such as removing AutoUpdate registry values or associating additional file types with the new application.

Think about the commands that you find yourself running. There are likely a bunch. We agree that psexec is an excellent tool. Still, if you are continually running the same commands on many systems, the ability to simultaneously run the command on all of your computers is a great benefit.


Shane head shot
Shane Corellian

Shane is the co-founder of PDQ.

Related Articles