Skip to main content
Microsoftbeginner

MSERT (msert.exe): What It Is & How to Run Microsoft Safety Scanner

What is msert.exe? MSERT is Microsoft Safety Scanner, a legitimate portable malware scanner. How to verify it, run it, read msert.log, and why it expires.

12 min readUpdated August 2026

msert.exe is Microsoft Safety Scanner — a free, portable, on-demand malware scanner published by Microsoft. MSERT is the filename, Microsoft Safety Scanner is the product name, and they are the same thing. This guide covers what the file is, how to confirm the copy you have is genuine, how to run it properly, and how to read what it found.

If you arrived here because you spotted msert.exe on your machine and want to know whether it belongs there, start with the next two sections.

What Is msert.exe?

It is a single self-contained executable that scans Windows for malware, removes what it finds, and attempts to reverse changes made by identified threats. Its defining characteristics:

  • Portable. It does not install. There is no setup, no Start menu entry, no desktop icon, and no uninstaller. It runs from wherever you saved it.
  • On-demand only. It scans when you launch it and then exits. It is not a service and does not run in the background.
  • No real-time protection. Microsoft is explicit that it does not replace an anti-malware product. It is a second opinion, not a shield.
  • Self-contained definitions. The malware signatures ship inside the executable, which is why it expires — see the 10-day expiry.
  • Signed with SHA-2 only. Devices must support SHA-2 code signing to run it.

It supports Windows 11, Windows 10, Windows 8.1 and 8, Windows 7, and Windows Server from 2008 R2 onward, in 32-bit and 64-bit builds.

Is msert.exe Safe? How to Verify It Yourself

The genuine file is safe. But "a file called msert.exe is safe" is not a useful answer, because malware routinely adopts legitimate filenames precisely so that a search like the one you just did returns reassurance. Check the copy you actually have.

1. Check the digital signature

This is the definitive test.

  1. Right-click the file and select Properties.
  2. Look for a Digital Signatures tab.
  3. Open it. The signer should be Microsoft Corporation.
  4. Select the signature, choose Details, and confirm the certificate is valid.

If there is no Digital Signatures tab at all, the file is not from Microsoft. That is the single clearest red flag. From PowerShell, the same check:

Get-AuthenticodeSignature .\msert.exe | Format-List Status, SignerCertificate

Status should be Valid.

2. Check where it is

Windows never installs msert.exe. It is not a built-in component, so it should only exist somewhere you put it — usually Downloads. Locations that deserve a second look:

  • Running from %TEMP%, AppData, or a user profile folder you did not download to
  • Sitting in C:\Windows\System32 or another system directory
  • Present on a machine where nobody remembers downloading it

None of those are proof of infection on their own — an IT administrator or a support technician may have left a copy behind, which is a common and innocent explanation. But combined with a missing or invalid signature, treat the file as hostile.

If you want to check a suspicious copy against threat intelligence, our file hash checker hashes the file locally in your browser and looks the hash up against malware databases without uploading the file itself.

3. Expect a browser warning — it is a false positive

Chrome and Edge frequently warn that msert.exe "isn't commonly downloaded" or "could harm your device". This is a reputation signal, not a detection. Microsoft republishes Safety Scanner constantly with fresh definitions, so each individual build is downloaded by comparatively few people and never accumulates the download history that suppresses the warning.

The right response is not to disable the warning reflexively but to confirm two things: that you downloaded from Microsoft's own page, and that the signature check above passes. Then proceed.

Can I delete it?

Yes, and you probably should. Microsoft's stated removal instruction is simply to delete the executable. There is no service to stop, no registry to clean, and no uninstaller to run. Because the copy expires anyway, deleting it after a scan and downloading fresh next time is the correct habit. The log file at %SYSTEMROOT%\debug\msert.log remains and is harmless.

Download Microsoft Safety Scanner

Download only from Microsoft. Third-party "download portals" hosting security tools are a well-worn malware delivery route.

Not sure which build you need? Check Settings → System → About → System type. When in doubt on any machine from the last decade, use 64-bit.

The file downloads as msert.exe. Note where you saved it, because nothing will appear in the Start menu afterwards — a genuinely common source of "I downloaded it, where did it go?" confusion.

Scanning a machine that is too infected to browse: download on a clean computer, copy msert.exe to a USB drive, and run it on the affected machine. The tool needs no installation and no internet connection to scan, which is what makes it useful when malware is blocking security software from installing.

Running a Scan

  1. Double-click msert.exe.
  2. Approve the User Account Control prompt — it needs administrator rights to scan and clean properly.
  3. Accept the license terms and click Next.
  4. Choose your scan type.
  5. Let it run to completion without closing the window.
  6. Review the results, then restart if anything was removed.

Scan types

TypeWhat it coversTypical durationUse when
Quick scanMemory, startup locations, and the areas malware most commonly occupiesMinutesFirst run, routine second opinion
Full scanEvery file on every driveHours; longer on mechanical drivesQuick scan found something, or you have specific reason to suspect an infection
Customized scanA quick scan plus a folder you nominateVariesChecking a USB stick, a downloads folder, or a specific share

