HOW TO REMOVE VIRUS USING CMD

Print RSS
5

Author
Boss
0
🛡️ HOW TO REMOVE VIRUS USING CMD (STEP-BY-STEP GUIDE)

Learn how to detect, stop, and remove viruses on Windows using Command Prompt — no extra software required. This guide covers killing malicious processes, revealing hidden files, cleaning startup entries, repairing system files, and securing your PC the right way.

⚠️ Always proceed carefully and back up important data. For best protection, combine manual cleanup with trusted security tools.

🛑 STEP 1: Open CMD as Administrator
Press Windows + X
Click Command Prompt (Admin) or Windows Terminal (Admin)
If you can’t open CMD normally:
Boot into Safe Mode with Command Prompt

🦠 STEP 2: Kill Suspicious Running Processes
List running tasks:

Copy code
tasklist
If you see a strange process (unknown name), stop it:

Copy code
taskkill /f /im virus.exe
(example name)

🧹 STEP 3: Remove Hidden Virus Files (VERY COMMON)
Many viruses hide files using attributes.
For a drive (replace Dsmile:

Copy code
attrib -h -r -s /s /d D:\*.*
This:
Shows hidden files
Breaks shortcut/USB viruses

🧼 STEP 4: Delete Virus Files Manually
Navigate to common virus locations:

Copy code
cd C:\Users\%username%\AppData\Roaming
dir
If you see a strange folder/file:

Copy code
del /f /s /q virusfile.exe
rmdir /s /q virusfolder
Also check:

Copy code
C:\Windows\Temp
C:\Users\Public
C:\ProgramData

🔐 STEP 5: Remove Virus from Startup
List startup entries:

Copy code
wmic startup get caption,command
If you see a suspicious entry:

Copy code
wmic startup where caption="virusname" delete

🔧 STEP 6: Repair System Files (IMPORTANT)
Fix damage caused by virus:

Copy code
sfc /scannow
Then:

Copy code
DISM /Online /Cleanup-Image /RestoreHealth
Restart after completion.

🛡️ STEP 7: Enable & Run Defender Scan (CMD)
Turn on Defender:

Copy code
sc start WinDefend
Run full scan:

Copy code
"%ProgramFiles%\Windows Defender\MpCmdRun.exe" -Scan -ScanType 2

🚫 STEP 8: Remove Malicious Network Settings
Some viruses disable internet.
Reset network:

Copy code
netsh winsock reset
netsh int ip reset
Restart PC.

⚠️ IMPORTANT WARNINGS
❌ Don’t delete files if you’re not sure
❌ Don’t format unless necessary
❌ CMD removal ≠ 100% protection

✅ BEST PRACTICE (Highly Recommended)
After CMD cleaning:
Install Malwarebytes
Update Windows
Change all passwords

Follow ANIK Digital and Information Technology for more cybersecurity tips and guides 💻🔐
#CyberSecurity
#WindowsSecurity
#CMD
#VirusRemoval
#TechTips
#USA
#AUSTRALIA
Stickers / Tags / Rules