1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Need Help with my Batch file

Discussion in 'All Other Software' started by Mike Circuit, Oct 7, 2008.

Thread Status:
Not open for further replies.
Advertisement
  1. Mike Circuit

    Mike Circuit Thread Starter

    Joined:
    Oct 5, 2008
    Messages:
    56
    Hi. I am trying to write a batchfile that automatically opens some applications for me. I specifically want it to run from an icon on the desktop - rather than on startup. The problem is that it runs the first program on the list and then it doesn't run the next program until I close the first one, anf the same with all the other programs in the file. Can someone help? Here is the contents of the file.

    "C:\Program Files\BlitzMax\MaxIDE.exe"
    notepad
    "C:\Program Files\Internet Explorer\iexplore.exe"
    "C:\Program Files\Internet Explorer\iexplore.exe"
    "C:\Program Files\Internet Explorer\iexplore.exe"
    "C:\Program Files\Internet Explorer\iexplore.exe"

    (I want to have multiple windows explorer windows open - I think doing Ctrl-N may be faster but I don't know how to do this automatically)

    I'd be very grateful if anyone could help. If so I would also like to have the Master Volume control window open automatically - I normally get it by double clicking on the Volume icon on the Task Bar , which is on the bottom right. I don't know the name for this process/program though.

    I know I'm asking a lot but is it possible to have Windows Explorer open the 4 windows (like my batch file *should* do) and go to specified sites - eg one to Ebay, one to my email, etc. It would also be good if it could log in for me automatically - is this possible? - maybe by using just one initial password, the program would then log into Ebay, Yahoo Mail etc

    Thanks again for any help :) I hope I don't come accross as lazy, but I must spend about 8-10 minutes just opening applications and logging onto internet sites every morning. Thank you.

    Mike
     
  2. stantley

    stantley

    Joined:
    May 22, 2005
    Messages:
    7,091
    Rather than trying all of that through a batch file, it would be easier to use a scripting tool and the one I always use is AutoHotkey. It's pretty easy to learn and it can automate keystrokes and mouse clicks.

    To launch IE you can use "Run iexplore.exe" or to go to a particular site "Run http://forums.techguy.org/" and it will startup the default web browser.

    There are many different ways you can do it.

    To automatically login to a site you can save the cookie for the site after you login or use autohotkey to enter the password. However it might be easier to use Firefox for that, since for many sites it will auto enter the username and password.

    Just remember that this will reduce your security since anyone using your PC could login to your accounts and you might not want that, especially for your Ebay account.
     
  3. ich

    ich

    Joined:
    Aug 11, 1999
    Messages:
    403
    Your batch file won't proceed to the next line until the first line is complete - the program runs and exits.

    I've been using AutoIT for years to automate just about anything that can be done manually on a Windows PC, including launch several programs.
     
  4. Squashman

    Squashman Trusted Advisor

    Joined:
    Apr 4, 2003
    Messages:
    19,786
    Use the start command in your batch file.
     
  5. Rollin_Again

    Rollin_Again

    Joined:
    Sep 4, 2003
    Messages:
    4,912
    Instead of using a batch file why don't you use a VBS script? Just copy and paste the code below into a text file and then rename with .vbs extension. Then just double click the newly created VBS file.

    Code:
    Dim WSHShell
    Set WSHShell = WScript.CreateObject("WScript.Shell")
    WSHShell.Run """C:\Program Files\BlitzMax\MaxIDE.exe"""
    WSHShell.Run """C:\Program Files\Internet Explorer\iexplore.exe"""
    If you insist on using a batch file you can always call a stand-alone VBS script directly from the batch using the CSCRIPT command.

    Code:
    CSCRIPT "C:\MyScript.vbs"

    Regards,
    Rollin
     
  6. Mike Circuit

    Mike Circuit Thread Starter

    Joined:
    Oct 5, 2008
    Messages:
    56
    Thank you very much for all the help :) I think I will give AutoHotKey a go first since I like the idea of automating key strokes. Thanks for all the help though.
     
  7. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/756906

  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.
    Dismiss Notice