This video is for an E53, but applies to all BMWs.

If your weatherstrip is cracked or destroyed you need to replace it with a new one (PN below). Often, ill-informed dealers or body shops will tell you they have to remove the windshield to do this repair. They are incorrect. you can do it without removing it in about 20-30 min.

“Cover, Windshield” BMW Part # 51317182004 (for E53) – you can buy it here: http://amzn.to/19qaDA5

This video uses Goo Gone, which can be purchased here:
http://amzn.to/14WbAiE

This video uses a trim removal tool, which can be purchased here: http://amzn.to/GYcJgu

This video uses foreceps, which can be purchased here:
http://amzn.to/16xkWns

Note: THE USE OF THIS DIY IS FOR YOUR REFERENCE ONLY. I DISCLAIM ALL LIABILITY FOR DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OR INJURIES THAT RESULT FROM ANY USE OF THE EXAMPLES, INSTRUCTIONS OR OTHER INFORMATION IN THIS DIY.