Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Automatic shutdown after virus scan

  • 30-07-2012 12:41am
    #1
    Registered Users, Registered Users 2 Posts: 12,775 ✭✭✭✭


    I want to run a Windows Security Essentials scan on my computer at night and I want my computer to automatically shut down afterwards.

    The computer's in my room and it generates alot of heat and noise (one of the graphics card fans is wonky) so I might be able to fall asleep with it left on but it'll wake me up during the night and if nothing else it's a waste of electricity.

    I can't see any way to perform this in WSE so I was thinking Task Scheduler might work.

    Any ideas?


Comments

  • Closed Accounts Posts: 5,835 ✭✭✭Torqay


    Gbear wrote: »
    I can't see any way to perform this in WSE so I was thinking Task Scheduler might work.

    Any ideas?

    Use this batch file with the Task Scheduler:
    cd C:\Program Files\Microsoft Security Essentials
    MpCmdRun.exe -scan -scantype 2
    shutdown -s -t 180
    

    This will shutdown the computer 3 minutes (180 seconds) after a full system scan, you can choose from 3 different scan types:

    0 Default, according to your configuration
    1 Quick scan
    2 Full system scan

    If you need to abort the shutdown, you'll have 3 minutes after the scan is completed to run the following command:
    shutdown -a
    


  • Registered Users, Registered Users 2 Posts: 12,775 ✭✭✭✭Gbear


    Torqay wrote: »
    Use this batch file with the Task Scheduler:
    cd C:\Program Files\Microsoft Security Essentials
    MpCmdRun.exe -scan -scantype 2
    shutdown -s -t 180
    

    This will shutdown the computer 3 minutes (180 seconds) after a full system scan, you can choose from 3 different scan types:

    0 Default, according to your configuration
    1 Quick scan
    2 Full system scan

    If you need to abort the shutdown, you'll have 3 minutes after the scan is completed to run the following command:
    shutdown -a
    

    In my computer, the file is in "C:\Program Files\Microsoft Security Client" so I just changed the destination.
    Thanks. :)


  • Registered Users, Registered Users 2 Posts: 12,775 ✭✭✭✭Gbear


    Torqay wrote: »
    Use this batch file with the Task Scheduler:
    cd C:\Program Files\Microsoft Security Essentials
    MpCmdRun.exe -scan -scantype 2
    shutdown -s -t 180
    

    This will shutdown the computer 3 minutes (180 seconds) after a full system scan, you can choose from 3 different scan types:

    0 Default, according to your configuration
    1 Quick scan
    2 Full system scan

    If you need to abort the shutdown, you'll have 3 minutes after the scan is completed to run the following command:
    shutdown -a
    

    I don't really understand how I run the task scheduler with this. Is that in the triggers or the actions? If it's the trigger, then what's the action or vice versa?


  • Closed Accounts Posts: 5,835 ✭✭✭Torqay


    Gbear wrote: »
    I don't really understand how I run the task scheduler with this.

    Do you know how to create a batch file with notepad? If the answer is yes, follow the instructions in this tutorial:

    How to schedule a Batch File to run automatically in Windows 7


  • Registered Users, Registered Users 2 Posts: 12,775 ✭✭✭✭Gbear


    Torqay wrote: »
    Do you know how to create a batch file with notepad? If the answer is yes, follow the instructions in this tutorial:

    How to schedule a Batch File to run automatically in Windows 7

    That's that sorted, thanks.


  • Advertisement
Advertisement