Other Programming Languages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreOther Programming Languages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old June 20th, 2007, 11:04 AM
Kimm's Avatar
Kimm Kimm is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Sweden
Posts: 152 Kimm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 31 m 11 sec
Reputation Power: 5
Start "independent" process in Batch script

When writing bash scripts (linux) you can start a process that will allow the script to keep running (and not wait for the program to finish), but using "&" after the program name

EX.

firefox &

Is there any way to do the same thing in a batch script (windows)?
__________________
Real Programmers use C since it's the easiest language to spell

Reply With Quote
  #2  
Old June 26th, 2007, 05:34 AM
xnemesis64 xnemesis64 is offline
Google's No1 Supporter!
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2007
Location: irc.superirc.info
Posts: 569 xnemesis64 User rank is First Lieutenant (10000 - 20000 Reputation Level)xnemesis64 User rank is First Lieutenant (10000 - 20000 Reputation Level)xnemesis64 User rank is First Lieutenant (10000 - 20000 Reputation Level)xnemesis64 User rank is First Lieutenant (10000 - 20000 Reputation Level)xnemesis64 User rank is First Lieutenant (10000 - 20000 Reputation Level)xnemesis64 User rank is First Lieutenant (10000 - 20000 Reputation Level)xnemesis64 User rank is First Lieutenant (10000 - 20000 Reputation Level)xnemesis64 User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 4 Days 15 h 48 m 12 sec
Reputation Power: 145
Send a message via MSN to xnemesis64 Send a message via Yahoo to xnemesis64 Send a message via Google Talk to xnemesis64 Send a message via Skype to xnemesis64
I presume you want it to run and you still be able to perform commands from the same command line prompt. If this is so, the simple answer is no, as batch scripts still run through dos (or some form of dos shell, which cannot multi task).
__________________
Did this post help? Please Click The Next To My Post
Need help? Did you try Google?
Take a look over at my current work in progress http://crispycrisp.org

Reply With Quote
  #3  
Old June 26th, 2007, 06:06 AM
salem's Avatar
salem salem is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jun 2005
Posts: 1,608 salem User rank is Captain (20000 - 30000 Reputation Level)salem User rank is Captain (20000 - 30000 Reputation Level)salem User rank is Captain (20000 - 30000 Reputation Level)salem User rank is Captain (20000 - 30000 Reputation Level)salem User rank is Captain (20000 - 30000 Reputation Level)salem User rank is Captain (20000 - 30000 Reputation Level)salem User rank is Captain (20000 - 30000 Reputation Level)salem User rank is Captain (20000 - 30000 Reputation Level)salem User rank is Captain (20000 - 30000 Reputation Level)  Folding Points: 153 Folding Title: Novice Folder
Time spent in forums: 1 Month 1 Day 16 h 16 m 8 sec
Reputation Power: 276
Use the cmd.exe start command (note that this isn't in 16-bit command.com of older operating systems).
> start /?
Starts a separate window to run a specified program or command.

START ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[/WAIT] [/B] [command/program]
[parameters]

Since there is /WAIT, the implication is that not waiting is default operation.

Eg.
start cmd /c dir
Will create a new console window, which will run the "dir" program and then exit. But you'll see the prompt return in the current window long before that finishes.
__________________
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreOther Programming Languages > Start "independent" process in Batch script


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway