I use Velcro. Wipe the back of the switch and fore end with some rubbing alcohol so it adheres good. Just make sure you have the switch where you want it before you stick it. I've had to change a few after I found out I was not happy with the placement.
I mounted my pressure switch for my surefire with 3M hook and loop super strong Velcro type stuff so I can remove it whenever I want to. Be sure to clean the mounting surfaces REALLY good with alcohol or solvent and use adhesive promoter for best results.