Re: How to Install switch to operate two lights.
OK, what I posted will do the trick and leave the receptacles alone. First step is turn off the circuit and remove the wire running across the room from light 2 to light 3. If that cable is long enough run it from light one to light 4 connecting the blacks to black and whites to white. Turn on the power all four lights should light, the smoke detector should have power, and the additional light and switch should work normally. Turn the power off and disconnect the black power wire from lights 1 & 2 connect the white wire (remark) to the switch to the power blacks and the black wire from the switch to the black going to light 1 &2. Turn the power on, the switch should turn 1&2 on and off but 3 &4 should stay on, the smoke detector should have power, and the additional light and switch should work normally. You can the turn the power off and do the same switch connections at light 4.
Be sure you live your life, because you are a long time dead.-Scottish Proverb