Remove the dirt inside the window well until you reach the footer drain.
Cut through the drain tile with a hacksaw so you can fit a tee between the cut sections of pipe. The drain tile is the pipe inside the footer drain that carries water away from the foundation. A tee is a piece of pipe shaped like the letter "T" that allows three pipes to be connected.
Apply PVC cement to the inner edges of the two holes of the tee that will be connected to the drain tile.
Attach the tee to the drain tile with the tee pointing up.
Attach a riser pipe to the tee.
Wrap landscaping fabric around the tee to cover all three joints between the tee, drain tile and riser pipe.
Fill the hole with 3/4-inch gravel.
Cut off the excess length of riser pipe and attach the drain to the end of the pipe.