How to create a new user account using command prompt?

How to create a new user account using Command Prompt?

This tutorial describes how to create a new user account in the Windows operating system using Command Prompt. The guide is helpful when dealing with ransomware or fake antivirus programs that block Safe Mode and Safe Mode with Networking. Cyber criminals responsible for developing malicious programs develop new methods to protect their bogus software from elimination - this includes blocking users' access to Safe Mode.

When dealing with security threats such as these, it is advisable to log out of the infected user account and run a security scan from an unaffected account. This, however, is only possible if your operating system has multiple active user accounts. If you computer is infected with a ransomware infection, and you cannot create a new user account using Control Panel, then use the following instructions:

1. Start your computer in Safe Mode with Command Prompt. During your computer start process, press the F8 key on your keyboard multiple times until the Windows Advanced Options menu appears, then select Safe mode with Command Prompt from the list and press ENTER.

Boot your computer in Safe Mode with Command Prompt

2. When Command Prompt Mode loads, enter the following line: net user removevirus /add and press ENTER.

net user removevirus /add

3. Next, enter this line: net localgroup administrators removevirus /add and press ENTER.

creating new user using command prompt

4. Finally, enter this line: shutdown -r and press ENTER.

adding a new user in command prompt

5. Wait for your computer to restart, then boot your PC in Normal Mode and login to the newly-created user account ('removevirus'). This account will be unaffected by security infections and you will be able to download and install security software.

new user account win 7 and win xp

6. Use recommended malware removal software for detection and removal any security-related issues from your computer.

Note that some fake antivirus programs and ransomware infections are capable of infecting other user accounts on a system, so this method may not always work.


Thank you! The directions and pictures were great to have, it worked perfectly. Now to figure out what to do about getting it fixed since apparently my profile is corrupt!? Thanks again!

Ashr Ashraf

Thank you Life Saver !


Worked like a charm!!! TGAWD

Daytwan Baptiste

It said access denied. What do I do?


Thank you for this easy but time saving post


My parents computer had a total meltdown, and this worked like a charm!! Thank you!!!!!!!!!!!!!!!!


Thank a lot. You save me! Love you guys!


net localgroup user UsernameHere PasswordHere /add

AZ Weekly

Did you add: net localgroup user /add


Its worked!! But do we keep this new account and transfer everything over or is it temporary do you know? Thanks

About the author:

Tomas Meskauskas

I am passionate about computer security and technology. I have an experience of 10 years working in various companies related to computer technical issue solving and Internet security. I have been working as an editor for since 2010. Follow me on Twitter to stay informed about the latest tech news or online security threats. Contact Tomas Meskauskas.

Our guides are free. However, if you want to support us you can send us a donation.