Programming Baofeng UV-9R through communication cable

I bought a couple of Baofeng UV-9R radios with a computer communication cable, but I could not find instructions on how to program the radios from a computer. It took me some time to figure it out, and here is a summary. There are two ways to connect to the radio.