But I'd have to guess this is a stock machine. Which Windows and more.

But let's get you started with prior discussions on shutdown failures.

http://h10025.www1.hp.com/ewfrf/wc/product?cc=us&lc=en&dlc=en&product=1140029 is the home page to your machine.

Did you try the "Solve a problem" button?

Now that you know which OS matters as well as what's been added since it worked, you can tell more.
Bob