Discussion:
how do you run a batch file?
(too old to reply)
Bob Smith
2004-02-26 04:24:23 UTC
Permalink
I'm trying to run some script from the "run" line in scheduled tasks in win
2000. I have a program I want to run automatically (ad-aware) I've been able
to figure out 3 lines of code which will run the required program and do the
required maintenance. trouble is, I'm not that tech savy and I've been told
I need to run the code as a "batch file", I'm not sure how to do that.

The 3 lines of code I need to run are as follows:

"C:\Program Files\Lavasoft\Ad-Aware 6\Ad-Aware.exe" +c +1
"C:\Program Files\Lavasoft\Ad-Aware 6\Ad-Aware.exe" C:\ +a +1
"C:\Program Files\Lavasoft\Ad-Aware 6\Ad-Aware.exe" D:\ +a +1


The first line scans the registry, the second line scans the files on C
drive, the third line scans the files on D drive. when I run them separately
from the "run" line in scheduled tasks, they do the required function OK,
however I need them to all work together. Someone told me they need to run
in a "batch file" I'm not sure what that means or how to do it. Can anyone
offer some help?


Thanks
Bob
Peter Boulding
2004-02-26 10:47:45 UTC
Permalink
On Wed, 25 Feb 2004 21:24:23 -0700, "Bob Smith"
Post by Bob Smith
I'm trying to run some script from the "run" line in scheduled tasks in win
2000. I have a program I want to run automatically (ad-aware) I've been able
to figure out 3 lines of code which will run the required program and do the
required maintenance. trouble is, I'm not that tech savy and I've been told
I need to run the code as a "batch file", I'm not sure how to do that.
"C:\Program Files\Lavasoft\Ad-Aware 6\Ad-Aware.exe" +c +1
"C:\Program Files\Lavasoft\Ad-Aware 6\Ad-Aware.exe" C:\ +a +1
"C:\Program Files\Lavasoft\Ad-Aware 6\Ad-Aware.exe" D:\ +a +1
The first line scans the registry, the second line scans the files on C
drive, the third line scans the files on D drive. when I run them separately
from the "run" line in scheduled tasks, they do the required function OK,
however I need them to all work together. Someone told me they need to run
in a "batch file" I'm not sure what that means or how to do it. Can anyone
offer some help.
This is really the wrong newsgroup for a query like this - it's
for people who create online help for Windows programs.

As regards creating a batch file, you simply enter the commands -
in the way you have typed them above - into a plain text file
(e.g. as created with a text editor such as notepad, not a word
processor such as Word) and save the file as
whatever_you_want_to_call_it.bat. Then, to run the commands, you
simple enter to the "run" field (or to the task scheduler)
path_to_your_batch_file\whatever_you_called_it.bat - e.g.

C:\MyBatchFiles\AdAware.bat

I can't help you work out how to run the above three commands as
one, since I know nothing about Ad-Aware command line switches,
but normally you would use a single command with multiple
switches. (If you can do this, you hardly need the batch file,
of course). Why not check out the Lavasoft forums?
--
Regards Peter Boulding
***@UNSPAMpboulding.co.uk (to e-mail, remove "UNSPAM")
Fractal gallery: http://www.pboulding.co.uk/
Fractal music: http://www.pjbmusic2.freeserve.co.uk/
Loading...