Computing.Net > Forums > Programming > batch RUN command

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

batch RUN command

Reply to Message Icon

Name: FBI Agent
Date: April 8, 2005 at 08:41:48 Pacific
OS: WIN XP
CPU/Ram: 1.79Ghz/ 384 RAM
Comment:

is there a way to run programs using a batch file? i want to just double click on the batch file and have certain programs open up, like... windows media player for example and notepad for example just by clicking on the batch file. i can do the directories for it, i just need the synatx if this is possible. thanks!

FBI Agent

AIM: EliteAssassin187



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: April 8, 2005 at 09:28:15 Pacific
Reply:

Sure,

A batch file basically [among other things] does the same with a line like:

notepad my.txt

as typing it at the prompt and pressing ENTER.

BTW, notepad ain't DOS and if you're using XP, that ain't DOS either.

The default batch processor in XP is cmd.exe, which will do the job.

M2


If at first you don't succeed, you're about average.


0

Response Number 2
Name: FBI Agent
Date: April 8, 2005 at 11:04:06 Pacific
Reply:

hmmm... well i can do it running notepad but is there a... ok, nm. i got it. so the first thing you put in it the location of the exacutable and the second one is the location of the file you're opening with the exe.

i was just planning on using it to open like yahoo and MSN or something when i wanna talk with people, however, i think i can find a lot more usefull things than that now but i'll have to test them out to see if they actually work. thanks a lot Mechanix2Go!

FBI Agent

AIM: EliteAssassin187


0

Response Number 3
Name: InfiniteRecursion
Date: April 8, 2005 at 12:20:48 Pacific
Reply:

You can also use:


start sol.exe

(this will open up solitare)


0

Response Number 4
Name: FBI Agent
Date: April 11, 2005 at 21:45:56 Pacific
Reply:

well it only works with certain programs, so you'll usually have to set up the location.

FBI Agent

AIM: EliteAssassin187


0

Response Number 5
Name: wagad
Date: April 19, 2005 at 07:43:14 Pacific
Reply:

thanks for your help but it hasnt helped, i can alredy write code for opening two programs but this one doesnt like it i think i need to start it in a different folder, as i said in my first post!


0

Related Posts

See More



Response Number 6
Name: Mechanix2Go
Date: April 19, 2005 at 08:37:06 Pacific
Reply:

You've got two issues.

1. The path. If an executable is in the path, you can run it from anywhere.

2. The path you want to be working in.

If the files you want to work with are in:

d:\mystuff

you'd want to start your batch with:

d:
cd \mystuff
start "" someprog.exe myfile.wks

HTH

M2


If at first you don't succeed, you're about average.


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: batch RUN command

batch file command? www.computing.net/answers/programming/batch-file-command/13574.html

Batch file commands help ! www.computing.net/answers/programming/batch-file-commands-help-/16201.html

Simple Batch File command help www.computing.net/answers/programming/simple-batch-file-command-help/16568.html