Welcome to Tactical Gamer

+ Reply to Thread
Page 1 of 3 123 LastLast
Results 1 to 15 of 32
Discussion: Battlefield 2142 / Battlefield 2142 - Technical Support & FAQs - Kill BF2142 Script - This was brought up in TS recently because the server crashed and a few people
  1. #1

    ZWood15's Avatar

    Join Date
    Nov 2006
    Location
    Boulder, CO
    Posts
    489

    Kill BF2142 Script

    This was brought up in TS recently because the server crashed and a few people had to hard reboot. I must give all Credit to Lorax for this one, as he was the one that posted it in the 9th forums...

    Open notepad or any text editor, copy the line below and paste it into the document.

    Code:
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set colProcessList = objWMIService.ExecQuery ("SELECT * FROM Win32_Process WHERE Name = 'BF2142.exe'")
    For Each objProcess in colProcessList
        objProcess.Terminate()
    Next
    Save this document into your "My Documents" folder and name it Kill_BF2142.vbs.


    In notepad, erase what you have or open a new text document and copy/paste the following lines:

    Code:



    c:\windows\system32\cscript.exe "%HOMEPATH%\My Documents\Kill_BF2142.vbs"



    Save the file in your "My Documents" folder and name it Kill_BF2142.bat



    Now map a key to launch the Kill_BF2142.bat file and you're all set, just don't hit it by accident.

    *Update for Vista*
    Updated for Vista:

    Kill_BF2142.bat
    Code:
    @echo off
    
    IF EXIST %systemdrive%\users (
       REM Vista
       cscript %homepath%\Documents\Kill_BF2142.vbs
    ) ELSE (
       REM assume it's XP
       cscript %homepath%\My Documents\Kill_BF2142.vbs
    )
    Kill_BF2142.vbs unchanged
    Code:
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set colProcessList = objWMIService.ExecQuery ("SELECT * FROM Win32_Process WHERE Name = 'BF2142.exe'")
    For Each objProcess in colProcessList
        objProcess.Terminate()
    Next
    Last edited by Lorax74; 01-28-2009 at 02:13 PM.

    |TG-9th|ZWood15
    "By Any Means"

  2.  
  3. #2

    Takk's Avatar

    Join Date
    Nov 2006
    Location
    Rockford, IL
    Age
    30
    Posts
    611

    Re: Kill BF2142 Script

    Great work Lorax, and thanks for posting it for the rest of us ZWood.
    Proud to have served in the 9th MID and 11th AIR

  4.  
  5. #3

    Azura's Avatar

    Join Date
    Apr 2007
    Location
    Camp Lejeune, NC
    Age
    23
    Posts
    1,429

    Re: Kill BF2142 Script

    Woo!! That's going to make things a lot easier!


    Hadouken!!! (>*.*)> ==> ==> ==> ^(X.X)^



  6.  

     
  7. #4


    Join Date
    Feb 2007
    Location
    Massachusetts, United States
    Age
    40
    Posts
    5,438
    Blog Entries
    1

    Re: Kill BF2142 Script

    Yay! I asked lorax for this the other week. He mentioned it and I replied, "hook a brutha up!"

    He said "huh?"

    And that was that from grandpa lorax.

    I am going to map this to a my g11 keyboard function key.


  8.  
  9. #5

    jonathanshifty's Avatar

    Join Date
    Apr 2007
    Location
    Virginia, USA
    Posts
    316

    Re: Kill BF2142 Script

    its to complicated for me
    GO MANCHESTER UNITED ALL THE WAY!
    HAIL CRISTIANO RONALDO
    in game name= TG Shifty.P
    2nd in the US with bianchi lmg for most kills
    7th in the world with Bianchi LMG for most kills
    K/D of 31/1 with bianchi
    LYra=stop aimbotting shifty

  10.  
  11. #6

    daithi1's Avatar

    Join Date
    Aug 2007
    Location
    Ireland
    Posts
    1,578

    Re: Kill BF2142 Script

    Quote Originally Posted by ZWood15 View Post
    Now map a key to launch the Kill_BF2142.bat file and you're all set, just don't hit it by accident.
    I'm an idiot how do I set keybind in windows?

  12.  

     
  13. #7

    ZWood15's Avatar

    Join Date
    Nov 2006
    Location
    Boulder, CO
    Posts
    489

    Re: Kill BF2142 Script

    Quote Originally Posted by daithi1 View Post
    I'm an idiot how do I set keybind in windows?
    I have a G15 with the programmable keys and I have mine set to G16. Im not any help with windows.. Sorry!!

    |TG-9th|ZWood15
    "By Any Means"

  14.  
  15. #8

    pedestrian01's Avatar

    Join Date
    Jan 2007
    Location
    Detroit, MI
    Age
    25
    Posts
    632

    Re: Kill BF2142 Script

    Quote Originally Posted by daithi1 View Post
    I'm an idiot how do I set keybind in windows?
    You can use this program to set up keybinds. You can map it to kill 2142 directly without using Lorax's script.

    Once you install it will ask you if you want to create a sample script choose yes.
    Run the program and a Green H will be in your system tray. Right click on it and choose "edit this script". You can erase everything in there and paste this line into it

    if Process, Exist, "BF2142.exe" <> 0
    end::Process, Close, BF2142.exe
    return


    Save the file, then right click on the H again and choose "reload script"

    This sets it to the end key. Look in the help file for special key commands.

    Note that this program must be running for the key bind to be active. I'd put it in the startup folder so it starts with Windows.

  16.  
  17. #9

    Holy's Avatar

    Join Date
    Apr 2008
    Location
    Maine
    Age
    21
    Posts
    243

    Re: Kill BF2142 Script

    Too much intelligent chatter!
    So this is just something shutdown BF2142 when the server crashes?

  18.  

     
  19. #10

    ZWood15's Avatar

    Join Date
    Nov 2006
    Location
    Boulder, CO
    Posts
    489

    Re: Kill BF2142 Script

    Essentially, yes. Its a way of Ctrl+Alt+Del out of the game, go to processes tab, and then force end the battlefield process. Its easier than rebooting

    |TG-9th|ZWood15
    "By Any Means"

  20.  
  21. #11


    Join Date
    Mar 2008
    Posts
    392

    Re: Kill BF2142 Script

    w8, what is this for?

  22.  
  23. #12


    Join Date
    Jul 2007
    Location
    Mountain Home AFB, ID
    Posts
    1,196

    Re: Kill BF2142 Script

    When I try to use it, it brings up the window but it says:

    ...My Documents\Kill_BF2142.vbs(2, 1) (null): 0x80041021


    What, it doesn't like my RAM?

    EDIT: never mind, there's a typo in the code. Didn't notice that.


    ationLevel=impersonat e}!

    That space shouldn't be there.

  24.  

     
  25. #13

    jazy2's Avatar

    Join Date
    Aug 2007
    Location
    Next door to Alice
    Age
    37
    Posts
    3,489

    Re: Kill BF2142 Script

    Does the original post method just kill 2142 or will it end punkbuster a+b too???

    I would like to be able to end all 3 processes as sometime my system gets tied up by punkbuster a!

  26.  
  27. #14

    Lorax74's Avatar

    Join Date
    Nov 2006
    Location
    Bridgewater, NJ
    Age
    37
    Posts
    9,824

    Re: Kill BF2142 Script

    Wow, not sure how I missed the original post...

    Quote Originally Posted by jazy2 View Post
    Does the original post method just kill 2142 or will it end punkbuster a+b too???

    I would like to be able to end all 3 processes as sometime my system gets tied up by punkbuster a!
    This just kills the 2142 process, and quickly too. It can be modified to kill the punkbuster processes as well. I'll post something up when I get home and figure out what those proc names are.



    TG Primer - BF2142 Server Rules - Code of Conduct
    Contact a Game Admin

    "..good sportsmanship shouldn't be sacrificed in the name of teamwork. " --WhiskeySix

  28.  
  29. #15

    jazy2's Avatar

    Join Date
    Aug 2007
    Location
    Next door to Alice
    Age
    37
    Posts
    3,489

    Re: Kill BF2142 Script

    Thanks Lorax! I cant wait to be able to kill the whole lot together

  30.  

     

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


  
 

Back to top