Since I am using Microsoft Security Essentials for my computer, I have been searching a way to update the virus definitions more frequently. To make this happen, I have found a way to get this done by using a Windows Automated Task. I created a bat file for it to easily import this task. This task hourly launches a command prompt to update the virus definitions.
These are the steps to take to manually create the update task:
- Create a new folder under C:\ > Give it the name “Tasks”
- Open Notepad: ctrl+r > type “Notepad” > Enter
- Copy and paste the following visual basic script code into notepad:
Function RunWindowedCMD(a_cmd)
winState = 7 ' Displays the window as a minimized window. The active window remains active.
' can be also 10 - Sets the show-state based on the state of the program that started the application.
Set ShellObj = CreateObject("WScript.Shell")
RunWindowedCMD = ShellObj.Run( a_cmd, winState, True)
' Wscript.echo "CMD return " & RunWindowedCMD
Set ShellObj = Nothing
End FunctionRunWindowedCMD("C:\Tasks\MSSecurityEssentialsUpdate.bat") - Save this file as “MSE_start.vbs” > put this saved file under the folder C:\Tasks\
- Open Notepad: ctrl+r > type “Notepad” > Enter
- Copy and paste the following code into notepad:
"C:\Program Files\Microsoft Security Essentials\MpCmdRun.exe" -signatureUpdate
"C:\Program Files\Microsoft Security Client\Antimalware\MpCmdRun.exe" -signatureUpdate
- Save this file as “MSSecurityEssentialsUpdate.bat” > put this saved file under the folder C:\Tasks\
- Now you can create the task for hourly virus definition update, this can be done as follows:
CTRL + R > copy and paste the following code into the text box:
schtasks /Create /TN "MSE_Update" /TR "C:\Tasks\MSE_start.vbs" /SC hourly
You can also use the automated scheduled task install bat. Just download this zip file, extract it all and run the file INSTALL_MSSE_TASK.bat.
The code at step 6 is because there are two different versions of MSSE. The first code will run with Microsoft Security Essentials 1. The second code will run if you have installed Microsoft Security Essentials Beta 2.
Have fun with it!
Dada <(^_^)>

Hi Mate,
Great program! Is there a way to run the .bat invisible so that the user is unaware?
Regards
Hello John,
Yes there is.
Running .BAT or .CMD files in invisible mode
Windows Script Host’s Run Method allows you run a program or script in invisible mode.
Set WshShell = CreateObject(“WScript.Shell”)
WshShell.Run chr(34) & “C:\Batch Files\syncfiles.bat” & Chr(34), 0
Set WshShell = Nothing
Copy the lines above to Notepad and save the file with .VBS extension. Edit the .BAT file name and path accordingly, and save the file. Double-click the .VBS file to run it.
(Ref: Run Method. Setting intWindowStyle parameter to 0 hides the window)
Check this website for more information: http://www.winhelponline.com/blog/run-bat-files-invisibly-without-displaying-command-prompt/