How do I creata batch file which runs a command line program?

I need to run a batch file which will include the switches necessary to clear locally cached profiles from a machine by running the program 'DeleteProfiles.exe'. As I say, the tool requires a command line with the required configurations switches in order for it to perform the required functionality.. I need to be able to simply run the batch and have the profiles cleared from a (XP Pro) client. The switches the rpogram uses allows the user to set things like how old the deleted profiles should be, which ones to leave etc..

Many thanks as always
DJMarcoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AnilKumarSharmaCommented:
In your bat file, you may need to put the line of starting your program like DeleteProfiles.exe as follows:-

start DeleteProfiles.exe

If this program supports the arguments then those can be provided after giving the file name.
0
HVHSTechCommented:
@echo off
delprof /d:15 /q /i /c:\\COM0006

delprof /d:15 /q /i /c:\\COM0009

delprof /d:15 /q /i /c:\\COM0010
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Al JeeCommented:
HVHSTech has nailed it.

I would recommend adding a remark at the beginning that describes the function of the bat file.  [ old school, but a very handy habit ]

Add this:

REM - Batch file deletes the below listed XP profiles


It won't show unless you/someone edits the file.
0
HVHSTechCommented:
agreed
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.