Jump to content
Website Updates and Upgrades are still underway! We don't expect any further downtime, but we thank you for your patience as we restore themes and other elements including the Chatbox.

PRAutoLauncher


=VG= XOR

Recommended Posts

Just updated this, I've been using it for a few years & i thought not much of it, until steam login was added to the launcher a while back, figured i might save you a few lazy minutes... It's especially helpful if you tend to debug scripts/maps a lot, which involves a lot of CTD's.

  • Sorry for my brevity, i just wanted to make it's purpose & usage as clear as reasonably possible.
  • Source Included
  • Uses Acc for UI Automation

[Disclaimer]
This launcher is no shape or form affiliated with the project reality team. It was written by a lazy fk who wanted shortcuts for profiles, and  i used to have quiet a few & PRLauncher didn't let me make one, so i made one, and added a few bells & whistles.

This was written for personal use, and hence lacks a UI which i deemed  was an unnecessary addition prior to posting this as well, as you need only exercise some of that well hidden common sense that we all know is all too common, to use it. All feedback & suggestions are welcome.

[Features]
 

Spoiler

Profile Shortcuts, create a shortcut to PRAutoLauncher to launch 'Nth' profile as ordered in 'Select Profile' window in launcher
    -If the 'Nth' profile doesn't exist, i.e '6' when only '4' profiles exist, it loads the last profile that exists
CrashHandler, which restarts currently active 'Nth' profile
    -Detects Hard Crashes with a Windows Error Message or BF2 engine error Dialogue
    -Silent Crash inference which uses input detection to determine if PRBF2 termination was manually invoked, if not it assumes a silent crash
    -If Online Profile Was Launched, 10sec restart delay on crash to provide time to communicate game crash to your Squad,Driver,Gunner,...
AutoUpdate, when update is available, opens changelog before proceeding with launch
Offline Launch, when no internet connection is available it launches 'Nth' offline profile
PRLauncher automated common error resolution
    -Recursively removes readonly con file attributes
    -AutoBackup Project Reality Profile Folder on successful launch, to...
    -AutoRestore Last Working Profile Folder on PRLauncher error.
    -It backs up & restores all .con files in profile folder because launcher errors tend to be caused by corruption of profile & global con files
PRLauncher doesn't steal focus, unless it needs to, i.e initial login prompt, where in user needs to login to steam if 'Stay logged In' is disabled
[Hotkeys],you might have to alt tab to invoke these hotkeys as prbf2 tends to 'hijack' input at times
    Ctrl+Shift+Alt+Del to terminate launcher & PRBF2
    Ctrl+Shift+Del to restart launcher with current profile & PRBF2 after an extended session to avoid a midgame crash for instance
Multiple launch attempts, default 3, incase any launch attempt should be interrupted or fail for any reason

[Known Issues]
 

Spoiler

 

After it detects an update & initialises update, it locks all internal threads,as a result any errors during update will need to be resolved manually & PRAutoLauncher restarted manually as well if an error should occur, by running the shortcut again. This is to accommodate the wider range of errors possible during a game update.

Again, associated with the thread lock during & immediately following an update, it might hang for a while after an update completes, but running shortcut again, will resolve this issue as well.

You might encounter this message, 'Could not close the previous instance of this script.  Keep waiting?', you may ignore it, as it resolves itself in no more than 2sec,it's caused by a locked thread in a previous instance which'll resume waiting instance,so it's a benign prompt you may ignore.

 

[Security]
 

Spoiler

 

If your firewall is enabled, it might ask for firewall permissions, this is solely to validate an internet connection & it only ever attempts to connect to google servers,you can check the connection ip's yourself to verify as much & source should signify as much.

As with all compiled autohotkey scripts, the script resides in plain text in the executable with no compression or obfuscation applied to the compiled executable, plain text script in compiled exe can be VIEWED in 'PRAutoLauncher.exe\.rsrc\RCDATA\>AUTOHOTKEY SCRIPT<', you may use 7-zip file manager to explore the contents of the executable to this effect,just right click & 'open' with 7z.

 

[Usage]

Spoiler

 

Copy PRAutoLauncher to a location from which it won't be moved,ex; C:\PRAutoLauncher.exe, as shortcuts created are contingent on a static path
Create A Shortcut to PRAutoLauncher.exe with shortcut path like so...
        PRAutoLauncher.exe "<PRLauncher.exe Path>" <Nth Profile> <N attempts defaulting to '3'(if omitted) attempts to launch & gives up otherwise>
