Introducing my friend Reg

Registry Tool | Admin Arsenal
    Photo by shawncampbell

A command-line tool that I have found very useful lately is reg.exe, the command-line registry editor. It is particularly useful to make changes to computers remotely using Admin Arsenal’s batch file deployment or remote command.

It has a number of different commands (see them by running reg /?) but the ones I use most are ADD and DELETE. It is available on all current versions of Windows so you don’t need to worry about deploying it. It’s particularly helpful to make a configuration change to a number of computers at a time without using a GPO and waiting for it to be applied. Recently I needed to enable unsolicited Remote Assist on a bunch of computers and reg.exe came to the rescue.

I created the following batch file:

reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v fAllowUnsolicited /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v fAllowUnsolicitedFullControl /t REG_DWORD /d 1 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v AllowTSConnections /t REG_DWORD /d 1 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fAllowToGetHelp /t REG_DWORD /d 1 /f

Then using Admin Arsenal’s software deployment, I pushed the batch file out to the computers and voil