This is a method I have used that worked very well. Before starting this procedure, cover any surrounding areas to prevent window sealer from getting on unwanted surfaces.
1. Clean out any rust or other debris/glue in the chrome trim glass channel and let the glass down about an inch from the top.
2. Cut a strip of black vinyl that has a grain to it about 4 inches wide and the length of the channel in the chrome trim piece.
3. Place a bead of clear windshield sealer in the bottom of the channel of the chrome piece.
4. Put a bead of the same window sealer on the edge of the quarter glass.
5. With the black side facing the glass, wrap the vinyl strip around the edge of the glass with about 2 inches on either side. Make sure it’s even with the top edge of the glass but not above it.
6. While holding the vinyl in place, slide the chrome piece over the vinyl pushing it onto the edge of the glass and vinyl. Some of the sealer will most likely be forced out between the work pieces. Clean up any excess right away.
7. After the sealer is set, use a sharp razor knife or razor blade to trim the vinyl off along the chrome piece on both sides of the glass. Take care not to scratch the glass.
Other members may have had success using different methods but this worked for me.