Batch File Help

R

Robert

I'm trying to create a batch file (new at this) to run a Norton
Antivirus system scan and then shutdown the computer. The problem I have
is at the end of the scan, Norton pops up a box saying the scan is
complete and wants me to click on the "Finish" button. This window is
preventing the batch file from continuing. I don't want to use a timeout
command as the scans are sometimes different lengths of time.

Here is the batch file code:

C:\PROGRA~1\NORTON~2\Navw32.exe /TASK:"C:\Documents and Settings\All
Users\Application Data\Symantec\Norton AntiVirus\Tasks\mycomp.sca"
C:\Windows\System32\shutdown.exe -s

What can I do to get around this.
 
D

Dave Patrick

Give this a go.

http://www.autoitscript.com/AutoIt/downloads.php

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| I'm trying to create a batch file (new at this) to run a Norton
| Antivirus system scan and then shutdown the computer. The problem I have
| is at the end of the scan, Norton pops up a box saying the scan is
| complete and wants me to click on the "Finish" button. This window is
| preventing the batch file from continuing. I don't want to use a timeout
| command as the scans are sometimes different lengths of time.
|
| Here is the batch file code:
|
| C:\PROGRA~1\NORTON~2\Navw32.exe /TASK:"C:\Documents and Settings\All
| Users\Application Data\Symantec\Norton AntiVirus\Tasks\mycomp.sca"
| C:\Windows\System32\shutdown.exe -s
|
| What can I do to get around this.
| --
| ____________
| Robert
 
D

DanR

Robert said:
I'm trying to create a batch file (new at this) to run a Norton
Antivirus system scan and then shutdown the computer. The problem I
have is at the end of the scan, Norton pops up a box saying the scan
is complete and wants me to click on the "Finish" button. This window
is preventing the batch file from continuing. I don't want to use a
timeout command as the scans are sometimes different lengths of time.

Here is the batch file code:

C:\PROGRA~1\NORTON~2\Navw32.exe /TASK:"C:\Documents and Settings\All
Users\Application Data\Symantec\Norton AntiVirus\Tasks\mycomp.sca"
C:\Windows\System32\shutdown.exe -s

What can I do to get around this.

Try adding the switch /s or /silent to the norton command line.
 
P

Pegasus \(MVP\)

Robert said:
I'm trying to create a batch file (new at this) to run a Norton
Antivirus system scan and then shutdown the computer. The problem I have
is at the end of the scan, Norton pops up a box saying the scan is
complete and wants me to click on the "Finish" button. This window is
preventing the batch file from continuing. I don't want to use a timeout
command as the scans are sometimes different lengths of time.

Here is the batch file code:

C:\PROGRA~1\NORTON~2\Navw32.exe /TASK:"C:\Documents and Settings\All
Users\Application Data\Symantec\Norton AntiVirus\Tasks\mycomp.sca"
C:\Windows\System32\shutdown.exe -s

What can I do to get around this.

If Norton does not have a "Silent" switch then you can do this instead:

@echo off
start /b "Norton" "c:\program files\..." /task:"c:\..."
shutdown

You should also have a closer look at the switches available
for shutdown.exe. You probably need the "force a shutdown"
switch. And please go easy with your crossposts. That's a
lot of newsgroups you list for such a simple question!
 
R

Robert

I tried both suggestions and when I use these Norton starts to run but
the computer goes into shutdown right away, it does not wait until
Norton finishes it's scan. Any ideas?
Thanks Again.
Robert
 
P

Pegasus \(MVP\)

Add a loop that suspends the shutdown until Norton has
finished its job, e.g. like so:

:again
tlist | find /i "Norton" || goto Continue
ping localhost -n 60 > nul
goto again

:Continue
shutdown /.. /..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top