Start with a quick scan. A full scan is a serious time commitment and is rarely the right opening move — run it overnight if the quick scan turns something up.

Running MSERT from the Command Line

For scripted or unattended use:

msert.exe /Q          Quiet — runs the scan with no user interface
msert.exe /F /Q       Quiet full scan

Run these from an elevated command prompt or PowerShell session. With /Q there is no window and no on-screen summary, so the log file is your only output — read %SYSTEMROOT%\debug\msert.log afterwards.

An honest caveat about switches. Microsoft does not publish a complete command-line reference for msert.exe. /Q and /F are the two that are reliably attested. Switch lists circulating online — typically /Q, /N, /F and /F:Y — are largely borrowed from MRT.exe, the separate Malicious Software Removal Tool, and are not documented by Microsoft for Safety Scanner. If you intend to build automation around /N (detect without removing) or /F:Y, verify the behavior on a test machine first rather than trusting a switch table. That advice applies to the version of this list that used to appear on this page too.

Remember that the executable expires ten days after download, which makes MSERT a poor fit for a recurring scheduled task: any script must download a fresh copy each run, or it will silently stop scanning.

Advertisement

Where the MSERT Log File Is

%SYSTEMROOT%\debug\msert.log

On a standard installation that resolves to C:\Windows\debug\msert.log. Paste the path with the variable into the Run dialog (Win + R) or Explorer's address bar and it will open in Notepad.

The log is worth reading even when the on-screen summary says everything is fine. It contains the full path of every detected item, the threat name assigned to it, and the action taken — detail the summary screen omits. If you need to hand findings to someone else, this file is what to send.

msert.log is also the only output when you run with /Q.

Reading Your Results

No threats found. Nothing matched Microsoft's definitions. This is reassuring but not conclusive: MSERT scans on demand with the definitions frozen at download time, and no scanner detects everything. If symptoms persist, the absence of a detection is a data point, not a verdict.

Threats found and removed. Restart the machine to complete cleanup, then run a second scan afterwards to confirm nothing regenerated. Malware that reinstalls itself after removal usually shows up as the same detections reappearing on the follow-up scan — a strong sign of a persistence mechanism the scanner has not removed.

Threats found but not removed. Some malware cannot be cleaned while Windows is running normally, because the files are locked or the malware is actively defending itself. Options, in order: run the scan again in Safe Mode, or use Microsoft Defender Offline, which scans from a trusted environment before Windows loads and is substantially more effective against entrenched infections.

The same detections every time you scan. Either something is restoring the files, or the detections are in a location the scanner cannot clean — a system restore point or a backup archive, for instance. Worth escalating rather than repeating the scan.

MSERT Error Codes

Safety Scanner reports failures as hex error codes. Microsoft documents these in How to troubleshoot an error when you run the Microsoft Safety Scanner. The ones that come up most:

CodeDocumented causeFix
0x80508019The scan destination file or drive does not existChange the destination
0x80508007The system has low memoryDownload the scanner again
0x8050800CThe system state prohibits the scan from running in a specific user contextRestart the computer
0x8050A001, 0x8050A002, 0x8050A004, 0x8050A005, 0x80508001, 0x80508002, 0x80508004Definition or signature problemsDownload Safety Scanner again

The pattern is worth internalizing: for most MSERT errors, the fix really is to download a fresh copy. A stale or partially downloaded executable is the single most common cause of the tool failing to start, which loops back to the expiry rule below.

The 10-Day Expiry

Safety Scanner expires 10 days after you download it. After that it stops working entirely.

This is deliberate rather than an annoyance. The malware definitions are compiled into the executable, so an old copy scans with old signatures. Rather than let people run a two-month-old scanner and trust the clean result it reports, Microsoft makes it stop.

What this means in practice:

  • Download a fresh copy before every scan. Do not keep one on a USB stick and reuse it.
  • If MSERT will not start, check the download date before troubleshooting anything else. Expiry looks like a broken file.
  • It is unsuitable for scheduled scans unless your script re-downloads it each time.
  • The definition version in any given build matches what Microsoft publishes on its security intelligence updates page.

A freshly downloaded MSERT is also a useful stopgap when Defender's own definitions will not update. The classic symptom is Windows Update repeatedly failing to install KB2267602 with error 0x80070643 — Defender keeps running on stale signatures until that is resolved, and a current Safety Scanner gives you an independent scan in the meantime.

MSERT vs MRT.exe vs Microsoft Defender

Three Microsoft anti-malware tools that people routinely mix up:

msert.exe (Safety Scanner)MRT.exe (Malicious Software Removal Tool)Microsoft Defender Antivirus
How you get itDownload manuallyBuilt into Windows, updated via Windows UpdateBuilt into Windows
LocationWherever you saved itC:\Windows\System32\MRT.exeWindows component
CoverageFull Microsoft definition setA limited list of prevalent malware familiesFull definition set
RunsOn demand onlyMonthly in the background, or on demandContinuously, real time
ExpiresYes, after 10 daysNoNo
Log file%SYSTEMROOT%\debug\msert.log%SYSTEMROOT%\debug\mrt.logWindows Security app

