[help] Using .bat's To Start Games

I need some help with writing a .bat file to close Y'z Dock, start a game, then restart Y'z Dock once the game is closed.

So far I've got it all working correctly. Y'z Dock ends, game starts, y'z dock starts up again.

But . . . the problem is that once the game is closed and y'z dock started again, the command prompt window doesn't close.

Here is what the code currently looks like:

taskkill /F /IM YzDock.exe
cd\Program Files\Call of Duty
"CoDMP.exe"
"C:\Program Files\Y'z Dock\YzDock.exe"
exit

The command prompt is waiting for yzdock.exe to be ended again before it moves on to the exit command. Is there anyway to get around this so it will execute that command without me having to close yzdock?

TIA,

Tek

#121191

If CoDMP.exe is not a DOS application it should read as follows:

taskkill /F /IM YzDock.exe
cd\Program Files\Call of Duty
start /w "CoDMP.exe"
"C:\Program Files\Y'z Dock\YzDock.exe"

save it as c:\cod.cmd

try naming the shortcut %windir%\System32\cmd.exe /c c:\cod.cmd

this will surely close the box.

PS: Don't put that shortcut onto yzdock, use a desktop or taskbar shortcut instead.

hth,

herd

#121234

herd- that didn't work

but don't matter, thanks to that link from sid ;)

#121486

With directory paths that have sapcees you need "quotes"

as here:

taskkill /F /IM YzDock.exe
cd "C:\Program Files\Call of Duty"
start /w "CoDMP.exe"
"C:\Program Files\Y'z Dock\YzDock.exe"
exit

#121492

Did you try that code, b/c it doesn't work for me >.

#121495

I dont use yz dock or that game...

Try this

taskkill /F /IM YzDock.exe
cd "C:\Program Files\Call of Duty"
CoDMP.exe
cd "C:\Program Files\Y'z Dock\"
YzDock.exe
exit

You don't need the start command to launch a Windows executable, CMD can work just like "Run" in the start menu.

#121499

Why are you breaking your head over this? Did you see my post?

http://www.aqua-soft.org/board/index.php?showtopic=11119

#121502

Originally posted by TekMonkey@Feb 29 2004, 05:09 AM

herd- that didn't work

but don't matter, thanks to that link from sid ;)

I'm not breaking my head over this, I'm just replying to these other guys. See ^^^, I aknowledged it ;)

The one problem I have with that program, Sid, is that I want to have a folder on my dock with shortcuts to close y'zdock and launch games. Since normal shortcuts don't have the arguments box, its a little more tricky.

In Y'z Dock, the shortcuts look like this:

Link to: C:\Programs\Y'z Dock\DockTool.exe

and

Arguments: C:\Programs\BF1942\BF1942.exe

But for normal sortcuts in windows you only have the link to box and it needs to look like this:

Link to: "C\Programs\Y'z Dock\DockTool.exe" "C:\Programs\BF1942\BF1942.exe"

This works correctly, but the problem is I'm trying to create a shortcut to launch Desert Combat, a mod of BF1942, whose shortcut looks like this:

"C:\Programs\BF1942\BF1942.exe" +game DesetCombat

Making the shortcut look like this:

"C\Programs\Y'z Dock\DockTool.exe" "C:\Programs\BF1942\BF1942.exe" +game DesertCombat

launches the regular BF1942.exe and not into the DC version, so I need to figure out how to launch into DC. :(

#121721

put the +game DesertCombat in quotes as well (separate quotes). So it looks like this: "C\Programs\Y'z Dock\DockTool.exe" "C:\Programs\BF1942\BF1942.exe" "+game DesertCombat"

#122222

That doesn't work either.

I'd appreciate it if you guys could test these first, so I don't have to load the game every time ;) heh

#122709

The one I use to launch games can be found over at AquaXP. Just read the instructions in the bottom to make sure everything is in the right place.

#128071