Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Security Essentials Scan from Command Line

Jul
304
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
 
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:


> CWBillow <>
> 02/18/2011 07:08 PM
>
> Please respond to
>
>
> To
>
> [email protected]
>
> cc
>
> Subject
>
> [Support-t-2614] Security Essentials Scan from Command Line
>
> 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
>
>
>
>
 
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
 
Vince / Scott;

I try again and let you guys know.

Thanks,
Chuck

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:
 
Back
Top