I've got a dell 8100 and have a brother who has a nasty habit to press the power button while I'm in the heat of battle reloading my gerand in CoD. When pressed the button quits all apps and shuts down the computer, which rather annoys me. I'm not familiar on how the power button works, but would a switch that was placed on the ground wire of the power button disable it's functionality as long as the "vandal" switch cut the wire? My concern is that the powerbutton lets current pass and that a cut in current would trip the shutdown command and the computer would start the process of shuttingdown instead of dissabling it which is exactly what I don't want it to do: shutdown! Please ask for a diagram if you are confused.
Start -> control pannel -> power options -> "Advanced" tab -> then under the "When I press the power button on my computer" drop down, select "Do Nothing" and that'll fix your problem!
If you still want to use a switch, you just need to connect it in series with the PC power button. Basically, just cut the wire to the power button, and solder a new toggle switch in the gap.
Unfortunately momentry keyswitches aren't as easy to get hold of as standard key switches, so this option isn't as feasable.
The switch doesn't technically have to be momentary... you'd just have to turn the key, then turn it back again. Its better just to have a push switch and a key switch though, so you can disable the main switch whenever you want.