Page 1 of 1

PRBF2.exe - Remove process ID from window title

Posted: 2014-09-07 18:38
by Senshi
Please remove the process ID from the window title/classname.

Currently the window title looks like:
"PRBF2 (1.5.3153-802.0, pid:2156)"
As the PID changes on every launch, secondary applications that require a static title will not be able to remember settings.

Hence, a proper window title would be:
"PRBF2" or
"PRBF2 (1.5.3153-802.0)"

Specifically WindowedBorderlessGaming.exe is unable to remember settings due to this.

Re: PRBF2.exe - Remove process ID from window title

Posted: 2014-09-08 03:40
by LITOralis.nMd
Open Broadcast Software also can not keep track of the PR window because of this.

When PR crashes while broadcasting, the broadcaster has to manually refresh the sources to find the new PR window name each time.

Re: PRBF2.exe - Remove process ID from window title

Posted: 2014-09-08 19:00
by GameplayCrush
Windowed Borderless Gaming is able to remember it.

In the global settings you will have to change one of the triggers to check without title.

So to have the game change with a hotkey (default F4) go to the "force key" section and check the checkbox that says "Check for window class and process"

To have it managed automatically do the same but in the "Automonotoring section".

Now it will not check for window title IF you remove the window title from the game settings.
Windowed Borderless Gaming > Game settings > your game > Remove title from identifier.

Re: PRBF2.exe - Remove process ID from window title

Posted: 2014-09-09 12:17
by BloodyDeed
This is hardcoded, can not be changed.

Re: PRBF2.exe - Remove process ID from window title

Posted: 2014-09-09 19:58
by LITOralis.nMd
Is it possible to not call the unique PID to the Title bar?

Alternatively.
Is it possible to write an autohotkey script to obfuscate the title bar text to remove the PID? That might be a workaround for us.

Re: PRBF2.exe - Remove process ID from window title

Posted: 2014-09-09 20:01
by LITOralis.nMd
GameplayCrush wrote:Windowed Borderless Gaming is able to remember it.

In the global settings you will have to change one of the triggers to check without title.

So to have the game change with a hotkey (default F4) go to the "force key" section and check the checkbox that says "Check for window class and process"

To have it managed automatically do the same but in the "Automonotoring section".

Now it will not check for window title IF you remove the window title from the game settings.
Windowed Borderless Gaming > Game settings > your game > Remove title from identifier.
A bit of help:

From this:

Code: Select all

[Global_Config]
AutoSetResolution=always
DefaultDeskTopWidth=1920
DefaultDeskTopHeight=1080
AutoSetOffset=never
DefaultPosX=0
DefaultPosY=0
KeyBind1_AddWindow=72
KeyBind1_ForceBorderless=73
KeyBind2_ForceBorderless=73
ForceKeyCheckTitle=always
ForceTriggerCheckTitle=always
AddWindow_Confirmation=never
LastUsed=PRBF2 (1.5.3153-802.0, pid: 10576)
ForceBorderlessKeyEnabled=always
[Title :P RBF2 (1.5.3153-802.0, pid: 10576);Class :P RBF2 (1.5.3153-802.0, pid: 10576)]
Process=PRBF2.exe
Style=349110272
friendlyname=PRBF2 (1.5.3153-802.0, pid: 10576)
Width=1920
Height=1080
To this: ???

Code: Select all

[Global_Config]
AutoSetResolution=always
DefaultDeskTopWidth=1920
DefaultDeskTopHeight=1080
AutoSetOffset=never
DefaultPosX=0
DefaultPosY=0
KeyBind1_AddWindow=72
KeyBind1_ForceBorderless=73
KeyBind2_ForceBorderless=73
ForceKeyCheckTitle=always
ForceTriggerCheckTitle=always
AddWindow_Confirmation=never
LastUsed=PRBF2 (1.5.3153-802.0, pid: 10576)
ForceBorderlessKeyEnabled=always
[b][Title:][/b]
Process=PRBF2.exe
Style=349110272
friendlyname=PRBF2 (1.5.3153-802.0, pid: 10576)
Width=1920
Height=1080
Question is, for the [Title:] part, do I remove the entire line, comment it out (what is the comment variable), keep the [Title:] or remove it completely???

Re: PRBF2.exe - Remove process ID from window title

Posted: 2014-09-09 20:27
by Mats391
[R-COM]LITOralis.nMd wrote:Is it possible to not call the unique PID to the Title bar?

Alternatively.
Is it possible to write an autohotkey script to obfuscate the title bar text to remove the PID? That might be a workaround for us.
The AHK one surely works. I am detecting the window already by partial name for some scripts i use, so no problems there.

Re: PRBF2.exe - Remove process ID from window title

Posted: 2014-09-09 20:33
by GameplayCrush
'[R-COM wrote:LITOralis.nMd;2033512']A bit of help:

From this:
[SNIP]
Question is, for the [Title:] part, do I remove the entire line, comment it out (what is the comment variable), keep the [Title:] or remove it completely???
Are you on a old version not to have these options?

Anyways i thought it was just the title, not the title AND class, so the method i posted still wont work. :-(

Re: PRBF2.exe - Remove process ID from window title

Posted: 2014-11-29 19:02
by LakeMole
I made a little hotkey script to change the window title to just PRBF2.
http://i.imgur.com/aSkU2gV.jpg

You can download the compiled script:

https://www.mediafire.com/?u686i01d9zxy7j7
PRBF2 Standard Window Title???exe (202,21 KB) - uploaded.net

Place it in your pr bin folder. ie. E:\Program Files (x86)\EA GAMES\Battlefield 2\mods\pr\bin.
Run it as admin.


If you don't want to download my file, you can compile it yourself in autohotkey. (It still needs to be run as administrator and still needs to be in the pr\bin folder.)

Code: Select all

Run, PRLauncher.exe
WinWaitActive, PRBF2
WinSetTitle, PRBF2
It runs prlauncher and waits for the main prbf2 window to appear. When it finds the window it changes the title to just PRBF2.

Re: PRBF2.exe - Remove process ID from window title

Posted: 2014-12-01 07:14
by Psyrus
LakeMole wrote:I made a little hotkey script to change the window title to just PRBF2.

It runs prlauncher and waits for the main prbf2 window to appear. When it finds the window it changes the title to just PRBF2.
Nice work, that should be helpful for some people :D