Malwarebytes

This is a silent installer and uninstaller for Malwarebytes.

"Malwarebytes is a site dedicated to fighting malware. Malwarebytes has developed a variety of tools that can identify and remove malicious software from your computer. When your computer becomes infected, Malwarebytes can provide the needed assistance to remove the infection and restore the machine back to optimum performance." - Malwarebytes.org

Malwarebytes Homepage: http://malwarebytes.org/

 
<packages>
    <package
        id="malwarebytes"
        name="Malwarebytes"
        revision="1"
        reboot="false"
        priority="1">
       
        <check type="uninstall" condition="exists" path="Malwarebytes' Anti-Malware" />
       
        <install cmd='%software%\mbam-setup.exe /VERYSILENT /NORESTART /LOG="%TEMP%\mbam.log" /MERGETASKS="!desktopicon" /NOICONS /SUPPRESSMSGBOXES' />
        <install cmd='%software%\tools\waitforprocess.bat mbam.tmp'/>
               
        <upgrade include='install' />
       
        <remove cmd='"%ProgramFiles%\Malwarebytes&apos; Anti-Malware\unins000.exe" /VERYSILENT /NORESTART /LOG="%TEMP%\mbam-unins.log"' />
    </package> 
</packages>

It seems that the installer forks a separate process for installation, so the install check initially fails. This can be avoided by calling a simple wait script e.g. waitforprocess.bat

@echo off

:loop
tasklist | find /I "%1" > NUL
if ERRORLEVEL 1 goto jump
ping -n 1 localhost >NUL
goto loop
:jump

(See http://lists.wpkg.org/pipermail/wpkg-users/2012-July/008878.html )