Sandy_5 :
Slashgeek :
http://answers.microsoft.com/en-us/windows/forum/windows_8-security/i-accidentally-deleted-every-admin-account/9161efaf-dac0-4b56-b8f0-5d7aa4aadfdc
Follow these steps to enable a built-in Administrator account. These are for Windows 8 but they still apply to 10.
thank you so much for offering this solution. But it seems it is not working on windows 10, at least for me. when I pressed windows+X, and type in net user administrator/active:yes, a command prompt appears for less than one second and disappears immediately. And nothing is changed to my laptop after I restart it. And when I press windows+C, a record shows up. I am wondering if this is because the difference of windows 10 from windows 8.
Open up an elevated Command Prompt window by typing CMD in Start, right clicking on the first option, and selecting "Run as administrator." Enter
net user administrator/active:yes
If the prompt shows "completed successfully," then what you want to do is log out of your account by going to Start, right clicking on your user account name at the top of the list, and selecting "Sign out." An "Administrator" account should now be in the list of accounts to sign into.