Cheesy Batch Menu Game Launcher

paroxymparoxym Toronto, Canada
edited June 2004 in Internet & Media
I didnt know where to stick this post so I figured I'd be a joker and post it in the Programming forum. :buck:

Ive put together a batch menu that kills services and lets you launch games games with all of that 'useless junk' disabled, including explorer.exe. Games like UT2004 chew up memory and its always good to have a little extra.
Upon exiting the batch menu your services will be reloaded and your good to go. Nothing too fancy by any stretch of the imagination but I thought it might be handy. Go ahead, grab it, edit it up, and give it a go. :thumbsup:

.paroxym

Comments

  • RWBRWB Icrontian
    edited June 2004
    It seems pretty straight forward on hwo it works, but it doesn't appearently see my directory paths for anything with a space for a character. What shoudl i put for things like my program files folder which have the space?
  • dodododo Landisville, PA
    edited June 2004
    Sounds like you might have to use old style naming conventions. For example, "Program Files" would be shortened to progra~1

    ~dodo
  • RWBRWB Icrontian
    edited June 2004
    I tired that... tell you what how should this look like?

    D:\Program Files\EA GAMES\Battlefield 1942\BF1942.exe

    the way I put it inw as like...
    D:\Program%Files\EA%GAMES\Battlefield%1942\BF1942.exe

    That didn't work, and I feel the "%" is not what I am thinking it should be... but then I tried this way(trying for the 8.3 convention:

    D:\Progra~1\EA%GA~1\Battle~1\BF1942.exe
  • dodododo Landisville, PA
    edited June 2004
    Try:
    D:\Progra~1\EAGame~1\Battle~1\BF1942.exe
  • RWBRWB Icrontian
    edited June 2004
    Hrm, no errors, but the game never started. However I found a new file with the batch file called "BF1942.pid"
  • shwaipshwaip bluffin' with my muffin Icrontian
    edited June 2004
    replace a space with %20

    or try quotes

    "d:\program files\ea games\battlefield 1942\bf1942.exe"

    to see how certain things are listed in 8.3, type dir /x in the cmd prompt
  • RWBRWB Icrontian
    edited June 2004
    still not working... wtf?
  • paroxymparoxym Toronto, Canada
    edited June 2004
    RWB...
    YOu have to actually change directories and then start the game on a second line. I had the same problem where it wouldnt start the game but open a new command window. Try something like this:

    :ItemD
    CLS
    ECHO Loading... SPLINTER CELL PANDORA TOMORROW
    cd "C:\Crap\Splinter Cell Pandora Tomorrow\offline\system"
    start /wait SplinterCell2.exe
    GOTO Again

    Hope that helps ;)

    paroxym
  • RWBRWB Icrontian
    edited June 2004
    This is so wierd, it still does not work.

    :ItemB
    CLS
    ECHO Loading... Desert Combat
    cd "D:\Program Files\EA GAMES\Battlefield 1942"
    start /wait bf1942.exe
    GOTO Again
  • dodododo Landisville, PA
    edited June 2004
    you may have to separate the "D:" from the cd command, i dont know if it works in one line like that. ie,
    d:
    cd "Program Files\EA GAMES\Battlefield 1942"


    ~dodo
  • paroxymparoxym Toronto, Canada
    edited June 2004
    dodo wrote:
    you may have to separate the "D:" from the cd command, i dont know if it works in one line like that. ie,
    d:
    cd "Program Files\EA GAMES\Battlefield 1942"


    ~dodo

    I tried out what dodo suggested here and it works. Thanks Dodo! :thumbsup:
  • RWBRWB Icrontian
    edited June 2004
    Still not working, is this for a specific OS? I have XP Pro.

    It says something about "The system cannot find the location" or something along those lines, I then redownloaded the file, and tried again from scratch, this time it didn't say anything was wrong, it just flashes and goes back to the menu.
  • paroxymparoxym Toronto, Canada
    edited June 2004
    RWB wrote:
    Still not working, is this for a specific OS?...

    Not OS specific as far as I know... It worked in XP Home and Professional and I'm certain it works in 2K as well. Can I see what your batch looks like? There has to be some reason for this not working and it'll bug the hell outta me if I cant' find out why.
    :cool:
  • RWBRWB Icrontian
    edited June 2004
    @ECHO OFF
    CLS

    :: Kills all un-needed services
    ECHO
    ECHO KILLING SERVICES
    ECHO
    ECHO.
    TASKKILL /F /IM EXPLORER.EXE
    NET STOP DISKEEPER
    NET STOP SPOOLER
    TASKKILL /F /IM LEXBCES.EXE
    TASKKILL /F /IM LEXPPS.EXE
    TASKKILL /F /IM WMIPRVSE.EXE

    CLS

    :LOOP
    ECHO
    ECHO GAME LAUNCH MENU
    ECHO

    ECHO ================
    ECHO A. UT2004
    ECHO B. (game)
    ECHO C. (game)
    ECHO Q. Quit
    ECHO ==============

    :: SET /P prompts for input and sets the variable
    :: to whatever the user types
    SET Choice=
    SET /P Choice=Type the letter and press Enter:

    :: The syntax in the next line extracts the substring
    :: starting at 0 (the beginning) and 1 character long
    IF NOT '%Choice%'=='' SET Choice=%Choice:~0,1%
    ECHO.

    :: /I makes the IF comparison case-insensitive
    IF /I '%Choice%'=='A' GOTO ItemA
    IF /I '%Choice%'=='B' GOTO ItemB
    IF /I '%Choice%'=='C' GOTO ItemC
    IF /I '%Choice%'=='Q' GOTO End
    ECHO "%Choice%" is not valid. Please try again.
    ECHO.
    GOTO Loop

    :ItemA
    CLS
    ECHO Loading... Desert Combat
    cd "D:\Program Files\EA GAMES\Battlefield 1942"
    start /wait bf1942.exe
    GOTO Again

    :ItemB
    ECHO Insert commands for Item B.
    GOTO Again

    :ItemC
    ECHO Insert commands for Item C.
    GOTO Again

    :Again
    CLS
    GOTO Loop

    :End
    :: Restarts Explorer and services
    CLS
    ECHO
    ECHO RESTARTING SERVICES
    ECHO
    ECHO.
    start C:\Windows\explorer.exe
    NET START DISKEEPER
    NET START SPOOLER
    TASKKILL /F /IM WMIPRVSE.EXE
  • paroxymparoxym Toronto, Canada
    edited June 2004
    Try this:

    :ItemA
    CLS
    ECHO Loading... Desert Combat
    D:
    cd "D:\Program Files\EA GAMES\Battlefield 1942"
    start /wait bf1942.exe
    GOTO Again

    If that doesnt work then I havent the slightest idea. I got an executable to run on my D: drive by putting the "D:" before the rest of it so ... *shrugs* :zombie:
  • RWBRWB Icrontian
    edited June 2004
    It Works! U Da Man
Sign In or Register to comment.