Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Command Prompt Batch File Not Fully Running


  • Please log in to reply
4 replies to this topic

#1 ediblespread

ediblespread

  • Members
  • 4 posts
  • OFFLINE
  •  
  • Local time:03:52 PM

Posted 22 August 2007 - 02:17 PM

Well, I was bored today and so decided to muck about with the command prompt, seeing what it could do. After reading a (good) basic tutorial from here on it, I reckoned it could save me a few seconds at boot up, and make me feel nice and nerdy (:D). So, I created the following batch file, to run the programs I use when I start up:

cd My Documents
stefen1.odt
cd C:\Program Files\Windows Media Player
wmplayer.exe
cd C:\Program Files\Mozilla Firefox
firefox.exe
cd C:\Program Files\MSN Messenger
msnmsgr.exe
cd C:\Program Files\Mozilla Thunderbird
thunderbird.exe
exit

Now, that should work fine, and it seems to work - it runs all of it until "thunderbird.exe". Now, as far as I can see, it runs the thunderbird line (as the program appears), however, it will NOT run the exit line UNTIL I close thunderbird... I tried switching up the order and it definetely seems to be a problem with thunderbird - anything after launching thunderbird will not run until thunderbird has been closed... Why?

Help?

Edited by ediblespread, 22 August 2007 - 02:17 PM.


BC AdBot (Login to Remove)

 


#2 tos226

tos226

    BleepIN--BleepOUT


  • Members
  • 1,574 posts
  • OFFLINE
  •  
  • Gender:Female
  • Location:LocalHost
  • Local time:10:52 AM

Posted 22 August 2007 - 09:23 PM

I suspect command line parameters to start and exit are needed. I just checked google, so this might get you started
http://kb.mozillazine.org/Command_line_arg...s_(Thunderbird)
Hey, have fun learning the stuff. So every one of those started and exited properly before going to the next or was it all asynchronous and you watched'm all at one time? Just curious.

#3 ediblespread

ediblespread
  • Topic Starter

  • Members
  • 4 posts
  • OFFLINE
  •  
  • Local time:03:52 PM

Posted 23 August 2007 - 01:34 AM

Nevermind, I got it. It was your suggestion all along; I just didn't understand what you meant 'cause the tutorial I used didnt mention using "start". In case you're wondering, the code now reads:

cd My Documents
stefen1.odt
cd C:\Program Files\MSN Messenger
start msnmsgr.exe
cd C:\Program Files\Mozilla Thunderbird
start thunderbird.exe
cd C:\Program Files\Mozilla Firefox
start firefox.exe
cd C:\Program Files\Windows Media Player
start wmplayer.exe
exit

And everything opens. Ta!

EDIT: And so this leaves me with one last question: is it possible to make the computer run this batch file when I log in?

Edited by ediblespread, 23 August 2007 - 02:04 AM.


#4 Budapest

Budapest

    Bleepin' Cynic


  • Moderator
  • 23,579 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:12:52 AM

Posted 23 August 2007 - 02:20 AM

I think what you want to do is go Start > Control Panel > Scheduled Tasks and add a task to run the batch file at login.
The power of accurate observation is commonly called cynicism by those who haven't got it.

—George Bernard Shaw

#5 ediblespread

ediblespread
  • Topic Starter

  • Members
  • 4 posts
  • OFFLINE
  •  
  • Local time:03:52 PM

Posted 23 August 2007 - 10:17 AM

That is exactly what I was thinking off :D

Woot; I have now shaved about 3 seconds off my start-up time. Go me.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users