Hello, here are a few things to try.
First of all, I would suggest following the advice above regarding power button settings in windows, as well as the BIOS settings. That would be the easiest place to change startup/shutdown behavior (assuming you haven't changed any of the default settings in Windows.) Also, the ideas about checking the RAM and even USB devices attached to the computer are definitely worth following. If that doesn't work, there are a few other things you can try.
The first thing I thought of when reading your problem was that the power switch itself is bad, or possibly the wires connecting that switch to the motherboard. These switches are designed to be pressed thousands of times before failing, but it does happen. If you open up your computer, you should be able to see five or six different colored wires coming out of the back of the power button and probably disappearing behind the hard drives. If you are able, trace these wires to where they connect to the motherboard. Each one should be plugged onto a pin. These pins are usually grouped together near the bottom of the motherboard, next to where the hard drive cables are attached. Now, before you disconnect any of these wires from the motherboard, it's a good idea to draw a little diagram of where each one goes, so you can plug them back in the correct spot. Hopefully, both your motherboard and the end of each wire will be marked with what goes where. For example, it should say "PWR+ and PWR-" for the positive and negative leads of the power on/off switch, "RST+ and RST-" for the reset switch, HDD for the hard drive activity LED, and possibly one for the CPU activity LED.
The one we are interested in is the power switch, but I would recommend unplugging all of these wires just to be sure. (Unplug your power supply and ground yourself by touching the metal chassis of your computer before doing any of this.) Now, the best thing to do would be to take a working power switch from another computer and plug it into your motherboard to test whether that is the problem. If that's not an option, you can simply jump the power pins. Find a flathead screwdriver, preferably with a long shaft and a plastic handle. Now, (after turning your power supply back on,) touch the head of the screwdriver to the pins marked PWR+ and PWR- at the same time. Your computer should turn on. Wait for it to boot up, then shut it down through the start menu. If your computer stays shut down, this would definitely indicate a problem with the power switch. Although it's unlikely, I've ran into similar problems when building computers and it's a relatively easy fix, so I would check that if the software/BIOS settings don't do the trick.
Along with updating the BIOS and motherboard firmware as suggested previously, you could also try clearing the CMOS on the motherboard. CMOS is a little tiny piece of memory next to a watch battery on the motherboard. It stores things like date/time and other BIOS settings even when there is no power attached to the motherboard. There should be three pins on the motherboard next to the battery, with a jumper covering two of them. To clear the CMOS, place that jumper so it is on the other pin (meaning if the jumper was on pins 1 and 2, place it on 2 and 3) and unplug your power supply. Replace the jumper and your CMOS should be cleared. You will need to reenter several BIOS settings the first time you turn on your computer. Check and see if the problem persists.
One last thing I would suggest is that the power supply itself is failing. Although a PSU failure more often manifests itself with random shutdowns, it's possible you could be getting a surge of some kind when the "shut-down signal" is sent to the PSU, resulting in the computer starting back up.
I hope you are able to fix your problem. Good luck!