Go Back   Steam Users' Forums > Steam Game Discussions > H - L > Just Cause series

Reply
 
Thread Tools Display Modes
Old 05-11-2010, 07:13 PM   #1
Detroit Matt
 
Guest
Posts: n/a
Cannot launch from batch file/command prompt

Launch JC2 from command prompt/batch file

So I was getting tired of forgetting to boot Bolopatch, and decided to try to combine the two shortcuts on my desktop into a single (verrry simple) batch file

Code:
@echo off
"C:\Steam\steamapps\Common\Just Cause 2\JustCause2.exe"
"C:\Users\Matt\Desktop\BOLOPatch.exe"
but when JC2 launches, the program stops responding and gives me a generic "stopped working" windows 7 error. Dismissing the error launches Bolopatch, which says it can't detect JC2 running, and closes.

Any ideas?
 
Reply With Quote
Old 05-11-2010, 07:26 PM   #2
moosenukes
 
 
 
Join Date: Sep 2008
Reputation: 348
Posts: 3,067
Try replacing the second line with this

"C:\Steam\steam.exe" -applaunch 8190
moosenukes is offline   Reply With Quote
Old 05-12-2010, 04:26 PM   #3
Detroit Matt
 
Guest
Posts: n/a
Ok, got that to work, but a new problem cropped up: Bolopatch won't launch, presumably because JC2 is still running or something. I modified the code to

Code:
JC2.BAT
@echo off
start c:/users/Matt/Desktop/Bolo.bat
"c:/steam/steam.exe" - applaunch 8190
Code:
BOLO.BAT
@echo off
c:/users/Matt/Desktop/Bolopatch.exe
Bolo still doesn't work. I think I need a way to delay bolo's launching, but wait/pause/sleep don't work. Anyone know a way to get a batch to wait 60 seconds before executing next command?
  Reply With Quote
Old 05-12-2010, 05:17 PM   #4
moosenukes
 
 
 
Join Date: Sep 2008
Reputation: 348
Posts: 3,067
You can use the ping command to make it wait a few seconds, try this

Code:
@echo off
"c:/steam/steam.exe" -applaunch 8190
ping 127.0.0.1
c:/users/Matt/Desktop/Bolopatch.exe
You can repeat the ping if you need it to wait longer, and there should not be a space between - and applaunch.
moosenukes is offline   Reply With Quote
Old 05-13-2010, 03:06 PM   #5
tonysugantino
 
Join Date: May 2010
Reputation: 0
Posts: 14
The issue you're hitting boils down to how batch files wait for the program started to end before going to the next line. So really what happens is Just Cause 2 starts up and the batch command stops until Just Cause 2 closes. Then afterwards you get that Bolo error cause Just Cause 2 isn't running (as it was already closed just before).

To get it working correctly, you need to reference the Just Cause 2 shortcut (ends in .lnk). I'd also have the bolo program referenced via the shortcut too so that way you're running your game and bolo and the batch command is said and done and out of the picture.

Make a folder in your Just Cause 2 directory called "Launch".
Stick two shortcuts in there one pointing to Just Cause 2 and the other Bolo (the exe's). Keep in mind what you name those shortcuts cause that's what you'll be referencing in your batch file. Then create the batch file in that folder as well and it would look something like this:

@echo off
".\Just Cause 2.lnk"
".\Bolopatch.lnk"
tonysugantino is offline   Reply With Quote
Old 05-13-2010, 03:11 PM   #6
tonysugantino
 
Join Date: May 2010
Reputation: 0
Posts: 14
Years ago, doing what you did before would've worked in legacy versions of Windows (such as 98 and Me). I remember with Windows 2000 and later batch files have worked the way I described above.
tonysugantino is offline   Reply With Quote
Old 05-14-2010, 07:28 AM   #7
ToxicFork
 
Join Date: Nov 2009
Reputation: 12
Posts: 102
Bolopatch tequires the game to be at least in the main menu
ToxicFork is offline   Reply With Quote
Reply

Go Back   Steam Users' Forums > Steam Game Discussions > H - L > Just Cause series


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -7. The time now is 10:10 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site Content Copyright Valve Corporation 1998-2014, All Rights Reserved.