Hi I had the same exact experience today.
Although I purchased this computer directly from Dell, you were using HP but the situation may be the same. Normally I purchase my computers from the Microsoft Store which comes with MS Signature version of the OS, which means it comes with no "trial ware" software, and installing the 8.1 Pro Pack is normally no issue.
But not on this computer which came from Dell.
To recap: After entering the Windows 8.1 Pro Pack Product key, the installation fails returning an error that simply states "Something went wrong".
That is pretty vague, and even the event viewer is no help here.
This computer came preloaded with McAfee Anti Virus trial on it. So I uninstalled it and presto. The Pro Pack loaded. I can now join my domain.
But then the next issue was trying to get Windows Defender to load. Wile first ensuring all remnants of Mcafee was uninstalled, clicking Windows Defender in the Control Panel brought up an error indicating that the software was turned off and may be damaged. Nice. Thank You Mcafee.
Researched and found an article here: Here was the solution
Here the tech was helping a guy so scroll down to the part that says "ANSWER" and you will find the clues: I also had to download the PsTools to get the reg keys to allow a change, but follow the instructions and youll be ok.
Step 5: Change the key
Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender and change value of 'DisableAntiSpyware' and 'DisableAntiVirus' to 0.
Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Real-Time Protection and change value of 'DisableRealtimeMonitoring' to 0.
Mcafee / Dell had completely removed the entries DisableAntiVirus and DisableRealtimeMonitoring. So I had to recreate them. Just go to the sections listed, right click and create the 32 bit entry, paste the name exactly as indicated above without quotes, and ensure the entry flags are correct.
Restart your machine and you should be good to go.
Conclusion: THIS is why I buy my computers from the MS Store. This kind of experience degradation due to preloaded 3rd party software is what ruins windows. I wish Vendors would not be allowed to modify the OS for subsidized 3rd party software.
Hope all goes good for you too. :)