After removing the cmos battery for 10 sec and putting it back again, the computer booted but within 3 mins of coming on, it again just went off.
now everytime I put it on, I can see the bios flashing but by the time it reaches the windows boot screen, the pc just completely shuts down.