Solved: Need Help with my Batch file

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Mike Circuit

Thread Starter
Joined
Oct 5, 2008
Messages
59
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
 
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.
 

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

Mike Circuit

Thread Starter
Joined
Oct 5, 2008
Messages
59
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.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

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 807,865 other people just like you!

Latest posts

Staff online

Top