View Full Version : Batch Files
Grimreaper
10-31-07, 02:44 PM
I'm wanting to make a batch file that opens two programs at the same time. I've looked around on the internet and tried to understand how to do it but whatever I do I can't get it to work. The most I got it to do was open one program. Anyone know anything about how to do this?
chris000001
11-02-07, 04:10 AM
i do, writing start up batch files are fun, i wrote one for my media center that mapped 5 network drives and opened 2 apps and did a few other things
i do, writing start up batch files are fun, i wrote one for my media center that mapped 5 network drives and opened 2 apps and did a few other things
care to explain more? ... or possibly write a small guide on how to do this? I am not much of a programmer myself and am in need of a batch file like this as well.
cancel that .... just remembered how to do it lol. but I do have one question though
I did a test file just to make sure I was right ... and I can get it to open say media player and outlook express ... but I cant get it to open ad aware se
are batch files microsoft snobs or am I doing something wrong here lol.
Grimreaper
11-02-07, 03:28 PM
Yea man, care to explain? I can't remember what commands I used, it was a while ago. But a guide or overview of the commands would be much appreciated.
jdrom17
11-02-07, 06:05 PM
I believe:
NET USE
[devicename | *] [\\computername\sharename[\volume] [password | *]]
[/USER:[domainname\]username]
[/USER:[dotted domain name\]username]
[/USER:[username@dotted domain name]
[/SMARTCARD]
[/SAVECRED]
[[/DELETE] | [/PERSISTENT:{YES | NO}]]
NET USE {devicename | *} [password | *] /HOME
NET USE [/PERSISTENT:{YES | NO}]
Is the command you want for mapping network drives. At least it's the one I use and it works.
Opening an exe as simple as just typing up the full path such as
%SystemRoot%\ehome\ehshell.exe
For Media Center in Vista. If there's spaces in the file path, wrap " " around it.
Grimreaper
11-02-07, 06:12 PM
I just want to be able to open two instances of F@H. Right now I have to open up each individual instance and I know batch files can do it, just don't know how. I know, I'm lazy...wanting to click 2 times instead of 4 lol. But us enthusiasts gotta have things our way
Yea man, care to explain? I can't remember what commands I used, it was a while ago. But a guide or overview of the commands would be much appreciated.
if you are on xp .. ( i guess vista would be the same )
hit start - help and support - Use Tools to view your computer information and diagnose problems (under pick a task menu) - command line reference a-z (on left scroll menu)
will give you all the commands you could ever want.
but if you just want it to open a few programs just go to your text pad and type this
--------------------------------------------
start (your program name)
start (your program name)
ex:
start msimn.exe
start WMPLAYER.EXE
-------------------------------------------
then save as .BAT
I still cant figure out why I can only get MS programs to work though lol.
chris000001
11-02-07, 09:02 PM
I still cant figure out why I can only get MS programs to work though lol.
for non ms apps you have to give the extension to the app.
c:\program files\itunes\itunes.exe
doesnt seem to be working for me though ... i can get photoshop to work ... but everything else just doesnt seem to want to work o_O
chris000001
11-02-07, 09:23 PM
hmmmm i havent run into that problem
Grimreaper
11-03-07, 05:04 AM
I still can't seem to get it to work. I put in the path directly to the programs so it looked like this.
Start C:\Program Files\Folding@Home\1\FAH4-Console.exe
Start C:\Program Files\Folding@Home\2\FAH4-Console.exe
it DOES try and open two apps....the only problem is it's trying to open "C:\Program" so it's having trouble with spaces. I've seen address with "&" in place of spaces and I tried that but it was still a no go.
that seems to be the problem I am having .... if you make a shortcut to the program you want to run on say the root of C:\ and make your batch file point to that shortcut. I just tried it with a program that was doing the same problem as you are having and it worked. .... give it a try ... it worked for me.
jdrom17
11-03-07, 12:27 PM
Try using this:
start %programfiles%\Folding@Home\1\FAH4-Console.exe
Grimreaper
11-03-07, 11:44 PM
Still gives me the same error about finding "C:\Programs". I can't believe it's this difficult to make a batch file sometimes.
yahooadam
11-04-07, 07:33 PM
what about start "%programfiles%\Folding@Home\1\FAH4-Console.exe"
It sounds like a problem with the space between Program and Files
Grimreaper
11-04-07, 10:12 PM
It opens two command prompts with the path names to the files in each header respectively. No error though, so thats a start. Once inside the command prompt it just sits at C:\Documents and Settings\Administrator\Desktop in both of them. I've tried various naming schemes by putting the % in different spots and adding c:\ and nothing works...I couldn't began to remember which ones I've tried.
did you try my shortcut suggestion?
Grimreaper
11-05-07, 12:38 PM
I will try that, but I'm currently not at my desktop. Been experimenting with Linux on my laptop and having to rack my brain about all the new crap I'm learning how to do. :sniper:
vBulletin® v3.7.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.