Remove the glass and rubber seal first. I have tried to put the trim back on with glass installed, and it's not worth the effort. Also the trim bends easily and you will deform it trying to squeeze and force it into the rubber seal.
Remove the windshield by prying and pushing (with your fingers) on the rubber seal from the inside the cabin along the top edge. Once you have enough of the seal unseated from the body flange it will easily lift out.
Install all of the aluminum trim into the seal
Use masking tape to hold the trim into place
Then install the whole thing back into the body opening.
Use something like 1/8" parachute cord.
You can adjust the glass by bitch smacking it with an open hand (once your hand makes contact, push or pull in the direction your glass needs to move.)