PSU would work with HP's prebuilt PC since power connections do match. But what doesn't go well is the build quality of said PSU. EVGA 100-N1-0400-L1 is the worst PSU offered by EVGA and i don't suggest going with it,
review:
http://www.jonnyguru.com/modules.php?name=NDReviews&file=print&reid=436
For much better quality unit, use any Seasonic PSU, e.g S12II-430 or G-450,
pcpp: https://pcpartpicker.com/products/compare/4Vzv6h,xVkD4D/