I just went through this last weekend while trial fitting everything......those trim pieces are held in by a series of panhead trim screws which are under the roof rail seal. Some seals are glued in, others aren't - luck of the draw for you......hopefully you don't have to destroy the seals to get at the screws....
If you do have to replace them, take a bunch of pics of how the roof rail seal fits because the aftermarket is very hit and miss with their sizing. I have the Soff Seal version - driver's side fitted perfectly - passenger is about 2 inches short down the vertical B-pillar section.....yes, I managed to stretch the distance but I don't like how it is in tension on the anchors....
On the door window sweeps - that's easy.....roll the window down and with a bit of luck you'll get access to the screws.....sometimes you can, others you need to remove the inside door panel and loosen the window stop to get access....