|It's extremely unlikely there's anything wrong with the desktop power switch itself|
It's a standard part, and they are extremely reliable.
- the wiring connector(s) that connects it(them) to two pins on the mboard may be loose
- if the case front has been removed and re-installed, it's possible the wiring to the switch has been damaged
- the case button that presses on the power switch may be sticking in the case - if it is pressing on the power switch all the time, the mboard will probably shut off in about 4 seconds, and the computer will not start up again until the power button is un-stuck- is not pressing on the power switch - before you press it.
If the case has a Reset switch it's the same type of switch - momentary contact, on only when pressed - the wiring for it can be used on the pins on the mboard for the Power switch and visa versa.
It's much more likely for problems booting the computer to be caused by other things, such as a failing power supply, or failing capacitors on the mboard.
Some mboards develop this problem - electrolytic capacitors were installed on them that were not properly made, and they fail eventually - the mboard manufacturer didn't know they were improperly made at the time the mboard was made.
Open up your case and examine the mboard to see if you have bad capacitors, and/or other findable signs of mboard damage .
This was the original bad capacitor problem - has some example pictures.
History of why the exploding capacitors and which mboard makers were affected:
What to look for, mboard symptoms, example pictures:
Home page that site
- what the problem is caused by
- he says there are STILL bad capacitors on more recent mboards.
Pictures of blown capacitors, other components, power supplies, fried Athlon cpus, etc.: