pressed cmos button while the pc was running

Solution
CMOS button? Do you mean the Clear CMOS button?

Pressing that button resets all the BIOS settings to their factory defaults.

Go into BIOS Setup and make the necessary changes, then save and exit (F10)