If you are stuck on the screen 'Preparing Automatic Repair', you will need to create a bootable USB to be able to enter the Windows Recovery Environment (winRE).
1-Create a USB device with an installation image.
You can create using the media creation tool, download it on this link.
https://www.microsoft.com/en-us/software-downlo...
2-Enter on BIOS/UEFI and change to boot from the USB device.
3-On installation screen click on "Repair your pc" on the left bottom
4-Click on "Troubleshoot" then the Advanced Options page will appear.
5-Then you should be able to run the Startup repair and the System restore
If the Startup repair and the System restore fails to fix the problem you can use these command to repair the boot files.
1-Create a USB device with an installation image.
You can create using the media creation tool, download it on this link.
https://www.microsoft.com/en-us/software-downlo...
2-Enter on BIOS/UEFI and change to boot from the USB device.
3-On installation screen click on "Repair your pc" on the left bottom
4-Click on "Troubleshoot" then the Advanced Options page will appear.
5-Click on "Command Prompt".
6-Run these commands.
chkdsk D: /f /r (and press Enter)
bootrec /fixmbr (and press Enter)
bootrec /fixboot (and press Enter)
bootrec /scanos (and press Enter)
bootrec /rebuildbcd (and press Enter)
sfc /scannow (and press Enter)
7- Reboot your PC
Note for Step 6:You need to change for the partition where Windows was installed by default is the D:
1-Type: D: and press enter
2-After that run the command DIR
3-This command will show the Windows folders like Users, Program files ... if these folders are not shown you need to change to another letter E:, F:, G...
4-When you find the partition you can run these commands to repair it.
If all procedures failed to repair the Windows, you will need to reinstall the Windows. As long as you do not format the C: drive in the Setup, you will not lose your data, but they are moved to another location. After the installation, you can find a folder Windows.old in the root directory of C: drive. All your files are saved there.
Note: This procedure only will keep the personal files, all software and apps need to be reinstalled.
1-Create a USB device with an installation image.
You can create using the media creation tool, download it on this link.
https://www.microsoft.com/en-us/software-downlo...
2-Enter on BIOS/UEFI and change to boot from the USB device.
3-Click "Install Now".
4- Type your product key or skip it. Usually, your computer will be activated automatically when it's connected to a network if your install the same version of Windows 10 as before.
5- Select the installation type "Custom".
6- Select the C: drive and click Next to proceed. Then, wait patiently until the installation is complete 100%.
This procedure only will keep the personal files, all software and apps need to be reinstalled.