What to do if a Windows PC is seriously infected with a virus/malware

Patrick Reany

6 May 2025

Disclaimer: This page offers advice on what you can do before and after
your PC is infected. If you follow this advice, that's between you and Copilot.
I offer this page on status: "General Educational Information Only. Follow
advice with caution. Compare recommendations with alternate sources."

Patrick:
If a Windows PC is seriously infected with a virus/malware, is it sufficient security treatment to just re-install the OS?

Copilot:
Reinstalling the operating system (OS) can be an effective way to remove malware, but it's not always sufficient to fully secure your system. Malware can sometimes embed itself in areas outside the main OS partition, such as recovery partitions or external drives. Here's what you should consider doing for a thorough security treatment:

Complete System Format: Instead of just reinstalling the OS, perform a full format of the drive, erasing all partitions, before reinstalling Windows.

Check Firmware & BIOS: Some advanced malware can infect system firmware. Updating your BIOS or UEFI firmware might be necessary.

Scan External Drives: If you've connected USB drives or external storage to the infected system, scan them with a trusted antivirus program.

Secure Your Network: If the malware was aggressive, it might have compromised network settings. Resetting routers and changing passwords can be a wise precaution.

Use Updated Security Software: After reinstalling Windows, install and update a strong antivirus/antimalware tool and enable built-in security features like Windows Defender.

Monitor for Signs of Reinfection: Malware can spread through email attachments or software downloads. Be cautious when restoring backups or reinstalling programs.

A full system format combined with careful security measures ensures a clean slate and minimizes the chances of reinfection.

Patrick:
Okay, 1) For a seriously infected system with just one drive, do a complete reformat of the drive, and then re-installation of the OS. But if I re-install over a reformatted drive, will I have to pay for a new Windows 11 license, or can I retreive my (legitimate) OS license number prior to reformatting?

Copilot:
Good thinking---you don't want to lose your legitimate Windows 11 license when reinstalling! Fortunately, if your Windows activation is tied to a digital license, you won't need to enter a product key again after reinstalling. Windows will recognize your hardware and activate automatically when you reconnect to the internet.

To check your activation type before reformatting:

Open Settings -> Navigate to System > Activation.

If it says "Windows is activated with a digital license", your license is linked to your Microsoft account.

If it asks for a product key, make sure you save it before reformatting.

To retrieve your product key (if needed):

Via Command Prompt:

Open Command Prompt as Administrator.

Type: wmic path SoftwareLicensingService get OA3xOriginalProductKey

Hit Enter---this should display your Windows 11 product key.

Via PowerShell:

Open PowerShell as Administrator.

Run: Get-WmiObject -query "select * from SoftwareLicensingService" | Select-Object OA3xOriginalProductKey

This should reveal your key if it's stored in your system.

If you're reinstalling on the same device and your Windows license is digital, you're in the clear! Once reinstalled, log into your Microsoft account, and Windows should activate automatically. If it doesn't, a quick call to Microsoft Support should sort things out.

Patrick:
What do you think about a periodic pre-emptive re-installation of the OS just in case some hidden malware infection has occurred?

Copilot:
That's a bold approach! Periodically reinstalling your OS could eliminate hidden malware or lingering system vulnerabilities---but it’s not the most practical long-term solution. Here's why:

Pros of Preemptive Reinstallation Guaranteed Clean Slate: Each reinstall wipes out potential hidden threats.

Performance Boost: Over time, clutter accumulates---reinstalling resets everything.

Malware Removal: If an infection goes undetected by security software, a fresh install erases it.

Cons of Periodic Reinstallation Time-Consuming: A full OS reinstall requires setting up apps, restoring files, and reconfiguring settings.

Not Foolproof: Some malware can persist outside the OS (like in firmware or external drives).

Potential Data Loss: If not backed up properly, reinstalling can lead to unintentional data loss.

Safer Alternatives Instead of frequent reinstalls, consider these proactive security measures:

