Automated Microsoft Security Essentials Installation

For all those that frequently setup test machines and get tired of manually installing the Microsoft Security Essentials 2.0, here’s a straight forward batch file (even a regular user could use) that does the following:

  1. Downloads the Microsoft Security Essential 2.0 (x86) installation source file
  2. Installs Microsoft Security Essentials 2.0
  3. Downloads and updates the virus definition signature file

 

[sourcecode language=”plain”]
@ECHO OFF
Echo Downloading Microsoft Security Essentials 2.0 (x86)
start /wait bitsadmin /TRANSFER MSE20 http://download.microsoft.com/download/A/3/8/A38FFBF2-1122-48B4-AF60-E44F6DC28BD8/en-us/x86/mseinstall.exe %TEMP%\mseinstall.exe

Echo Insalling Microsoft Security Essentials 2.0 (x86)
start /wait %temp%\mseinstall.exe /s /runwgacheck /o

Echo Updating Microsoft Security Essentials Signatures
"C:\Program Files\Microsoft Security Client\msseces.exe" /update
pause
[/sourcecode]

Just copy paste the above code a batch file like getmse.cmd and launch it.

image

If you need the 64 bit version, simply replace the above download url with http://download.microsoft.com/download/A/3/8/A38FFBF2-1122-48B4-AF60-E44F6DC28BD8/en-us/amd64/mseinstall.exe

7 Replies to “Automated Microsoft Security Essentials Installation”

  1. I have a other Idea for Installing for Automated Microsoft Security Essentials Installation. I have use the Variable ” %PROCESSOR_ARCHITECTURE%” for Check the Installed Platform Type, (x86 or x64).

    Here is the Script:
    ->
    @ECHO OFF
    :: Update der Orig Version von Alex Verboon
    :: https://www.verboon.info/index.php/2011/01/automated-microsoft-security-essentials-installation/
    :: 11.01.2011
    ::

    Echo System Erkennung läuft
    echo ———————-
    If %PROCESSOR_ARCHITECTURE% ==x86 goto x86Install
    If %PROCESSOR_ARCHITECTURE% ==AMD64 goto x64Install

    :x64Install
    Echo Es handelt sich um ein x64-Bit System
    Echo Downloading Microsoft Security Essentials 2.0 (x64)
    start /wait bitsadmin /TRANSFER MSE20 http://download.microsoft.com/download/A/3/8/A38FFBF2-1122-48B4-AF60-E44F6DC28BD8/en-us/amd64/mseinstall.exe %TEMP%\mseinstallx64.exe

    Echo Insalling Microsoft Security Essentials 2.0 (x64)
    start /wait %temp%\mseinstallx64.exe /s /runwgacheck /o

    Echo Updating Microsoft Security Essentials Signatures
    “C:\Program Files\Microsoft Security Client\msseces.exe” /update
    GOTO Endx64

    :x86Install
    Echo Es handelt sich um ein x86-Bit System
    Echo Downloading Microsoft Security Essentials 2.0 (x86)
    start /wait bitsadmin /TRANSFER MSE20 http://download.microsoft.com/download/A/3/8/A38FFBF2-1122-48B4-AF60-E44F6DC28BD8/en-us/x86/mseinstall.exe %TEMP%\mseinstallx86.exe

    Echo Insalling Microsoft Security Essentials 2.0 (x86)
    start /wait %temp%\mseinstallx86.exe /s /runwgacheck /o

    Echo Updating Microsoft Security Essentials Signatures
    “C:\Program Files\Microsoft Security Client\msseces.exe” /update
    GOTO Endx86

    :Endx86
    echo.
    Echo Installation auf Ihrem x86 ist abgeschlossen.
    PAUSE
    EXIT

    :Endx64
    echo.
    Echo Installation auf Ihrem x64 ist abgeschlossen.
    pause
    Exit
    <-

  2. thanks to helmut and alex, but: your script is much too long, the download URL ist false, here is the correct script

    @echo OFF
    echo *===============================================================
    echo Install Microsoft Security Essentials 2.x
    echo *===============================================================
    If %PROCESSOR_ARCHITECTURE% ==x86 set os=x86
    If %PROCESSOR_ARCHITECTURE% ==AMD64 set os=amd64

    set url=http://download.microsoft.com/download/0/2/C/02C8AB73-0774-4975-826F-9E8A0FD7F65D/dede/

    Echo 1. Download …
    start /wait bitsadmin /TRANSFER MSE20 %url%/%os%/mseinstall.exe %TEMP%\mseinstall.exe

    Echo 2. Install ….
    start /wait %temp%\mseinstall.exe /s /runwgacheck /o

    Echo 3. Update …..
    “C:\Program Files\Microsoft Security Client\msseces.exe” /update

  3. Does not work. Download fails… Perhaps the download string isn’t very robust? How did you determine this url? It no longer appears to work…

Leave a Reply