Batched program Launcher

Discussion in 'Software' started by bigbazza, Feb 18, 2007.

  1. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    I'm looking for a program that will launch a series of programs, on demand.
    I am using XP Pro, and am trying to assemble 2 options.

    Option 1 is to boot up with minimum applications running.

    Option 2 (after booting up with Option 1) is to launch all the programs I need to get onto the NET, and Major Geeks, of course.:D

    Option 2 would include Zone Alarm, Avast, Trillian, etc. These programs not needed when I am not on the NET.

    A quick google search has revealed

    Batch Launcher 1.0
    http://www.topshareware.com/Batch-Launcher-download-6789.htm
     
  2. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    Bump. ;)
    There must be someone out there using a similar type program, surely. confused Bazza
     
  3. Mada_Milty

    Mada_Milty MajorGeek

    Would be very simple to create a program to do it for you!

    Code:
    option explicit
    
    dim o_shell
    
    set o_shell = createobject ("WScript.Shell")
    
    o_shell.run ("[I]pathtoexecutable [switches as necessary][/I]")
    
    set o_shell = nothing
    
    WScript.Quit()
    
    If you were to copy the above into notepad, and saved as filename.vbs, you would have a script that launched any programs you specified with the o_shell.run command. Adding more programs is as simple as adding this line again with a new pathtoexecutable

    You could also use this to TERMINATE the programs. Instead of pathtoexecutable, you could put "taskkill /F /IM processname"
     
  4. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    Thanks Mada_Milty, :cool
    I'll try and figure it out. I have not had any experience with scripts. Bazza

    ===

     
  5. Mada_Milty

    Mada_Milty MajorGeek

    Should be fairly simple. All you need to do is add o_shell.run commands for every program you want to launch. Let me know if you need any help!
     
  6. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    Mada_Milty, have experimented so far.

    For open programs: (open-progs.vbs);)
    option explicit
    dim o_shell
    set o_shell = createobject ("WScript.Shell")
    o_shell.run ("c:\keepers\zonealarm\zonealarm.exe")
    o_shell.run ("c:\keepers\trillian\trillian.exe")
    o_shell.run ("c:\testing\Weather Watcher\ww.exe")
    set o_shell = nothing
    WScript.Quit()

    Zone Alarm and Trillian will load up, but Weather Watcher won't. Paths for all 3 are correct. I've checked and rechecked. No parameters required for Weather Watcher to work.

    I've even created a desktop shortcut with the same path and the shortcut works perfectly.

    For closing programs (close-progs.vbs);)

    option explicit
    dim o_shell
    set o_shell = createobject ("WScript.Shell")
    o_shell.run ("taskkill /F /IM c:\keepers\trillian\trillian.exe")
    o_shell.run ("taskkill /F /IM c:\keepers\zonealarm\zonealarm.exe")
    o_shell.run ("taskkill /F /IM C:\testing\Weather Watcher\ww.exe")
    set o_shell = nothing
    WScript.Quit()

    Not real sure of the syntax. Nothing will close. I realise that Zone Alarm probably is going to have to be a manual close, being a firewall. That is OK. But the others won't close. I've tried lots of different syntax.:cry confused

    If you can point out my errors here great, but I will continue this by PM if you wish, rather than boring the MG readers.

    Thanks for your help so far. :cool

    ===

     
  7. sach2

    sach2 Major Geek Extraordinaire

    I'm not bored! I'm watching this thread trying to figure things out as well. One note I can make is that when I tried to launch GSpot.exe out of a folder on my Desktop I had problems. No problems when I started from C: and the path included no folders with long names including spaces. This might be the problem with Weather Watchers. I can't remember the syntax but you may have to shorten the name using the "~" to eliminate the space between words. Win98 used to do this in DOS mode.

    Anyway, I'd like this thread to continue here. Thanks to both of you!
     
  8. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    I well remember the olde ~ (DOS 8.3file limitations) days well. :D
    I did try other programs without spaces (like PestPatrol) and couldn't get them to work either.

    I cut my examples down to 3 programs for the sake of simplicity.
    Will wait on Mada_Milty's answer (or suggestions) with interest.
    Will be logging off shortly (8am Australian time). Bazza

    ===

     
  9. Mada_Milty

    Mada_Milty MajorGeek

    You're definitely barking up the right tree!
    However, we're using CMD.EXE, so the DOS filename rules don't apply.

    The issue IS the space in "\weather watcher\", as you have noticed.

    We need some means of passing the string inside the quotes as wrapped with quotes! Otherwise, the shell takes the space as the end of the command.

    try changing it to this:

    Code:
    o_shell.run ([U]"""[/U]c:\testing\Weather Watcher\ww.exe[U]"""[/U])
    One quote is to denote a string, and the other two are to create a double-quote INSIDE the string. This link has more info/explains things better.

    As for closing programs, I'm afraid you've misunderstood... processname should be equivalent to the Image Name as it appears in task manager, not the path to the executable.

    try this:

    You don't need the path, just the process' name. I'm not sure if this is what it appears as in task manager, though. I leave that to you. If that doesn't help, you might try wrapping this in the triple quotes as well.
     
  10. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    Thanks Mada_Milty, I did try ((( and ))), and variations, but not " " " (no spaces).:D
    Will tackle it again when I logoff.;) :) :wave Bazza
     
  11. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    Sorry for the delay in getting back to you, Mada_Milty.:eek:
    o_shell.run ("""c:\testing\Weather Watcher\ww.exe""") worked fine.:D :major

    Now all I've got to do is to load all the applications and processes that I want to close into close-progs.vbs. Thanks again, Bazza
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds