Unfold a vinyl membrane that is long enough to reach all the way across the length of the deck floorboards. Go under the deck with the membrane and line up the edge of the vinyl membrane with the first board at one end of the deck. Secure the edge of the membrane to the board with staples every 3 to 4 inches.
Provide enough slack to create a trough 3 inches deep between joists, then attach the membrane to the next joist with staples in the same manner as in Step 1. Use this method all the way across the underside of the deck, one joist after the next. If the vinyl liner does not provide enough length to create troughs all the way across the bottom of the deck, use more than one liner, overlapping them at the joist where they meet.
Pull the vinyl liner up against the bottom of the floorboards beneath the deck at the end of the troughs closest to the house. Secure that end of the liner to the floorboards with staples so that the liner slopes downward as it moves away from the house.
Install enough gutter pieces to reach all the way across the width of the deck at the front of the deck so that the vinyl troughs empty into the gutter. Secure the gutters in place with screws. Connect a downspout directed away from the house to the end of the gutter with screws.