1.

Solve : run a program in a .bat file...read on?

Answer»

Ok, I want to make a .bat that runs Pinball. I have this...

pause
start /MAX C:\Documents and Settings\All Users\Start Menu\Programs\Games

But it says that it cant find the C:\Documents and Settings.....any ideas?Quote

Ok, I want to make a .bat that runs Pinball. I have this...

pause
start /MAX C:\Documents and Settings\All Users\Start Menu\Programs\Games

But it says that it cant find the C:\Documents and Settings.....any ideas?

Wow, I might actually know this one... is the "C:\Documents and Settings\All Users\Start Menu\Programs\Games" in quotation marks?If you want to use the shortcut, the line should be:
"C:\Documents and Settings\All Users\Start Menu\Programs\Games\Pinball.lnk"
Note: that you left off the name of the shortcut: Pinball.lnk

But, why not skip the start menu & shortcut all together. Go to Start, Programs, Games: Them Right CLICK on Pinball, Properties. The TARGET should be highlighted already. Right Click on the target name, Click Copy. Then paste the target into your batch file. In XP it will be: "C:\Program Files\Windows NT\Pinball\PINBALL.EXE". It could be different in other Installations. I usually skip the start COMMAND. I don't know why, but it seems to work better without it.

Correction on 04/05/2008:

Do not skip the start command when starting a program in a batch file. It does NOT work better without it.

For more information see the following more recent topic with a similar problem & resolution.

I need help again with a script file... ANYONE STILL UP TO HELP ME??
Ah, I know that looked a little wrong.

Yeah, I think TARGETING the actual .exe in your program files should be better. I don't know if it will make much difference in this specific context, but if you happen to move or delete a shortcut but the program is still installed, it'll still give ya an error, whereas if it was linked to the program, it'd be fine. I'm always moving around the shortcuts on my desktop, and it would be a pain if I had to CHANGE my .bat file every time.It helps actually using the 'start' command because then the CMD window will close after the game opens up.Use the /B switch, And the command window won't open up at all.
START /B DRIVE:\PROGRAM.XXXI'm not familiar with /B (I'm pretty much a neophyte myself...) what does that stand for? in what context can I use it?Try Start /? first. Then experiment. Trial and error is your best teacher. I spent about 10 hours on my last batch file, writing, reading help, testing, and debugging a little bit at a time.If all you are really trying to do is run pinball, why not just put a shortcut on the desktop?


Discussion

No Comment Found