Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to write a batch file to automatically update Microsoft security essentials for Windows 7?

If so, could you please help me write it?

share|improve this question
Just enable automatic Windows Updates and MSE signature updates will be installed automatically. – Ramhound Nov 27 '12 at 14:38
I know, but it seems that i find myself doing updates more often than the windows updater does, so i wanted a quick way to do it manually instead of having to wait for windows updater to search and then find the update and do all that. – JustinD Nov 27 '12 at 14:40
up vote 4 down vote accepted

You only need 1 command:

"%programfiles%\Microsoft Security Client\Antimalware\MpCmdRun.exe" SignatureUpdate

Create a shortcut to your desktop or you can also create a scheduled task to update the signatures.

share|improve this answer

Microsoft Security Essentials includes a command-line utility which can be used to update the virus/malware definitions. The utility is named MpCmdRun.exe. You can use the following script for updating:

"%ProgramFiles%\Microsoft Security Essentials\MpCmdRun.exe" -SignatureUpdate

And schedule that batch file to run automatically using Task Scheduler.

If you don't turn off Automatic Windows Update, the Microsoft Security Essential will get automatically updated.

See detailed instructions here:
Detailed Command Line Options
Third Party Utility for Automatic Updating (Not Recommended)

share|improve this answer
Thank you, but the directory was wrong, i found "%ProgramFiles%\Microsoft Security Client\MpCmdRun.exe" -SignatureUpdate to work, under my computer the there is no folder Microsoft Security Essentials, it's Security Client. – JustinD Nov 27 '12 at 14:15
Sorry for creating confusion, I think it was previously in that location. – Ankit Mishra Nov 27 '12 at 14:23
Possible, but thank you anyways. It's all fine :) – JustinD Nov 27 '12 at 14:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .