TechBlog

Teknik och filosofi

Rename you USB audio device

inga kommentarer

If you have multiple USB audio devices connected to your computer, things can get messy. How do you tell the difference between “1-USB Audio Device” and “2-USB Audio Device”?

Wouldn’t it be nice if you could rename your devices to something more friendly?

Actually you can. But it is kind of complicated.

The plug and play devices are stored in the registry below the HKLM\SYSTEM\CurrentControlSet\Enum key. Each device can be found 3 levels down from the Enum registry key.

I can be difficult to find your device in the registry, but look in the DeviceDesc value. The last part of this value will probably match the current name of your device.

image

If you find your device you can add a new string value called FriendlyName. After a reboot windows will pick this value up and use this as the name of the device.

There is one big gotcha: You will not have write permission to this registry key. Not even as a local admin in a elevated process.

To work around the permissions you can use PsExec from Microsoft Sysinternals. This program allows you to launch processes in the LocalSystem user context.

Create a small file called RegScript.CMD containing a simple REG ADD command.

REG ADD “<registrypath>” /v “FriendlyName” /t REG_SZ /d "My Device Name" /f

Remember to replace the <registrypath> part with the path to your devices registry key. Right click the key in RegEdit and select Copy Key Name will do the trick.

Now launch the following command line from an elevated console:

psexec.exe –s RegScript.CMD

The –s parameter is the trick, it will execute the script as LocalSystem.

There is also a little utility that does this for you, please check out the freeware section.

Av kalle

november 25th, 2014 at 10:39 e m

Postat i Okategoriserade

Kommentera