Windows – How to get rights of admin after I disabled all admin accounts in my computer

I accidentally disabled my admin account.

After I login to another account I found I can not get admin rights, because all admin accounts on my computer are disabled.

I clicked on ‘run as administrator’ but only see a smart card choice (all the admin accounts are disabled so no choice provided)

enter image description here

I don’t want to re-install my OS, help!


Details:

I have account A on my computer.  

I got a new computer so I want to give the old one to my mother.  

Creating a new user account B for her and disable account A.  

Logout and restart.  

Successfully login B, now I found I could not get admin rights because no account choice is provided.


More informations about my machine:

OS is Windows 10 and my admin account is a Microsoft Account.

I have an arch-linux installed on my computer and dual-boot it using GRUB, so maybe I can not use safe mode.

Solution:

The following tutorial will allow you to enable the default Administrator.  There are other ways to change the permission of an existing user and/or change the password of an existing Administrator.  Those methods are not covered by this tutorial and are considered out of scope for the purpose of this question.  

This tutorial assumes you know how to create an installation disk, boot to that disk, and enter WinRE which is contained on that disk.  This tutorial won’t cover how to do that.  This tutorial does not require access to an Administrator account, the entire purpose of this tutorial is to enable the built-in Administrator account which by default is disabled.

Enable or Disable Built-in Administrator in Command Prompt at Boot

 

     

  1. Download the Windows 10 .ISO

  2.  

  3. Within WinRE at a command prompt, type regedit, and press Enter.

  4.  

  5. In the left pane of Registry Editor, click/tap on the HKEY_LOCAL_MACHINE key.

  6.  

   

enter image description here

   

     

  1. Click/tap on File (menu bar), and on Load Hive.
  2.  

   

enter image description here

   

     

  1. Open the drive that you have Windows 10 installed on, and browse to the location below.
  2.  

   

   

X:WindowsSystem32config

 

   

     

  1. Select the SAM file, and click/tap on Open.
  2.  

   

enter image description here

   

     

  1. In the Load Hive dialog, type REM_SAM, and click/tap on OK.below)
  2.  

   

enter image description here

   

     

  1. In the left pane of Registry Editor, navigate to and open the key below.
  2.  

   

   

HKEY_LOCAL_MACHINEREM_SAMSAMDomainsAccountsUsers00001F4

 

   

enter image description here

   

     

  1. In the right pane of the 000001F4 key, double click/tap on the F binary value to modify it.

  2.  

  3. In line 0038, change 11 to 10, click/tap on OK

  4.  

   

enter image description here

   

     

  1. Close Registry Editor and the command prompt.

  2.  

  3. Click/tap on Continue to startup back in Windows 10.

  4.  

Source

Related Question: Where can I get a clean ISO of the Windows 10 Anniversary update?