How to Login after Disabling All Users in Windows?

Have you ever been in a situation when you accidentally or curiously disabled all of the local user accounts and got locked out of your own computer? Now, you can turn ON your computer and stuck on login screen thinking how to login into Windows after disabling all users. But all you see is a message that says, “Your account has been disabled. Please see your system administrator.

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 and you will have to reinstall all your programs. This can be huge and un-affordable loss depending upon the data you stored on your computer.

SEE ALSO: Reduce Data Usage in Windows 10 in 3 Quick Steps.

Luckily there exist a method to get into your PC even after disabling all user accounts. But 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 Windows PC after disabling all users. Best part of this method is that you don’t lose your precious files/documents. Check out this video before proceeding for detailed steps:


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

How to Regain Access or Login into Windows after Disabling All User Accounts?

Now, after you have checked process in video, let’s check the steps in details. We will need Windows bootable USB or CD/DVD disk for regaining access to our locked out computer.

Step 1: Insert Bootable USB or CD/DVD and Boot from it

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:

How to Login after Disabling all Users
How to Login after Disabling all Users

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.

Press Any Key To Boot From Cd Or Dvd
Press any key to Boot from CD or DVD

Step 2: Open Command Prompt and Go to Windows Drive

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

Windows 10 Setup Select Language Keyboard And Click Next
Windows 10 Setup

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 key combination on your keyboard, command prompt will open.

Command Prompt will Open in X Drive
Command Prompt will Open in X Drive

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. After finding Windows drive, we will try to re-enable existing users so that we can login into Windows (after disabling all users).

Find Windows Drive using CMD
Find Windows Drive using CMD

Step 3: Make Necessary Changes and Exit Windows Setup

Finally you have found Windows drive. It’s drive D in our case. Now let’s make some changes in Windows > System32 directory 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

Make copy of CMD.EXE as SETHC.EXE
Make copy of CMD.EXE as SETHC.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

Make a copy of CMD.EXE as OSK.EXE in Windows 10
Make a copy of CMD.EXE as OSK.EXE in Windows 10

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

Exit Windows 10 Installation Setup
Exit Windows 10 Installation Setup

SEE ALSO: A to Z list of all Windows CMD commands

Step 4: Launch Command Prompt on Login Screen

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. We will use CMD to enable user accounts (after disabling them).

Launch On-Screen Keyboard from Ease of Access to Login after disabling all user accounts
Launch On-Screen Keyboard from Ease of Access

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.

Command Prompt will Open on Login Screen
Command Prompt will Open on Login Screen

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

SEE ALSO:
1. How to Disable Login Screen Background Image in Windows 10?
2. How to Login with Microsoft Account in Windows 10?


Step 5: Enable User Accounts (after Disabling) using CMD

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.

Enable Administrator account - Login after disabling all users in Windows
Enable 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 to create new user after disabling all users in Windows, 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: Restart your Computer and Login After Disabling All Users

Close the command prompt and restart your computer.

Restarting Windows
Restarting Windows

After rebooting Windows, you will see that all your disabled 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.

Login with any Account - Login after disabling all user accounts
Login with any Account

Step 7: Reverting the Changes Made to Windows

It’s time to revert 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.

Search For Cmd On Start And Click Run As Administrator To Open Command Prompt With Admin Rights
Search for cmd on Start and click 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
Revert the Changes and Login after disabling all Users in Windows
Revert the Changes made to system

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.

SEE ALSO: How to Open Command Prompt in Specific Folder/Location?


Login into Windows after Disabling All User Accounts

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. You may also subscribe to our newsletter and get such cool tricks directly into your inbox.

NOTE: 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