Regular Malware Scans: Use reputable antivirus and antimalware tools.

Enable System Protection: Utilize Windows Defender and Safe Mode scans.

Monitor Unusual Behavior: Slow performance, unexpected pop-ups, or unexplained network activity can signal infection.

Utilize Virtual Machines: If you test software or browse risky sites, a virtual machine isolates potential threats.

Keep Backups: Maintain a clean system image backup so you can restore a known-safe state instead of reinstalling from scratch.

If you're worried about stealth malware, occasional deep security scans are a less disruptive alternative than wiping everything. Do you think you might lean toward one of these preventive approaches instead?

Patrick:
In Windows 11, Defender is on by default, right? (I also run a pay version of antivirus as well.) Also, a re-install ought to be a good way to clean up the Registry, right? BTW, I don't have a lot of programs to re-install, and I'd likely be re-installing a newer version of them, anyway. (Such as Inkscape, TeXWorks-MikTeX, etc. MS Office. PDF Reader.)

Copilot:
Yes, Windows Defender (now called Microsoft Defender Antivirus) is enabled by default in Windows 11---unless another antivirus program is installed, in which case it may switch to passive mode. Since you run a paid antivirus, it's likely that Microsoft Defender isn't actively scanning but is still present as an additional layer of security.

Regarding the Windows Registry, a full OS reinstall does clean out old, unnecessary registry entries---including those left behind by uninstalled programs, system settings, and remnants of outdated configurations. Over time, registry clutter can accumulate, potentially slowing down system performance, though it usually isn't a major issue unless a lot of outdated software has been installed and removed.

Since you don't have many programs to reinstall, and you'd be updating them anyway, a fresh installation could be a great way to start clean without unnecessary leftovers from old software versions. Plus, with lightweight tools like Inkscape, TeXWorks-MikTeX, MS Office, and a PDF reader, reinstalling shouldn't be too much of a hassle.

If you go this route, consider making a list of settings and configurations you want to retain so that transitioning back is smoother. Would you like tips on backing up specific preferences before reinstalling?

Patrick:
With what tools should I check Firmware & BIOS? And doesn't TPM 2.0 help to prevent problems?

Copilot:
Great questions! Checking firmware and BIOS is an essential step in ensuring security and stability. Here’s how you can do it:

Tools for Checking Firmware & BIOS:
Windows System Information:

Press Win + R, type msinfo32, and hit Enter.

Look for the BIOS Version/Date to see if you have the latest update.

BIOS/UEFI Setup Menu:

Restart your PC and press the correct key (F2, F12, Del, or Esc, depending on the manufacturer) to enter BIOS/UEFI.

Check for firmware version info and security settings.

Manufacturer's Update Tools:

Most PC brands have dedicated tools for BIOS and firmware updates:

Dell -> Dell SupportAssist

HP -> HP Support Assistant

Lenovo -> Lenovo Vantage

ASUS -> ASUS EZ Flash Utility

MSI -> MSI Live Update

Third-Party Firmware Checkers:

Some tools like HWiNFO and CPU-Z display BIOS version details for easy comparison with manufacturer updates.

Patrick:
Does TPM 2.0 Help Prevent Malware Issues?

Copilot:
Yes! TPM (Trusted Platform Module) 2.0 enhances security by:
<> Protecting Encryption Keys: Securely stores sensitive encryption data, making malware attacks on system authentication much harder.
<> Preventing Unauthorized Firmware Modifications: Adds a cryptographic layer that prevents unauthorized BIOS/UEFI alterations.
<> Enhancing Secure Boot: Works with Secure Boot to prevent unsigned or malicious OS-level tampering.
<> Improving BitLocker Drive Encryption: Ensures full-disk encryption integrity.

However, TPM alone isn't a foolproof shield---you still need updated BIOS, strong antivirus protection, and safe browsing habits.

Patrick:
I'm always afraid to perform a BIOS update. What if it goes wrong?

