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?

[Webinar] Streamline your web hosting managementRegister Today

x
 
HVHSTechConnect With a Mentor Commented:
@echo off
delprof /d:15 /q /i /c:\\COM0006

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

delprof /d:15 /q /i /c:\\COM0010
0
 
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
 
Silver ShroudCommented:
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
All Courses

From novice to tech pro — start learning today.