Strip the insulated wires with wire cutter blades to expose 1 2 inch of bare wire at each end.
How to wire a wall light with pull switch.
Thread the collar of the pull cord switch through the opening in the light fixture and attach the retaining nut to hold the switch in place.
Strip the wire ends in the attic near the light and at the wall switch location.
Twist a wire connector onto to one black wire from the switch and onto the black wire from the light fixture connecting them together.
At your new wall switch pull all the wires through the back of the electrical box.
Strip black and white wires as in step 5.
So one of your switch wires should be attached to the black wire of the light and the other switch wire should be attached to the hot supply wire.
Here is a picture gallery about how to wire a pull cord light switch diagram complete with the description of the image please find the image you need.
Install the new pull cord switch.
The white neutral should go directly to the white wire on the light fixture.
Wrap 1 1 2 inches of black electrical tape around the white wire of the romex at both ends just behind the bare wire.
All a switch does is break the connection of the hot wire and reconnect it to turn the light on.
Discard the old switch.
After you have run the romex from the fixture to the box that will hold the wall switch it is time to connect the wires.