To restore a PC to its factory setting, access the Update & Security section from the Settings menu, and use the Reset This PC function to initiate the resetting process. This method only works for Windows 10. If you're using older versions of the Windows operating system, access the Advanced Recovery Methods screen, and initiate the reinstallation process. Alternatively, use the recovery tool located on the disc that the computer manufacturer provided.
In Windows 10, press the Windows and A keys at the same time, click on All Settings, and select the Update & Security option. Open the Recovery tab, click on the Get Started button located in the Reset This PC section, and select whether to keep or remove your personal files. If you choose to remove your personal files, select the Remove File and Clean the Drive option to format the drive instead of just deleting the files. Click on the Reset button when it appears, and restore your backup files if necessary.
In Windows 8, select the Refresh option from the Update and Recovery screen. Use an existing Windows recovery partition, or create one by using the Windows 8 installation disc or USB drive. In Windows 7, select the Recovery option from the Control Panel, click on the Advanced Recovery Methods link, and select the Reinstall Windows option. Make sure to back up system and personal files before initiating the reinstallation process because it deletes all content. Once the reinstallation completes, install the necessary drivers and restore your files.