Copilot:
That's a totally reasonable concern---BIOS updates involve low-level system software, and if something goes wrong, it can be tricky to recover. However, the risk is much lower if handled carefully. Here's what could go wrong and how to minimize the risks:

Potential Issues in a BIOS Update

Power Loss During Update: If the system shuts down mid-update, your BIOS firmware could become corrupted, preventing your PC from booting properly.
XX Wrong BIOS Version: Installing an incompatible or incorrect version could result in system instability or failure.

Update Interruption: Force-quitting the update process (e.g., pressing the power button) can leave the system in an unusable state.

How to Avoid BIOS Update Problems
<> Check Your Current BIOS Version: Run msinfo32 (Windows System Information) to see your existing BIOS details.
<> Only Install Manufacturer-Approved Updates: Download firmware updates directly from your PC manufacturer's official website---never third-party sites.
<> Use a Reliable Power Source: If using a laptop, ensure it's plugged into AC power. If using a desktop, avoid updating during storms or power fluctuations.
<> Follow Update Instructions Carefully: Some systems require rebooting into a dedicated BIOS update tool---your manufacturer's guide will provide exact steps.
<> Ensure Your System is Stable Before Updating: If your PC is already behaving erratically, consider resolving existing issues first before updating BIOS.

Recovery Options If Something Goes Wrong
Most modern PCs have failsafe BIOS recovery methods:
<> BIOS Flashback: Some motherboards allow reflashing the BIOS using a USB drive, even if the system won't boot.
<> CMOS Reset: Clearing the CMOS battery can sometimes restore default settings.
<> Manufacturer Support: Major brands often provide recovery utilities in case an update fails.

If you don't absolutely need a BIOS update---such as for security patches, bug fixes, or hardware compatibility---it's often best to leave it alone. But if you do decide to proceed, being cautious makes all the difference.

Does your system require a BIOS update for a specific reason, like hardware compatibility or security improvements?

Patrick:
Scan External Drives: I have a lot of data on USB drives. Is an antivirus scan and repair on them sufficient cleaning?

Copilot:
Running an antivirus scan and repair on your USB drives is a good first step, but depending on the situation, it might not be enough to fully ensure security. Here's how to thoroughly clean your external drives:

1. Antivirus Scan & Repair (Essential)
<> Use your paid antivirus software to perform a full scan of each drive.
<> If malware is detected, follow the recommended action (quarantine, delete, or repair).
<> Run a second scan using Microsoft Defender or a different security tool for added verification.

2. Check for Hidden or Autorun Malware
XX Some malware hides as invisible files or uses autorun scripts.
<> Open Command Prompt (cmd), then type:

sh attrib -s -h -r /s /d X:\*.*
(Replace X: with your USB drive letter.)
<> This reveals hidden files---if you see suspicious .exe or .bat files, delete them manually.

3. Format the Drive for a Clean Slate (If Needed)
<> If infections persist, back up clean files, then format the USB drive using:

Quick Format (for basic cleanup).

Full Format (for deeper wipe).

4. Enable USB Device Security
<> Disable Autorun to prevent automatic execution of malware.
<> Use BitLocker (Windows Pro edition) to encrypt important USB data.
<> Keep firmware and drivers updated for external storage devices.

If your USB drives hold important files, I'd recommend scanning regularly, keeping backups, and avoiding plugging them into untrusted devices. Do any of your drives show signs of infection, or is this a precautionary check?

Patrick:
Reflashing the BIOS using a USB drive: I've never heard of that. I'm confused. I thought that the system BIOS had to be running prior to any accessing of a storage drive where an OS would be found to boot it. This sounds like a bootstrapping paradox.

Copilot:
I see where you're coming from---it does sound paradoxical! You're absolutely right that the BIOS typically needs to be functional for the system to access any storage device and initiate the boot sequence. However, reflashing the BIOS via USB works because motherboards often have built-in recovery mechanisms designed to bypass normal boot procedures when the BIOS is corrupted.

