2 Replies Latest reply on Aug 29, 2010 6:57 AM by redhighlander

    Advanced Virus Scan Scheduling (Wake PC)

      **PLEASE NOTE: This technique will only wake a PC from Sleep/ Standby mode. If you fully shut down your PC, this will not work. Fortunately sleep mode uses almost as little power as a fully shut down PC, and can boot back up in a flash. For this reason I always use it instead of shutting down.

      I have just finished sorting out my McAfee Virus Scan Scheduling so that it wakes the PC, temporarily disables sleep mode while it runs, then reenables sleep mode again so that the whole process is entirely automated.
      After getting frustrated with the scheduled scan being unable to wake the PC to run, and the McAfee scheduler not being able to start the scan if the PC was powered on after the scheduled start I decided to try and solve the problem through Windows task scheduler. I thought it was a case of finding the correct .exe file and adding a parameter to start the launch, but McAfee personal Virus Scan seems to lack command line extensions for this!
      I had to think outside of the box for this one, but a minute or two later, it hit me... schedule a task that is able to wake the PC a few minutes before the scheduled scan kicks in, then the McAfee scheduler can take over and do its thing. The only problem left was that my PC is set to sleep after 45 minutes idle, which for some reason still occurs in the middle of a virus scan. Searching on the net, I found command line parameters for "powercfg.exe" that I could use to disable sleep, then reenable it when I was done.
      I created the following batch file to disable sleep:

      E:\Windows\System32\powercfg.exe -change -standby-timeout-ac 0

      Just type this into notepad, then go to "Save As..", select "All Files" as tyoe and add ".bat" to the end. Please note that the drive letter E: is just because my system is configured that way, it will be C: for most of you (the drive that you have Windows installed on).

      This one I created as above to re-enable sleep (the number at the end is the time in minutes that you want to allow the PC to idle before sleep kicks in):

      E:\Windows\System32\powercfg.exe -change -standby-timeout-ac 45.

      Using these two batch files, I created two tasks in Windows Task Scheduler (If you are using Vista DO NOT create the wake up task as a "Basic Task" as these are known to not wake the PC as they should):

      1) Create a task to wake the PC and disable sleep. This one is set to run 5 minutes before the scheduled Virus Scan to ensure that the PC is on and McAfee will start as specified. Ensure that you tick the box marked "Wake the computer to perform this task". You can also set the option to run the task whether the user is logged in or not, and Task Scheduler will store your password, enabling the computer to log you in automatically. Set the action as Run Program and point it to your .bat that disables Sleep. This task will then wake the PC at the desired time, and disable sleep to allow the Virus Scan to run uninterrupted.

      2) Open up McAfee security center, then configure the scheduled scan for 5 minutes after the first task is set (Configure>>Computer & Files>>Advanced... button in Virus Protection is enabled box>>Scheduled scan).

      3) Create a second task to reenable sleep mode again. You shouldn't need to set the "Wake the computer..." setting for this, as the PC should be unable to time out into sleep mode because of the first script. This task needs to be set to run the second batch file that you created above. The trick here is to have a good idea how long you Virus Scan takes to run, and schedule this task for the time that you think the scan should be completed by. I allowed a bit longer just to be sure.

      Once the third task has run, the PC should idle for the time specified in the sleep setting script, then go back to sleep, saving you valuable electricity!
      This method means that you can schedule your PC to wake in the night, run a scheduled Virus scan, and then sleep, all before you wake up in the morning! No more slow PC while you wait for the Virus Scan to do its thing, or having to pause the scan for later!!
      I hope this article is helpful for users who like me wish that the McAfee scheduler had these features anyway! If these features never make it out of the McAfee labs, this is the way to get the job done!