Have you kept it up to date with operating system updates, and anti-virus ?
Something is running in the background which is preventing the shut-down process to happen.
As has been suggested, you can use the task manager to see which programmes are running. Or it could be a virus that is running. I would do a virus scan if you haven't already tried that. Assuming it's Windows; it has its own built-in anti-virus, called Windows Defender, I think. This is kept updated by Microsoft.
I would be very wary about removing the small system memory battery as well as the main battery. Taking out the small system memory battery will cause the computer to forget the time and date amongst other things, and you could get yourself into a world of pain, with parts of the operating system not working, unless you know what you're doing.
I would look at the software first.