1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

need batch file help

Discussion in 'Programming & Webmastering' started by Solaris17, Apr 27, 2008.

  1. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    18,462 (4.58/day)
    Thanks Received:
    4,868
    Location:
    Florida
    hey i need some help i googled a bit and didnt really find anything that could help me. but what i need is a batch file...i need one that will

    1. start an exe than after completion start another


    can it be done?
     
    10 Year Member at TPU More than 25k PPD
  2. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    18,462 (4.58/day)
    Thanks Received:
    4,868
    Location:
    Florida
    bump

    krej any ideas?
     
    10 Year Member at TPU More than 25k PPD
  3. panchoman

    panchoman Sold my stars!

    Joined:
    Jul 16, 2007
    Messages:
    9,595 (2.88/day)
    Thanks Received:
    1,201
    you could probably make/record a macro to do that for ya.
     
  4. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    18,462 (4.58/day)
    Thanks Received:
    4,868
    Location:
    Florida
    not if its going to be mass distributed.
     
    10 Year Member at TPU More than 25k PPD
  5. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (3.97/day)
    Thanks Received:
    5,632
    Location:
    Cheeseland (Wisconsin, USA)

    I think you can just use the "Call" command in your batch file.
    The batch file should delay execution until the call command finishes.

    Call myprogram.exe
    Call mysecondprogram.exe

    Haven't done much batch coding lately :)
     
  6. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    18,462 (4.58/day)
    Thanks Received:
    4,868
    Location:
    Florida
    cool thanks bud that worked now i just need to make it call another exe but i need to stall it for like 5min any idea how? the only one i could find does it for 99sec
     
    10 Year Member at TPU More than 25k PPD
  7. Thermopylae_480

    Thermopylae_480

    Joined:
    May 27, 2005
    Messages:
    3,685 (0.90/day)
    Thanks Received:
    401
    Location:
    Little Rock Arkansas, United States
    What devilishness are you up to if I may ask?

    P.S. If it is really bad, don't tell me.
     
    craigo says thanks.
    10 Year Member at TPU
  8. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    18,462 (4.58/day)
    Thanks Received:
    4,868
    Location:
    Florida
    my modded forceware ;) i need to execute 2 diff exe's the drivers need to install first than the second after. but installing drivers takes mroe than 99seconds so i need to figure out how to stall it more
     
    10 Year Member at TPU More than 25k PPD
  9. Thermopylae_480

    Thermopylae_480

    Joined:
    May 27, 2005
    Messages:
    3,685 (0.90/day)
    Thanks Received:
    401
    Location:
    Little Rock Arkansas, United States
    That isn't as much fun as creating a program that continually rick rolls people :) .
     
    10 Year Member at TPU
  10. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (3.97/day)
    Thanks Received:
    5,632
    Location:
    Cheeseland (Wisconsin, USA)
    Do I sense a little of Therm's evil side? :D

    @Sol ...

    Doesn't the Call command delay batch execution until the executable returns ?
    No matter how long that is ? Or do you need to wait for a set period after the executable returns?

    This is how I thought it worked ...

    Start batch file
    Call program.exe
    Batch file stops and waits
    program.exe finishes
    Batch file continues again
     
  11. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    18,462 (4.58/day)
    Thanks Received:
    4,868
    Location:
    Florida
    really? cool ok sweet thnaks bud!!!
     
    10 Year Member at TPU More than 25k PPD
  12. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (3.97/day)
    Thanks Received:
    5,632
    Location:
    Cheeseland (Wisconsin, USA)
    Let me know if it works for you.
    If not I will continue to help you with it.
     
  13. ZenZimZaliben

    ZenZimZaliben

    Joined:
    Mar 4, 2005
    Messages:
    2,946 (0.70/day)
    Thanks Received:
    720
    start /d "C:\path\filename1.exe" filename1.exe
    TIMEOUT (up to 100000 seconds) 100000
    start /d "C:\path filename2.exe" filename2.eve
     
    Solaris17 says thanks.
    10 Year Member at TPU
  14. calvary1980

    calvary1980 New Member

    Joined:
    Dec 26, 2007
    Messages:
    1,801 (0.57/day)
    Thanks Received:
    310
    Location:
    Toronto, CA
    you should use a close event than open a new .exe, not a timer or you can save your self some trouble.

    http://www.csharp411.com/net-installers/

    lol creator of solaris utility dvd you inspire me with confidence :p

    - Christine
     
    Last edited: May 21, 2008
    Solaris17 says thanks.
  15. DanTheBanjoman SeƱor Moderator

    Joined:
    May 20, 2004
    Messages:
    10,546 (2.35/day)
    Thanks Received:
    1,384
    start /wait
     
    Solaris17 says thanks.
    10 Year Member at TPU

Currently Active Users Viewing This Thread: 1 (0 members and 1 guest)