project reality header
Go Back   Project Reality Forums > PR:BF2 Mod Forums > PR:BF2 General Discussion
PR Time:
Register Forum RulesDeveloper Blogs Project Reality Members List Search Today's Posts Mark Forums Read
PR:BF2 General Discussion General discussion of the Project Reality BF2 modification.

Contact Support Team Frequently Asked Questions Register today!

Reply
 
LinkBack Thread Tools Display Modes
Old 11-22-2009, 06:58 AM   #1
Johnboy113

Johnboy113's Avatar
Default Launch PR from batch file

Hi all,

recently returned to PR after a long break and would like to run PR from a batch file.
This is so i can kill extraneous processes before game launch and free some ram up.

i use the taskkill command to force kill the apps i dont need running behind PR (rainlendar 2, Thunderbird, firefox etc) but when i try to put in the command for launching PR it tells me it cant find the exe, even tho it is there and i can see it. i pasted the path from the exe properties window.

Here is the text from my .cmd file:

@echo off
rem Thunderbird off
taskkill /f /IM thunderbird.exe
rem rainlendar off
taskkill /f /IM rainlendar2.exe
rem lexmark off
taskkill /f /t /PID 1964 /PID1260
taskkill /f /t /IM lxdimon.exe
rem RocketDock off
taskkill /f /IM RocketDock.exe
rem Firefox off
taskkill /f /IM firefox.exe
C:\Program Files\EA GAMES\Battlefield 2\mods\pr
start pr.exe
exit

The printer stuff always uses the same PID so i can use PID there but the other stuff has diff PID every launch so i use /IM to kill those.

So my question is: How do I launch PR from command line?

Thanks in advance. Johnboy.
Johnboy113 is offline Reply With Quote
Old 11-22-2009, 07:51 AM   #2
Johnboy113

Johnboy113's Avatar
Default Re: Launch PR from batch file

Figured it out.

Make folder in C: called Batches.
Make shortcut from "C:\Program Files\EA GAMES\Battlefield 2\mods\pr\pr.exe" and place in Batches folder.
Set batch file to reference that shortcut as shown in the batch file below.

@echo off
rem Thunderbird off
taskkill /f /IM thunderbird.exe
rem rainlendar off
taskkill /f /IM rainlendar2.exe
rem lexmark off
taskkill /f /t /PID 1964 /PID1260
taskkill /f /t /IM lxdimon.exe
rem RocketDock off
taskkill /f /IM RocketDock.exe
rem Firefox off
taskkill /f /IM firefox.exe
re run pr
start C:\Batches\projectreality.lnk
cls

this successfully kills the listed non essential programs, freeing up ram, then launches PR.
Johnboy113 is offline Reply With Quote
Old 11-22-2009, 02:45 PM   #3
Psyrus
Default Re: Launch PR from batch file

Pretty good idea, although mine would include mumble launching & teamspeak launching. As well as auto-logging me into my PR account ^_^

Oh, and 2gb of ram is extraordinarily cheap these days (think US$50 and below for both ddr2 & 3), perhaps consider the investment?


To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts.
(
To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts.
) (
To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts.
)

To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts.
Psyrus is offline Reply With Quote
Old 11-22-2009, 04:23 PM   #4
Su34
Default Re: Launch PR from batch file

Well, autologin for your Account ist pretty easy:
Just change the "path-line" of the short-cut (I suppose you can also use a shor-cut to start PR with the batch-file) into: "Your Path:\EA GAMES\Battlefield 2\mods\pr\pr.exe" +playerName "your loginname" +playerPassword "your password" +restart"

The "+restart" switches off all the intros of the game
Su34 is offline Reply With Quote
Reply


Tags
batch, batch file, file, launch, memory
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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 05:40 PM.


Powered by: vBulletin. ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO.
All Content Copyright ©2004 - 2012, Project Reality.