Repair broken Internet Explorer and Edge

After moving some profile folders, Internet Explorer became slow and refused to load webpages.
The Edge browser simply opened and closed quickly without showing the user interface.
Copying the profile files and folders from a Windows 10 laptop, running the same synched profile, didnt help either.
Even xcopy with acl and flags copied didn’t help.

While i was getting ready to reinstall my operating system, i gave a few dism commands a try:

Dism /Online /Cleanup-Image /CheckHealth
Dism /Online /Cleanup-Image /ScanHealth
Dism /Online /Cleanup-Image /RestoreHealth

Write these into an admin command prompt (in Windows 10, press the Windows Key and the X key and select the admin command prompt).
Sometimes you might have to restart your pc… i didn’t have to restart mine to fix it.