Hi KarH and welcome to the HP Forum,
I understand that you are having an issue installing the software for Windows 8.1. I will try my best to help you resolve this. Here is the a download for the HP Photosmart Full Feature Software and Drivers. I suggest that you download and save it to your computer and then run it. Since you've had a previous version on I recommend using the HP Officejet Pro Software and Driver Removal Utility to make sure that everything was removed before installing again.
I hope this helps, let me know how it goes.
Thank you,