|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
||||
|
||||
|
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 |
|
#2
|
|||
|
|||
|
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 PostNeed help? Did you try Google? Take a look over at my current work in progress http://crispycrisp.org |
|
#3
|
||||
|
||||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Other Programming Languages > Start "independent" process in Batch script |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|