# Dos Batch Files



## DarrenW (Jul 19, 2000)

i'm getting into dos batch files and have created some to run in Win98 Scheduled Maintenence...one question...is there a switch you can use for a program that usually requires user input to run (ie. a mouse click or a selection from a list of choices)?


----------



## mole (Aug 24, 1999)

DarrenW,

You can use a *.pif file with a "?" as the command line parameter to start a batchfile. First a dialog box will open and whatever you type into the box will get sent to the batch as %1. Right click a pif put something in the commandline box like this:

c:\bat\mybatch.bat ?

You can also use the old Pifedit.exe program from Windows 3x to create your pifs, I find it quicker from the command prompt than Explorer, though it is limited in some respects (8x3 names for one), it will take UNC names.

The Start.exe program can also perform a shell execute from a batch and give you some flow control over you programs. Use the /w to wait, /max to run maximized, /m to run minimized and so on.

Rob's Scripting Page has some good info on batches.

Let me know if you need more help. How much snow do you have up there now?

mole


----------



## DarrenW (Jul 19, 2000)

thanks mole, that's exactly what i was looking for. as for snow...actually we've had about an inch so far but its all melted. i live in the "chinook" belt.

[This message has been edited by DarrenW (edited 11-15-2000).]


----------



## mole (Aug 24, 1999)

Glad that helped. I should also have mentioned that you can use any command line parameter with a *.pif that you would use with the *.bat that it runs. 

Nice to hear from your part of the world. Havn't been out to the Rockies since 1998 and the DC metro area is driving me nuts.

mole


----------

