It could be due to a problem with your HP keyboard software, so try removing and reinstalling that as the first option.
It could also be due to conflicts with other programs during startup.
Windows is prone to startup problems as it tries to launch everything that is set to launch, when you first switch on, at the same time.
I recommend using Startup Delayer which gives you control over the order that programs launch and also over the order they start. By introducing a one or two second delay between programs starting, and over, say 30 seconds, what was taking several minutes to happen is reduced to 30 seconds.
Get Startup Delayer (free) from here:
http://www.r2.com.au/software.php?page=2&show=startdelay