How Do I Login After I Disabled All User Accounts In My Computer?

Have you ever been in a situation when you accidentally or curiously disabled all of the local user accounts in your computer and got locked out of your own computer? Well, this is pretty weird situation but some curious minds keep playing with their computers and sometimes encounter such problems. Worst and funny thing about this is that you can turn ON your computer but on login screen, you see a message that “Your account has been disabled. Please see your system administrator.” It is like you locked yourself out of your own house leaving the keys inside – standing at the door but can’t enter in.

What can one do in such situation? Well, there is nothing much a user can do in such situation but reinstall the Windows. Reinstalling the Windows comes at the cost of your valuable data. All the documents and files you stored in C drive (including Documents, Downloads, Desktop etc.) will get wiped. This can be huge and un-affordable loss depending upon the data you stored on your computer.

Luckily there exist a method to get into your PC even after disabling all user accounts. Yes, it’s like digging a tunnel and opening the door from inside. Digging a tunnel means you will have to do some advanced level troubleshooting to get yourself into your locked out PC. This tutorial explains the method to login into PC on which all user accounts (including Administrator) have been disabled. Best part of this method is that you don’t lose your precious files/documents. Check out this video before proceeding for detailed steps:

Now, after you have checked process in video, let’s check the steps in details.

What Do We Need?

How To Login After Disabling All User Accounts?

Step 1

In this tutorial we are using Windows 10 PC which have a standard user account HELLPC, builtin Administrator (disabled) and builtin Guest (disabled) accounts. User account HELLPC has been disabled manually. Now, all the user accounts on our test PC are disabled. When we try to login, we see following screen:

Insert bootable Windows USB or CD/DVD disc into your PC and reboot the PC. Make sure you have set your PC to boot from USB or CD/DVD. On startup, press any key to start booting from bootable Windows USB or CD/DVD.

Step 2

After loading Windows installation files, Windows setup will start. You will see following screen if you are using Windows 10.

Stop right there. Don’t press Next. We just needed this screen. Here we will open command prompt and make some necessary changes to already installed Windows on which all user accounts have been disabled. Press Shift + F10 keys on your keyboard, command prompt will open.

Command prompt has loaded from a temporary partition ‘X‘. We need to find the partition (disk drive) on which Windows is already installed. You can change drive in command prompt and check the content of selected drive using dir command.

Step 3

Finally you have found Windows drive. It’s drive D in our case. Now let’s make some changes in Windows > System32 folder and we are good to go. We are going to make a copy of cmd.exe file and rename it to some other utility which can be launched on login screen without logging into Windows. Here, you must note one thing – If you are using Windows 7 or 8/8.1, you can work by renaming cmd.exe to sethc.exe (Sticky keys utility). But if you are using Windows 10, then you have to use some other utility. In this tutorial we are taking example of On-screen Keyboard (osk.exe).

Here are the commands for Windows 7 or 8/8.1:

cd Windows\System32
ren sethc.exe sethc-back.exe
copy cmd.exe sethc.exe

Here we have created a backup of sethc.exe before making copy of cmd.exe

If you are using Windows 10, use following commands:

cd Windows\System32
ren osk.exe osk.exe.back
copy cmd.exe osk.exe

Here we have created a backup of osk.exe before making copy of cmd.exe

See also: A to Z list of all Windows CMD commands

You can now close command prompt and cancel Windows installation setup.

Step 4

Remove bootable USB or CD/DVD from your PC and let Windows boot normally. On the login screen, you will still see your account as disabled. Click OK. If you are using Windows 7 or 8/8.1, press Shift key 5 times to open command prompt. But if you are using Windows 10, click on Ease-of-Access button on the bottom-right corner of the screen, and select On-Screen Keyboard from the menu.

This will bring up Command prompt instead of On-Screen Keyboard. If command prompt doesn’t appear after clicking on On-Screen Keyboard once, click again. After Command prompt has launched, you will notice that it has started in C:\Windows\System32 folder and with Administrative privileges.

Now, we will use this command prompt to enable your disabled user accounts. You can enable each and every account on your system. Even you can create new local account on your system with administrative privileges.

Step 5

You can check current users on your system by using net user command. If you want to enable Administrator account on your system, type following commands:

net user Administrator /active:yes
net user Administrator [email protected]

Don’t forget to replace ‘[email protected] with the password that you want to set for Administrator account.

Similarly, you can enable other accounts using net user command:

net user HELLPC /active:yes
net user HELLPC [email protected]

Don’t forget to replace ‘[email protected] with the password that you want to set for selected account.

If you want create new user in your system, use following command:

net user /add username password

Don’t forget to replace username & password with the name and password of the new user. To provide newly created user with administrative privileges, use following command:

net localgroup administrators username /add

Replace username with the username of newly created user.

See also: A to Z list of all Windows CMD commands

Step 6

Close the command prompt and restart your computer.

After rebooting Windows, you will see that all your disable user accounts have been enabled and are visible on login screen. Select the user you want to login with and enter the password that we have set in previous step. That’s it, you can now successfully login into your computer on which you were locked out due to disabling of all user accounts.

Reverting the changes

Step 7

It’s time to reverse the changes we made to the system. For this we need to run command prompt with administrative privileges. Search for cmd in Start menu and from search results, right-click on Command Prompt and select Run as administrator.

Now, go to C:\Windows\System32 directory and change back names of On-Screen Keyboard (osk.exe) and delete extra copy of cmd.exe that we have created. First, navigate to System32 directory using following command:

cd C:\Windows\System32

Delete osk.exe file as it is copy of cmd.exe

del osk.exe

Now rename or copy the backup file of osk.exe.back to original osk.exe

copy osk.exe.back osk.exe

See also: A to Z list of all Windows CMD commands

You may want to keep these changes for future use. However this will break the functionality of On-Screen Keyboard on Windows 10 and Sticky Keys on Windows 7 or 8/8.1.

You have successfully logged in into your system on which you had accidentally disabled all the user accounts. You need to pay close attention while making changes to Windows files in System32 folder or you may break your Windows permanently. Hope you liked this tutorial. Feel free to comment if you face any problems.

This tutorial works only if the Hard disk or Windows drive is not encrypted. This method fails on encrypted hard disk drives.

Editorial Staff

Hi there, we are the editorial staff at HELLPC Tutorials. We are a team of funny and technical people. Feel free to get in touch with us via Contact-Us page.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to top button