Difference between revisions of "Malwarebytes"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
(added installer switches to exclude icons)
(add wait for process to end script)
Line 17: Line 17:
 
        
 
        
 
         <install cmd='%software%\mbam-setup.exe /VERYSILENT /NORESTART /LOG="%TEMP%\mbam.log" /MERGETASKS="!desktopicon" /NOICONS' />
 
         <install cmd='%software%\mbam-setup.exe /VERYSILENT /NORESTART /LOG="%TEMP%\mbam.log" /MERGETASKS="!desktopicon" /NOICONS' />
 +
        <install cmd='%software%\tools\waitforprocess.bat mbam.tmp'/>
 
                
 
                
 
         <upgrade include='install' />
 
         <upgrade include='install' />
Line 24: Line 25:
 
</packages>
 
</packages>
 
</source>
 
</source>
 +
 +
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. (See http://lists.wpkg.org/pipermail/wpkg-users/2012-July/008878.html )
 +
 +
<syntaxhighlight lang="dos">
 +
@echo off
 +
 +
:loop
 +
tasklist | find /I "%1" > NUL
 +
if ERRORLEVEL 1 goto jump
 +
ping -n 1 localhost >NUL
 +
goto loop
 +
:jump
 +
</syntaxhighlight>
  
 
[[Category:Silent Installers]]
 
[[Category:Silent Installers]]

Revision as of 16:14, 21 November 2012

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' />
        <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. (See http://lists.wpkg.org/pipermail/wpkg-users/2012-July/008878.html )

@echo off

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