I hate to think of what kind of results you are going to get if you try to replace the battery with the computer running. Why are you needing to replace the battery ?
Before you do this you had better have two things 1) a complete written log of the BIOS parameter settings as they were before you attempted this 2) An image/backup of the BIOS, so you can restore, in case the CMOS is lost !!!
Not only should the computer be not running when you change battery, but you need to flip off the power supply switch and then unplug the power cord from the power supply.