Hi Mike1949,
I understand that you are getting an error when trying to install your printer software on your Windows 8.1 computer. I recommend that Restarting the Print Spooler. You want to set the Print Spooler startup type to Automatic. Then in the Command Prompt window, type sfc / scannow in the command line and then press enter. Then download and save the HP Photosmart and Officejet Full Feature Software and Drivers to your computer and then run the install.
Let me know if this helped or if you need further assistance.
Thank you,