If it starts normally and runs for a bit then acts strangely , then shuts down it may be a heat problem. Check the fan in the power supply. If the mother board has a temp display check the cpu temp. CPU's have a layer of thermal compound or tape between the heatsink and the CPU, It can degrade over time.