PDA

View Full Version : very simple .bat file (W2K)



crono_79
12-21-2002, 07:41 PM
im trying to make a very simple .bat file
the goal is to open 3 different apps just double-clicking on this bat file.
i've tried to do it, but the only thing i hve accomplished is open one app. and then close it so the bat go to next line and open next app...

how can this be done?

and after this is done it will be useful if the cmd window closed by itself


thanks everyone

BertImmenschuh
12-21-2002, 09:18 PM
I wonder if the batch file should, instead of opening the 3 programs, Call 3 additional separate batch files that open the programs individually?

Good judgement comes from experience, and experience comes from bad judgement

Jama
12-21-2002, 09:55 PM
Use the start command to launch your apps.

start notepad
start cmd
start calc

Create a shortcut to the batch file, right-click the shortcut and select properties then run Minimized. When you run the batch file, you won’t see the command window and it should close once it finishes.

Alternatively, use this vbscript file. Copy what’s between the lines into Notepad and save it as Something.VBS.
Replace the value of App1, 2 and 3 with the full path to your applications (surround in double quotes).

----------------------------------------------------------------------------------------
App1 = "%SystemRoot%\System32\calc.exe"
App2 = "%SystemRoot%\system32\notepad.exe"
App3 = "%SystemRoot%\System32\freecell.exe"

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.run App1, 1, False
WshShell.run App2, 1, False
WshShell.run App3, 1, False
Set WshShell = Nothing
----------------------------------------------------------------------------------------

Jama

crono_79
12-22-2002, 09:19 AM
thanks jama, that worked great

both ways worked, the bat and the vbs, so i have to choose now =)

farm_boy
05-25-2003, 12:54 PM
Take the pain out of batch files -it worked for me! Use Easy Batch Builder from octo***** software. www.octosoft.co.uk