How to restore registry to default in Windows 10?

I bet you can open the Registry Editor by opening a command prompt (as administrator) and running:

regedit

.exe in the classes root are for Explorer to know how to work with .exe files.

Command Prompt should therefore be unaffected.


Here is what I did:

  1. Enable Administrator account, base on this article:

    1. Activate the Start menu on the system.
    2. Type lusrmgr.msc and select the result that is returned to you.
    3. Left-click on "Users" in the left sidebar. You get a list of all accounts of the local system on the right.
    4. Right-click on Administrator and select Properties from the context menu.
    5. Remove the checkmark from "Account is disabled" on the Administrator Properties window and click apply, then ok.
  2. Open the Administrator account from Start -> Change user

  3. Open Git Bash here from some folder with right click, then open cmd from BASH and type regedit.
  4. Back values from HKEY_CLASSES_ROOT -> exefile and exefile -> shell -> open -> command to default (which I changed early).

P.S: I found a good way to change the values of registry if you are already closed Registry editor, this is example for exefile:

  1. Double-click a text (.txt) file in your system. (This opens Notepad.)
  2. From the File menu, click New.
  3. Copy the following contents and paste into Notepad.

    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\.exe] @="exefile"
    
  4. Save the file with .REG extension.

  5. Double-click the file to run it.
  6. This fixes the .exe file type ProgID.