Jump to content

mbam.exe batch last 8 seconds

Recommended Posts



I put on my PC some scheduled tasks which are executed during the night (administrator rights granted) in which I included .bat (this is a test version, not the final one):


rem test malware
@echo OFF
echo Start of test
cd "C:\Program Files (x86)\Malwarebytes"
mbam.exe /logtofile %TEMP%\scanMbam.log /update -silent
mbam.exe /logtofile %TEMP%\scanMbam.log /scan -quick -log -silent -remove -reboot
cd %TEMP%
dir *.log
type %TEMP%\scanMbam.log


My goal is:

  • update database
  • perform a quick scan
  • display a message if any thread detected (not included, yet, I imagined to do this using the test of %ERRORLEVEL%)
  • collect the logs in well identified file
  • exit the .bat once all above actions performed


The script execution last 8 seconds, which seems to me to be extremely short,

The database is not updated (the interface shows the old version of database)

The %ERRORLEVEL% is always 0 (this can be correct as there is no detection)

The log file is not created


I use registered Pro version of Malwarebytes.


Please let me know what is wrong in my approach.


Also with option -reboot, if the computer is rebooted, is the script going to continue its processing in order to perform other tasks , or shall I put mbem.exe with this option as the very last step of my script?


Thank you in advance for your help


Best Regards






Link to post
Share on other sites

  • Root Admin

The free version does not support automated updates.  The paid PRO version will do all of this in an automated fashion and currently comes with a Lifetime license for Consumer home use.


You can scan and clean using a script but you cannot update with a script in the free version.


The scanner should complete its task of removal on reboot.



Link to post
Share on other sites



The issue is that I use the paid version which I bought on June 22nd and not the free one...


Thus the paid version I use does not perform the requested task. What is wrong with my script (or software version I bought)?


Best Regards





The script is executed when task scheduler wakes-up the PC from the hibernate state. The real-time protection is enabled.

System: Windows 7 64 bits Family Premium

Link to post
Share on other sites

  • Root Admin

I'll review it but not really sure why you're doing it that way.  The program has all of this built-in already and can all be done silently without even anyone logged onto the computer.


Please run the following and post back the log for me so I can check on the program.


Please create an mbam-check log:

  • Download mbam-check.exe from here and save it to your desktop
  • Double-click on mbam-check.exe to run it, it should then open a log file
  • Please do not copy and paste the entire contents of the log into your next post, instead please attach the log CheckResults.txt file which should now be located on your desktop to your next post


Link to post
Share on other sites

  • Root Admin

You're adding items to the command line that are not all supported on a single line.
The following should basically do what you're asking to do.

Unless you changed the installation path you're also not using the correct folder to change directory to.

Also, not all programs are coded to support %ERRORLEVEL%

@echo offCD "C:\Program Files (x86)\Malwarebytes' Anti-Malware"mbam.exe /logtofile %TEMP%\scanMbam.logmbam.exe /update -silentecho After update ERRORLEVEL %ERRORLEVEL%mbam.exe /scan -quick -log -silent -remove -rebootecho After scan ERRORLEVEL %ERRORLEVEL%cd %TEMP%dir *.logtype %TEMP%\scanMbam.log
Link to post
Share on other sites

The reason of my approach is to control this task execution, i.e. to wake up the computer from hibernate state, to perform the scan automatically (and some other tasks as back-up)  at the very suitable time for me, do not disturb any other tasks by the scan or reboot and not to slow-down the computer when it is in use and when all these tasks finished to put the computer in the hibernate state (or to shut it down depending on other task requirements). I put this script before back-up tasks, but looking at your answer, it seems to me that it shall be executed at the end of the script, as if my understanding of -reboot is correct.


Best Regards



Link to post
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
Back to top
  • Create New...

Important Information

This site uses cookies - We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.