Once it comes out there's only one way to get it back in permanently - replace the windshield. There is a ghetto solution, but it won't last nearly as long as doing it right.
The windshield is a structural member of the car - it adds rigidity to the A-pillar structure. The windshiel does this becasue it is glued in place with some damn strong urethane glue/sealant. When a windshield is installed, some excess urethane will squeeze out from around the outer edge of the windshield, and the weatherstrip is pressed into the channel while this urethane is still goo. When the urethane sets, both the windshield and the strip are adhered in place.
If you need to reinstal yours, here's the ghetto solution. You can buy the urethane to instal a windshield at many auto parts stores. It's made by 3M and comes in a caulk tube - anywhere from $10-25 a tube depending on the grade of urethane. Buy a tube and a caulk gun if you don't have one.
Clean the weatherstrip and the channel around the windshield, but do not use any kind of solvent (paint thinner, alcohol, etc). Use a spray cleaner like 409 or Fantastic. Cut the very tip of the tube of urethane off, so that only a thin bead of urethane can come out of the tube. run a very fine bead of urethane around the edge of the windshield in the channel where the weatherstrip goes. Press the weatherstrip into the channel, and use some small pieces of duct tape to hold it in position. Let the urethane cure for a day, then gently remove the duct tape. If you yank the tape, you just might pull the strip free again!