How to set the left/right audio balance from command line on Windows

SoundVolumeView is a freeware tool for Windows which allows you to easily adjust the audio balance of sound devices and applications from command-line and GUI.
In order to change the left/right audio balance of sound device, you have to run SoundVolumeView, and find the device that you want to change its balance:

Let's say that you want to set audio balance of 'Speakers' device, 30% for left channel and 50% for right channel, so the right command is:
SoundVolumeView.exe /SetVolumeChannels "Speakers" 30 50

However, if there are multiple items with the same name, you have to use the string appeared under the 'Item ID' column or 'Command-Line Friendly ID' column in order to uniquely identify the correct sound device.
In the example of the above screenshot, you can use the 'Realtek High Definition Audio\Device\Speakers\Render' string to identify the device, for example:
SoundVolumeView.exe /SetVolumeChannels "Realtek High Definition Audio\Device\Speakers\Render" 30 50

If you want to change the audio balance relative to the current state, you can use the /ChangeVolumeChannel command. For example, the following command increases the volume of the right channel by 10%, without changing the volume of the left channel: (The '1' is the channel number)
SoundVolumeView.exe /ChangeVolumeChannel "Realtek High Definition Audio\Device\Speakers\Render" 1 10

If you want to decrease the volume of the left channel by 20% (The '0' is the channel number)
SoundVolumeView.exe /ChangeVolumeChannel "Realtek High Definition Audio\Device\Speakers\Render" 0 -20

You can also set the audio balance of specific application by specifying the name of the .exe file.
For example, if you want to set the audio balance of Chrome Web browser to 25%/50%:
SoundVolumeView.exe /SetVolumeChannels "chrome.exe" 25 50

You can find more information about the available command-line options in SoundVolumeView Web page.