1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Batch file .EXE runner (crap title, info inside)

Discussion in 'Windows & Other Software' started by FosterK, 8 May 2006.

  1. FosterK

    Hitman

    Joined: 18 Aug 2005

    Posts: 913

    Location: Wirral, UK.

    I'm trying to make a batch file that will run my apps after I've been gaming (Winamp, Trillian, Avast, Samurize, what-not)... I've made a taskkill one to close all the apps I use before gaming, just having a bit of trouble getting it to work with opening them again.

    I have googled, but came up with nowt.

    Any chance of some example code?

    I appreciate any help,

    ta.
     
  2. Conrad11

    Soldato

    Joined: 12 Jun 2005

    Posts: 5,362

    You just put the patch to the exe file don't you?

    example below:

    Code:
    "C:\Program Files\ID3-TagIT 3\ID3-TagIT.exe"
    
    Hope that helps, you may need to enclose it in quotes...

    [Edit]

    You do need to enclose in quotes if there are spaces in the path to the exe file
     
    Last edited: 8 May 2006
  3. FosterK

    Hitman

    Joined: 18 Aug 2005

    Posts: 913

    Location: Wirral, UK.

    Right, that's worked, any way to get the command prompt to close automatically after?
     
  4. marc2003

    Capodecina

    Joined: 6 Feb 2004

    Posts: 20,214

    Location: England

    exit

    that should do it. :)
     
  5. Trigger

    Mobster

    Joined: 15 Dec 2004

    Posts: 3,822

    err, exit?

    Oh, and technically you need the 'start' command in front of the program exe path :)
     
  6. FosterK

    Hitman

    Joined: 18 Aug 2005

    Posts: 913

    Location: Wirral, UK.

    Code:
    @echo off
    start "C:\Program Files\Samurize\client.exe"
    start "C:\Program Files\Winamp\Winamp.exe"
    start "C:\Program Files\Winamp\Winampa.exe"
    start "C:\Program Files\trillian\trillian.exe"
    start "C:\Program Files\Abyss Web Server\abyssws.exe"
    start "C:\Program Files\Creative\JBseriesDRV\CTPdeSrv.exe"
    start "C:\WINDOWS\BricoPacks\Vista Inspirat\ObjectDock\ObjectDock.exe"
    start "C:\Program Files\Alwil Software\Avast4\Ashdisp.exe"
    start "C:\Program Files\Alwil Software\Avast4\AshMaiSv.exe"
    start "C:\Program Files\Alwil Software\Avast4\ashServ.exe"
    start "C:\Program Files\Alwil Software\Avast4\ashWebSv.exe"
    start "C:\Program Files\Alwil Software\Avast4\aswUpdSv.exe"
    start "C:\Program Files\Java\jre1.5.0_06\bin\jusched.exe"
    start "C:\Program Files\Windows Defender\MSASCui.exe"
    start "C:\Program Files\Windows Defender\MsMpEng.exe"
    
    exit
    ^ is what I've got. At the moment, that just runs what appears to be 15 command prompts, but no programs.

    If I lose the start command from the start, It opens the programs, but only one for each time I open the batch file. Eg: First run, Samurize loads, second run, Winamp loads, third run, Winamp agent loads, etc. (and the command prompt stays, doesn't close)

    So yeah. I'm stumped.
     
    Last edited: 8 May 2006
  7. CoXeY

    Hitman

    Joined: 6 Feb 2004

    Posts: 689

    Location: Herts

    THIS should help!


    Dan.
     
  8. FosterK

    Hitman

    Joined: 18 Aug 2005

    Posts: 913

    Location: Wirral, UK.

    All sorted, ta!
     
  9. Tican

    Soldato

    Joined: 14 Apr 2003

    Posts: 5,707

    Location: Leicester

    :) Good idea, never thought of doing something like this, think I will have to do it myself :D
     
  10. VaderDSL

    Capodecina

    Joined: 18 Oct 2002

    Posts: 15,497

    Location: Manchester

    Excellent thread :) I have made myself a Game.bat file - which loads xfire, steam and teamspeak minimized (with teamspeak automatically connected and logged in to the server I use.

    I then assigned the word "game" to my slick run program :)

    That way when I type "game" all three load :D

    When I finished I type "off" and it kills them :D so thank you for all the info contained in here.

    Was a great help to me to get it all running :)
     
  11. The_KiD

    PermaBanned

    Joined: 19 Apr 2006

    Posts: 2,342

    Location: West Yorkshire

    What an absolutely great idea, simple yet brilliant.

    everytime I play, i close my Av, firewall, antispyware etc, cant believe I didnt think of this before.