Multiple program execution with Command prompt

Discussion in 'other software & services' started by stalker, Sep 15, 2004.

Thread Status:
Not open for further replies.
  1. stalker

    stalker Registered Member

    Joined:
    Jan 19, 2004
    Posts:
    152
    Location:
    Ljubljana, Slovenia
    Hey all !!


    Does anyone know, how to make make batch files to execute some "user" program (and not Windows cmd apps, like move, xcopy, etc.), and after that execute some other program, and optionally executing them on and on (one after another) ??


    It is that, always when I try to lauch more than one application at the time (one after another), cmd prompt always "freezes" after first program execution, and waits till it's terminated (by user request of course), and only then go to the next line in that particular batch file.


    help cmd also doesn't list any solution (at least obvious), at least I suppose /C and /K switches are not related to my problem, where /C description saying "Carries out the command specified by string and then terminates" , and /K description saying "Carries out the command specified by string but remains"


    Here are two examples of what syntax I've tried. Note that "doze.exe" is just some cmd-line application, that puts "pause" (specified by integer) between lines/strings in batch files.


    Code:
    cd "D:\Nonsetup\Internet\Proxomitron"
    call Proxomitron.exe
    doze 12
    cd "D:\Nonsetup\Internet\SoulSeek"
    call slsk.exe
    

    Code:
    "D:\Nonsetup\Internet\Proxomitron\Proxomitron.exe"
    doze 16
    xcopy "D:\Nonsetup\Internet\SoulSeek\*.cfg" "F:\MySystem\=ConfigXP\Soulseek\LastConfig\" /Y /Q
    doze 12
    "D:\Nonsetup\Internet\SoulSeek\slsk.exe"
    


    Thanks for any help, you can give.
     
    Last edited: Sep 17, 2004
  2. nick s

    nick s Registered Member

    Joined:
    Nov 20, 2002
    Posts:
    1,430
    Take a look at "Using multiple commands and conditional processing symbols" here: Command shell overview.

    Nick
     
  3. stalker

    stalker Registered Member

    Joined:
    Jan 19, 2004
    Posts:
    152
    Location:
    Ljubljana, Slovenia
    Hey, thanks for reply.


    I just got an e-mail from my friend (studying computing-related university), mentioning START command. It supposely execute various programs in batch files, but i execute them at the same time. Well, maybe I could add that doze.exe app (see previous post) to make pauses between.


    Or I could simply create more batch files, each containg only one START line, and then call these batch files from some other (single) batch. This way, I would also "produce" a small delay between execution.



    Nick, I think, I actually read that article once already.


    But thanks anyway !!
     
  4. GlobalForce

    GlobalForce Regular Poster

    Joined:
    Jun 30, 2004
    Posts:
    3,581
    Location:
    Garden State, USA
    Hey Stalker, long time notok :D !

    Just an active thought.....
    Plug-in to google the type of switch you're looking for.

    Example : I searched for articles on "explorer switches", this was the first in my results : http://www.onecomputerguy.com/app_info/explorer_switch.htm

    Maybe your answer can be found this way.
    Just a thought.....

    GF
     
  5. nick s

    nick s Registered Member

    Joined:
    Nov 20, 2002
    Posts:
    1,430
    I've been using nnCron for automating/scheduling program startups. Runs as a service. nnCron LITE is the free version.

    Nick
     
  6. stalker

    stalker Registered Member

    Joined:
    Jan 19, 2004
    Posts:
    152
    Location:
    Ljubljana, Slovenia
    Yes, doze.exe application is working.


    And the best thing is that it actually doesn't require START command itself. Maybe because it's command-line app, and not GUI, but probably because it closes itself (after number of secs, specified in parameters), so batch job can continue.

    In case if it would be some other command-line app doing some huge-job, one would also need to finish its work, and therefore wait for next application to run (yeah, or simply put START command also infront of it), like in GUI applications, where you run for example Firefox, p2p app, Outlook and close it after hours, so appearantly, batch job CAN'T continue.


    Here is one example of how these batch now look like:

    Code:
    START /ABOVENORMAL D:\Nonsetup\Internet\Proxomitron\Proxomitron.exe
    doze 16
    START /BELOWNORMAL D:\Nonsetup\Internet\YahooPOPs\YahooPOPs.exe
    doze 16
    START /BELOWNORMAL D:\NonSetup\Auditing\Tcpview\Tcpview.exe
    doze 16
    START /BELOWNORMAL D:\Nonsetup\Resident\Firefox\firefox.exe -p default
    doze 8
    START D:\Nonsetup\Resident\Firefox\firefox.exe -p extra1
    doze 16
    xcopy D:\Nonsetup\Internet\SoulSeek\*.cfg F:\MySystem\=ConfigXP\Soulseek\LastConfig /Y /Q
    doze 16
    START D:\Nonsetup\Internet\SoulSeek\slsk.exe
    beep 64 1
    


    P.S., And yeah, I just like to keep batch files clean as possible.


    _____________


    Look at the parameters in attachment added. Beside many other features, this command offers pre-setting process's base-priority.

    Note: The explanation of command continues, but I didn't want to post to huge attachment)
     

    Attached Files:

    Last edited: Sep 18, 2004
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.