Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch file switches

Status
Not open for further replies.

Tendaz

Technical User
Mar 5, 2003
9
ZA
does anyone know of any websites that has a list of all the different batch file switches and what each one does.

i'm trying to run a batch file over SMS without the user being logged on, however, the program needs input from the user by selecting yes or no. is there a way i can have Yes as the default option in the batch file?
 
I wonder if
ECHO "Y" | you_batch_file_name
can help.
 
well, each command has its own set of switches and cant be assumed the same switch means the same for another command. and some require the switch in the middle of the command rather than at the end. Is there a command in particular that you are interested in? Win2000 and XP have very good help files available via the F1. Check out for tips and tricks
in batch files. very helpful site.
if your batch file calls an .MSI you can put a switch that runs it silent.
 
Tendaz
What Batch File means to you.

If it is command cmd.exe, than see in help.

If it is somebody's Batch file than it has to handle input parameters passed to it.

There is no way to run Batch file if file does not handle passed parameters.

Yes, there is the way to have Yes as the default option.
Developer needs to create the solution.
Here is quick one.
If program is called and parameter is not passed than programm logic should consider it as YES.

Hope it helps.

vjc000
 
Correction,
I said:
...There is no way to run Batch file if file does not handle passed parameters...

In context of passing parameters, I mean it is nonsense to pass parameter to batch file if file does not handle passed parameters.

vjc000
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top