The practical distinction: MRT is a narrow monthly sweep for widespread threats, Defender is your actual protection, and MSERT is the one you reach for when you want a thorough second opinion from a tool that owes nothing to whatever is already running on the machine.

What MSERT Does Not Do

Be clear about the limits before you rely on it:

  • It does not protect you. No real-time scanning, no web filtering, no behavioral blocking. It is inert until you run it.
  • It does not replace your antivirus. Microsoft says so directly. Keep Microsoft Defender Antivirus or another resident product running.
  • It does not update itself. Definitions are frozen at the moment you downloaded it.
  • It cannot always undo the damage. It attempts to reverse changes made by identified threats, but "attempts" is the operative word — a cleaned machine is not necessarily a restored one. Settings, permissions, and files altered by malware may need manual repair.
  • A clean result is not a guarantee. It means nothing matched the definitions it shipped with.

If MSERT keeps finding the same threats, or finds nothing while the machine clearly misbehaves, escalate to Microsoft Defender Offline or to a professional. Repeatedly rerunning an on-demand scanner is not a remediation strategy.

Frequently Asked Questions

Find answers to common questions

msert.exe is Microsoft Safety Scanner, a free on-demand malware scanner from Microsoft. MSERT is simply the filename people see, which is why most searches use it rather than the product name. It is a portable executable — it does not install, does not appear in the Start menu, and only runs when you double-click it. It scans for malware, removes what it finds, and tries to reverse changes made by identified threats. It is not a background service and it provides no real-time protection.

The genuine file is safe and published by Microsoft, but verify rather than assume — malware does borrow legitimate filenames. Right-click the file, choose Properties, and look for a Digital Signatures tab showing Microsoft Corporation. If there is no Digital Signatures tab at all, the file is not from Microsoft. Also check where it came from: msert.exe is never installed by Windows, so it should only exist in a folder you downloaded it to, typically Downloads. A copy in a system folder or running from Temp is worth investigating.

That warning is about download reputation, not the file's contents. Because Safety Scanner is re-published constantly and each build is downloaded by relatively few people, browsers such as Chrome and Edge frequently flag it as "not commonly downloaded". It is a false positive you should expect. The correct response is not to ignore all warnings but to confirm you downloaded from Microsoft's own page and then check the file's digital signature before running it.

Microsoft Safety Scanner writes its detailed results to %SYSTEMROOT%\debug\msert.log, which on a standard install is C:\Windows\debug\msert.log. It is a plain text file you can open in Notepad. Paste %SYSTEMROOT%\debug\msert.log into the Run dialog or Explorer's address bar to open it directly. The log holds far more detail than the on-screen summary, including the full path of every detected item and what was done with it.

Yes. Microsoft's own instruction for removing the tool is to delete the executable file. It is portable, so there is nothing else to uninstall — no service, no registry footprint to clean, no Start menu entry. Deleting it is in fact the recommended habit, because the copy you have expires and you should download a fresh one next time rather than run stale definitions. The msert.log file is left behind and is harmless to keep or delete.

Because its malware definitions are baked into the executable rather than updated separately. Ten days after download the tool stops working, which forces you to fetch a build with current definitions instead of scanning with months-old signatures and trusting a clean result. Microsoft's guidance is to download the latest version before each scan. If MSERT refuses to run and you downloaded it a while ago, expiry is the most likely explanation.

Run msert.exe /Q for a quiet scan with no interface, or msert.exe /F /Q for a quiet full scan. Both need an elevated command prompt, and results go to %SYSTEMROOT%\debug\msert.log since there is no window to read. Be aware that Microsoft does not publish a complete command-line reference for msert.exe. Switches you see quoted elsewhere, such as /N and /F:Y, come from the separate MRT.exe tool and are not documented for Safety Scanner — test before relying on them in a script.

A quick scan is usually a few minutes. A full scan reads every file on every drive and can run for several hours, sometimes considerably longer on a mechanical hard drive or a large volume. Start with a quick scan; only run a full scan if the quick scan finds something or you have specific reason to suspect an infection it missed. Full scans are best started when you do not need the machine.

They are different tools that are easy to confuse. MRT.exe is the Windows Malicious Software Removal Tool, built into Windows at C:\Windows\System32\MRT.exe and delivered through Windows Update monthly; it targets a limited list of prevalent malware families. msert.exe is Safety Scanner, which you download yourself, carries the full Microsoft Defender definition set, and expires after 10 days. MRT logs to mrt.log, MSERT logs to msert.log, both in the same debug folder.

Yes. Safety Scanner performs on-demand scans only and provides no real-time protection, so it does not compete with your installed antivirus the way two resident products would. That is precisely what makes it useful as a second opinion when you suspect your primary product has missed something. Expect the scan to run slowly if your antivirus inspects every file MSERT touches.