I take it you are unaware that the windshield and rear glass are caulked (adhesive sealed) in place?
This is a job best left for professionals to re-seal. Anything else is a band-aid. You could take off the trim and silicone around the outside of the window without removing the glass, but once again, its a temporary fix.
While your on the subject I notice I have small wires going into my windshield. Im afraid this will get damaged if I even attempted doing them myself. Im guessing one is antenna and the rear is the deicer.