Examples:         

  •     "C:\PRAutoLauncher.exe" "C:\Program Files (x86)\Project Reality\Project Reality BF2\mods\pr\bin\PRLauncher.exe"  1 2

    ,will launch the first profile, in your profile selection list & makes max 2 attempts before giving up on launch

  •     "C:\PRAutoLauncher.exe" "C:\Program Files (x86)\Project Reality\Project Reality BF2\mods\pr\bin\PRLauncher.exe"  2

    ,will launch the second profile, in your profile selection list & makes default max 3(as it's omitted) attempts before giving up on launch

Done. Anytime you use these shortcuts, PR will be launched automatically with specified profile & managed automatically, that is the sole purpose of this script.

 

[To Compile Source]

  • Source will additionally self compile if run directly & instruct you to use the executable it creates, this might trigger av false positive as compilation creates a intermediate binary file in temp directory.

Download and Install AutoHotKey, then right click on 'PRAutoLauncher.ahk' and 'Compile', you may use the executable created in the same directory in place of the one provided on this post, so long as you use a compiled script regardless.


[Note To Moderator]
Attached Executable Is an non-obfuscated & non-compressed AutoHotKey executable with plain text source of compiled script within, 'PRAutoLauncher.exe\.rsrc\RCDATA\>AUTOHOTKEY SCRIPT<', as is the case with all compiled AutoHotKey scripts, accessible through any archive manager, validate source in executable is identical to source in provided source file... It's compiled as some functionality necessitated it, particularly instantiation, which was prone to malfunction when run as a script which meant it, itself  was passed as a param to AutoHotKey.exe, which caused unpredictable behaviour.

@=VG= SemlerPDX *Feel  free to remove compiled attachment, at your discretion, I'll follow your lead*

 

  File: PRAutoLauncher.exe
CRC-32: 81a286d2
   MD4: 07e1ef063b31fd3b0a1246ffc31355b7
   MD5: 47905ab9a355b49ee74c9e5cc84f9a1b
 SHA-1: 96079d3b1226a7bd0659fe127718171096073740

 

[EDIT] 

Added Checksum

Added Source Only Download, Figured A Choice Was Better, If you are sensible download source & compile yourself, otherwise you may use compiled one.

Made source self compile if executed directly, provided AutoHotKey is already installed per instructions

 

PRAutoLauncher [compiled].7z PRAutoLauncher [source only].7z

  • Like 2
  • VG Seal of Approval 3
  • Upvote 2
Link to comment
Share on other sites

we had something like that in the past...

that is absolutely not against you but at this point it must be pointed out that the execution of unknown files is always a security risk and you cannot know what else this file does. As I said, this is not against you personally,

but EVERYONE should be careful when executing unknown files from unsecured sources.

therefore everyone has to know for himself whether he is executing this file or not and be aware that even at =VG= nobody can confirm or deny the security of this file at the moment.

  • Upvote 2
Link to comment
Share on other sites

Cool man!

Hey, binary has a point about the .exe -- having something like that on a repo like GitHub where someone can compile it for themselves would go a long way to showing that this executable is safe.  Including a checksum can help, too, so that users know they have received the exact and correct file, that it had not been altered in the transfer, etc.

Whether it's non-compressed and non-obfuscated, it's still an executable that folks are expected to run directly, no?  And the contents cannot be reviewed, being a compiled executable, correct?

It may seem like extra work, trust me I've been there, but exposing everything is the best way to go with user made executables, preferably with a way for users to not use your included exe but compile it for themselves and use that, and also be able to compare such with the one distributed.  Like binary said, it's nothing against you at all, these things have come up before in the history of VG and it's nothing against the person - it's about best standards and practices regarding safety and security of our amateur programming works we share with other gamers.

 

EDIT: please pardon me if I have misunderstood what you meant about AHK as I'm not familiar with it, and if using "any archive manager" can allow someone to review the contents or lines of instructions contained in that exe.  I read your post, though again, I don't do AHK and would love clarification regarding the .exe

  • Upvote 1
Link to comment
Share on other sites

Hey bro's wait a bit.

 

I dont think that X0R will harm anyone or try to hijack pc's. He also downloaded my insurgency maps without any complains or security concerns.

Personally, i dont think i would need this exe. but i have a question about that.

As we played coop insurgency, you (X0R) was also so there and i noticed your comment about my python init.

You got this information with your exe.?

Quote

It's especially helpful if you tend to debug scripts/maps a lot, which involves a lot of CTD's.

That is what i understand from you comment.

Or was it a lucky hit out of the blue? or only professional expectations because of your computing skill?

 

  • Thanks 2
  • Upvote 3
Link to comment
Share on other sites

4 hours ago, =VG= SemlerPDX said:

 

EDIT: please pardon me if I have misunderstood what you meant about AHK as I'm not familiar with it, and if using "any archive manager" can allow someone to review the contents or lines of instructions contained in that exe.  I read your post, though again, I don't do AHK and would love clarification regarding the .exe

I never include executables, only reason I made exception for this, though I included instructions to compile it was because AutoHotKey

/AHK/ doesn't compile to native code,i.e the source of an executable is contained as a plain text file in the exe, this was an intentional design choice to prevent people from distributing malicious compiled code using it  as was the case with AutoIt for instance. So though compiled, the source of the exe can be viewed by anyone using an archive manager as instructed, and compared with provided source in the source directory.

3 hours ago, =VG= Fastjack said:

 

As we played coop insurgency, you (X0R) was also so there and i noticed your comment about my python init.

You got this information with your exe.?

That is what i understand from you comment.

Or was it a lucky hit out of the blue? or only professional expectations because of your computing skill?

 

That was just deduction...

 

 

  • Upvote 1
Link to comment
Share on other sites

11 hours ago, =VG= SemlerPDX said:

Whether it's non-compressed and non-obfuscated, it's still an executable that folks are expected to run directly, no?  And the contents cannot be reviewed, being a compiled executable, correct?

People can use exe if not inclined to compile provided source, but nope, contents can be viewed by anyone so inclined it's a bizarre but functional paradigm,I.e  'the contents CAN be reviewed, DESPITE being a compiled executable'. Regardless I take no issue with removing exe & leaving only already provided source if you feel it's necessary, let me know.

  • Thanks 1
Link to comment
Share on other sites

7 hours ago, X0R said:

People can use exe if not inclined to compile provided source, but nope, contents can be viewed by anyone so inclined it's a bizarre but functional paradigm,I.e  'the contents CAN be reviewed, DESPITE being a compiled executable'. Regardless I take no issue with removing exe & leaving only already provided source if you feel it's necessary, let me know.

Thank you for understanding!  And again, nothing at all against you, and we're all very appreciative of others making tools to help gamers!!  You went the extra mile and it shows, bro! Well done!

If I could ask a clarifying question, regarding the quote above, where you wrote "... but nope, contents can be viewed by anyone so inclined..." and wanted to ask if that was using AHK itself or something?  I'm literally just curious how I could view the contents if I had wanted to?  Figured if I don't know, I should learn.  AHK is pretty popular, and I'm often way too laser focused on VoiceAttack for my macros and such.

 :drinks: 

Link to comment
Share on other sites

4 hours ago, =VG= SemlerPDX said:

Thank you for understanding!  And again, nothing at all against you, and we're all very appreciative of others making tools to help gamers!!  You went the extra mile and it shows, bro! Well done!

If I could ask a clarifying question, regarding the quote above, where you wrote "... but nope, contents can be viewed by anyone so inclined..." and wanted to ask if that was using AHK itself or something?  I'm literally just curious how I could view the contents if I had wanted to?  Figured if I don't know, I should learn.  AHK is pretty popular, and I'm often way too laser focused on VoiceAttack for my macros and such.

 :drinks: 

All good & no you don't need ahk to view the contents, you can do so with 7-zip,WinRAR,etc... Just about any archive manager, 'right click','open as archive' & navigate to specified path inside the exe,drag & drop specified file into notepad & there lies the source. It's not a particularly well documented feature so not too many people know about it, but it's well established that compiled ahk scripts contain plain source unless you use exe Packers & such to conceal it.

tldr; use 7z to open exe as archive & navigate to specified file which can be viewed with notepad. nav2source.thumb.png.efc8fdae3089fc2107cf15829e4371ba.png @=VG= SemlerPDX just for brevity^^

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms of Use and Privacy Policy