How BIOS Reflashing Works from a USB Drive
When a BIOS update fails or gets corrupted, many modern motherboards have a failsafe mechanism that allows you to restore a working BIOS even if the system won't boot normally. Here's how it works:

Dedicated BIOS Flashback Feature (if supported)

Some motherboards have a BIOS Flashback button that allows flashing the BIOS directly from a USB drive without needing a CPU, RAM, or display.

The motherboard reads the BIOS firmware file from the USB and installs it automatically.

Bootable BIOS Recovery Mode

Some BIOS setups include a recovery function that lets the system search for a valid BIOS file on a USB drive at startup.

When enabled, the motherboard looks for a specific BIOS file name, loads it from the USB, and performs a reflash.

Dual BIOS Feature (on some boards)

High-end motherboards often include two BIOS chips---one serves as a backup.

If the primary BIOS fails, the system can boot from the secondary BIOS, allowing you to restore the corrupted one.

Why It's Not a Bootstrapping Paradox
Even though a corrupted BIOS prevents normal booting, these recovery methods work at a firmware level---before typical boot processes even begin. They're pre-programmed into the motherboard's hardware, allowing limited functionality specifically for BIOS restoration.

Would you like to check if your motherboard supports BIOS Flashback or another recovery method? I can guide you through it!

Patrick:
How do I check and, if necessary, update the firmware on my home router?

Copilot:
Updating your router's firmware is a smart move for better security, performance, and bug fixes. Here's how to check and update it safely:

Step 1: Check Your Current Firmware Version
Log into Your Router's Admin Panel

Open a web browser and enter your router's IP address (usually 192.168.1.1 or 192.168.0.1).

Log in using your router's admin credentials (often found on a sticker or manual).

Locate the Firmware Version section (usually under System Settings or Advanced Settings).

Compare with the Latest Version

Visit your router manufacturer's official website.

Look for firmware updates under Support > Downloads for your router model.

Step 2: Update Your Router Firmware
Automatic Update (If Supported)

Some modern routers have a "Check for Updates" button in the admin panel---use this for easy updates.

Manual Update (If Necessary)

Download the latest firmware file from the manufacturer's site.

In your router's admin panel, find Firmware Update and select Upload Firmware File.

Choose the downloaded file, confirm, and start the update process.

Wait for the update to complete---don't power off your router during this.

Factory Reset (Optional, After Update)

If your router behaves oddly post-update, a factory reset might be needed.

Locate the reset button (usually a small hole) and hold it for 10+ seconds.

Extra Security Steps
<> Change default admin credentials after updating.
<> Enable automatic firmware updates if available.
<> Reboot your router occasionally to clear potential threats.

Let me know if you need help finding the right update for your router model!

Patrick:
Are automatic updates on router firmware known to be reliable? How often should the router be rebooted?

Copilot:
Automatic firmware updates on routers are generally reliable if the manufacturer has a strong track record of stable releases. However, there are a few things to keep in mind:

Reliability of Automatic Firmware Updates
<> Convenience: They ensure your router is always running the latest security patches without manual intervention.
<> Security: Many updates fix vulnerabilities, preventing exploits like unauthorized access or malware injections.
XX Potential Risks: Occasionally, a buggy update may cause connectivity issues or performance drops. If your router lets you delay or schedule updates, it's best to install them after checking user feedback on forums or the manufacturer's website.

Router Rebooting Frequency
Regular reboots help maintain stable performance and reduce connectivity issues. Here's a guideline:

Casual home use: Reboot every 1-2 months to refresh connections and clear minor glitches.

Heavy network traffic (gaming, work-from-home, many devices): Reboot every 1-2 weeks.

Security-conscious users: Some recommend rebooting weekly to disrupt potential malware persistence.

If your router starts slowing down, dropping connections, or behaving oddly, a quick power cycle (turning it off for 10 seconds) can work wonders.