Jump to content

scheduled scan won't actually run on the date and time


Recommended Posts

I am trying to run a batch file to have Malwarebytes perform a quick scan. I can make it run with this script:

@echo off

echo Starting Malwarebytes Quick Scan

cd /d %~dp0

"C:\Program Files (x86)\Malwarebytes' Anti-Malware\mbam.exe" /scan -quick -terminate

but if I try to schedule it using this script:

@echo off

echo Starting Malwarebytes Quick Scan

cd /d %~dp0

"C:\Program Files (x86)\Malwarebytes' Anti-Malware\mbam.exe" /schedule /scan -quick -terminate /once /starting 05/18/2012 03:45:00

nothing happens. What part of the second script is wrong?

Link to post
Share on other sites

  • Root Admin

Well not sure why you'd want to do it manually by command line as the Graphical program will do all of it for you but please review the included help file that should provide you with the options and syntax for creating it.

Modify your batch file to change directory into the same directory where Malwarebytes is installed before running the commands.

Malwarebytes Anti-Malware supports a variety of command line parameters, which can be used from either a command prompt, batch file or script. (Note: some of these parameters are available in the PRO version only.)

mbam.exe <parameters>

(where parameters is one or more of the following)

/scan <optional -quick="" or="" -full="" -flash=""> <optional -silent=""> <optional -remove=""> < optional -terminate> <optional -reboot=""> <optional -log="">: initiates a scan with the selected options.

Parameters:

-quick: initiates a quick scan.

-full: initiates a full scan using saved drives in the registry.

-flash: initiates a flash scan of memory and heuristics only.

-terminate: closes the program after a scan completes and no threats were found (cannot be used with -silent). If an item is detected, the program remains open so that the user can decide whether or not to remove the detected threat(s).

-log: overrides the save log checkmark on the settings tab. If the Automatically save log after scan completes option is unchecked, a log file will still be saved when the -log parameter is used.

-silent: hides the GUI while scanning (does not need to be used with -terminate).

-reboot: reboots the computer if necessary, only valid if -silent is used.

-remove: automatically removes threats and saves a log file. Unless -silent is specified, GUI stays open.

Examples:

mbam.exe /scan will run a default scan.

mbam.exe /scan -full will run a full scan.

mbam.exe /scan -flash -terminate will run a flash scan and terminate if no objects are detected.

mbam.exe /scan -quick -log -silent -remove -reboot will run a quick scan silently, save logs, automatically remove threats, and reboot if necessary.

Limitations:

-terminate parameter cannot be used with the -silent parameter since the program will automatically terminate when the -silent parameter is used.

-reboot parameter is only valid if used with the -silent parameter.

/schedule <optional update="" or="" scan="" -quick="" -full="" -flash=""> <optional realtime="" or="" hourly="" daily="" weekly="" monthly="" once="" onreboot="">: these items allow the user to choose the frequency for the scheduled update or scan to occur:

<optional starting="" mm="" dd="" yyyy="" hh:mm:ss="">: this item allows the user to set the time for the scheduled scan or update to start.

For /realtime omit this - the current time is assumed.

For /random - this item selects a random time to set the scheduled scan or update to occur. /random may only be used with /hourly or /daily and randomizes the Hour and Minute or Hour and Minute and Second respectively

<optional every="" x="" where="" is="" a="" number="" for="" the="" frequency="" of="" scan="" or="" update="" to="" occur=""> <optional recover="" x="" where="" is="" the="" number="" of="" hours="" for="" scan="" or="" update="" to="" attempt="" run="" again="" if="" computer="" was="" unavailable="" during="" scheduled="" time="">

<optional wakefromsleep="">: may be used with a scan or an update. Malwarebytes Anti-Malware will attempt to wake the computer from sleep to perform the scheduled scan or update.

Limitations: Not supported with /onreboot for scans or /realtime or /onreboot for updates.

<optional flash="" executes="" a="" scan="" after="" successful="" update="" note:="" only="" used="" with="">

Examples:

/schedule /scan -quick -remove -terminate -log /daily /starting 08/10/2010 23:00:00 /every 1 /silent /wakefromsleep will schedule silent daily Quick Scan starting on August 10th, 2010 at 11:00PM that will repeat every 1 day, remove threats, reboot if necessary, force the creation of a scan log and will attempt to wake the computer from sleep to perform the scan.

/schedule /update /flash /realtime /every 5 will schedule an update to occur in real-time once every 5 minutes and set a Flash Scan to occur after each successful update.

/unschedule <optional all="" or="" -update="" -scan="">.

Note: You can remove individual scans or updates by not including the /all switch and specifying the exact switches used to create the scan or update

/all removes all scheduled scans and updates.

/all -update removes all scheduled updates.

/all -scan removes all scheduled scans.

Examples:

/unschedule /scan -quick -remove -terminate -log /daily /starting 08/10/2010 23:00:00 /every 1 /silent will delete a scheduled silent daily Quick Scan that was set to start on August 10th, 2010 at 11:00PM that was set to repeat every 1 day, remove threats, reboot if necessary, and force the creation of a scan log.

/unschedule /update /flash /realtime /every 5 will delete a scheduled update that was to occur in real-time once every 5 minutes and with a Flash Scan set to occur after each successful update.</optional></optional></optional></optional></optional></optional></optional></optional></optional></optional></optional></optional></optional></parameters>

Link to post
Share on other sites

  • Root Admin

Did you try changing directory into the folder where the program resides as I said above?

Are you using an Elevated Admin console or using right click and run batch file as an admin? "Run as administrator"

The command you have works for me. Though setting this up in the graphical interface is so much easier for most. I'm quite a commandline user myself and I might use a script for deployment to multiple computers but not for a single computer.

Link to post
Share on other sites

I'm actually wanting to send this script to multiple computers on a weekly basis, but the script I wrote above was to test it on my computer first.

I did change the directory into the folder where the program resides (or at least I thought I did with this script.) Isn't this the line where I change it?

"C:\Program Files (x86)\Malwarebytes' Anti-Malware\mbam.exe" /schedule /scan -quick -terminate /once /starting 05/18/2012 03:45:00

Link to post
Share on other sites

  • Root Admin

I'm actually wanting to send this script to multiple computers on a weekly basis, but the script I wrote above was to test it on my computer first.

Please contact corporate support with your order number and they will assist you in deployment and usage.

http://www.malwarebytes.org/support/corporate

Link to post
Share on other sites

The corporate techs are no help because they want a trial ID and validation key. I gave them what I thought was the ID and key, but they said that they were wrong. I don't know the real ID and key then. All I want is to be able to schedule a scan using a batch file on just this one computer. I can worry about other computers later. Can you still help me?

Link to post
Share on other sites

  • Root Admin

Okay I think I see where the issue may be. You are using a hotmail email address which though it could be a business is not normal. Using a regular business email address would be better, but as said you can use the hotmail address it's just not as normal for a business.

It also sounds like you're wanting to evaluate the program for a business and trying to do it on your own. What you need to do is contact corporate sales and they will provide you with an official evaluation along with an ID and Key and then support will provide you with proper support you're looking for.

Please contact Corporate Sales from here

Thank you and sorry for any confusion.

Ron

Link to post
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • 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.