1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Security Essentials Scan from Command Line

Discussion in 'Support' started by CWBillow, Feb 18, 2011.

  1. CWBillow

    Joined:
    Jul 12, 2008
    Messages:
    194
    Likes Received:
    0
    I want to run a Microsoft Security Essentials scan from a batch file.

    The command itself is

    mpcmdrun -Scan -ScanType 2


    and the batch file running it would be

    c:
    cd \"Program Files\Microsoft Security Client\Antimalware"
    mpcmdrun -Scan -ScanType 2

    The command itself runs fine, but when I tried to set up a shortcut to open tcc and run the file, it closes.

    I obviously am missing a piece somewhere.

    What is it I am missing in this process?

    Regards,
    Chuck Billow
     
  2. samintz

    samintz Scott Mintz

    Joined:
    May 20, 2008
    Messages:
    1,178
    Likes Received:
    11
    The correct syntax for running a batch
    file and then terminating the console session when complete is:

    tcc /c batchfile.btm

    where batchfile.btm is the name of your
    batch file. You would most likely need to specify full paths to both
    tcc and the batch file.

    If you set up TCC/TCMD to handle .BAT,
    .CMD, or .BTM files (i.e. you ran tccbatch.btm) then you should be
    able to just double-click the batch file to run it.

    And finally, your statement, "to
    open tcc and run the file, it closes"
    is very ambiguous. What closes? TCC? mpcmdrun?

    -Scott

    CWBillow <> wrote on 02/18/2011
    07:08:47 PM:



     
  3. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,792
    Likes Received:
    29
    If you're naming the batfile as the shortcut's target, it's probably using an
    association that contains "/C" (close when done). Try, as a target for the
    shortcut,

    Code:
    (path\)TCC.EXE (path\)batfile

    On Fri, 18 Feb 2011 19:08:49 -0500, CWBillow <> wrote:

    |I want to run a Microsoft Security Essentials scan from a batch file.
    |
    |The command itself is
    |
    |mpcmdrun -Scan -ScanType 2
    |
    |
    |and the batch file running it would be
    |
    |c:
    |cd \"Program Files\Microsoft Security Client\Antimalware"
    |mpcmdrun -Scan -ScanType 2
    |
    |The command itself runs fine, but when I tried to set up a shortcut to open tcc and run the file, it closes.
    |
    |I obviously am missing a piece somewhere.
    |
    |What is it I am missing in this process?
    |
    |Regards,
    |Chuck Billow
     
  4. CWBillow

    Joined:
    Jul 12, 2008
    Messages:
    194
    Likes Received:
    0
    Vince / Scott;

    I try again and let you guys know.

    Thanks,
    Chuck

     

Share This Page