restore factory setting

mbreslin1954

Distinguished
If your PC is relatively new, there should be options on the BIOS screen, the screen that displays right after you turn on the computer and before Windows begins loading. The message is typically at the bottom right side of your screen, and may say something like "F2 BIOS F11 boot options F12 Restore". You want to hit the key that says something about restoring your system or resetting the system. Once you hit that key the system will step you through the process.

Be quick, you won't have much time to hit the key. In fact you may have to start your computer a couple of times before you can read which key to hit.
 

Azn Cracker

Distinguished
Your PC might have came with a restore disk (unlikely). You can also try using windows system restore if you are trying to fix some problems. Using the method mbreslin mentioned will delete all your programs. Some files such as documents and pictures may be saved though.
 

mbreslin1954

Distinguished
Well, the OP asked for a way to "restore factory setting" of his HP. That means the way it came from the factory, which of course does not include any programs or files he may have added later. I guess I assumed he was aware that he would lose any files and programs he added after he got it, unless he backed up his files first.