DOS batch file, run an executable and wait for completion

  • joshgoonweir
  • Born
  • Born
  • joshgoonweir
  • Posts: 3

Post 3+ Months Ago

Hi,

If i had a .bat file in windows that runs a specific executable program, i want the batch file to wait for the executed process to complete before proceeding with the rest of the .bat file sorta like this:

**********executable.bat****************

c:\executable.exe
<WAIT for the executable.exe process to complete>

del c:\executable.exe
exit

*************************************

Thanks in advance
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • SecureITGroup
  • Proficient
  • Proficient
  • User avatar
  • Posts: 293

Post 3+ Months Ago

I could not tell you what would be the code but i have a good suggestion. If you could make the swich to the Kixtart scripting language if could be accomplished. When i was in studies i maintained the LAN as a administrator and we use the Kixtart scripting language. http://www.kixtart.org i think. It is a set of about 15 files and you dump them into the svsvol dir. When the logon process takes place the script comes up and it is colorful and everything. It is completly coustomisible. The reasion i recomend this is because the studies had norton updated every time the logon progess took place. It showed the processes that were takeing place too. If you would like to see a example script i could e-mail it to you i use it here at the house so i have alot of experence with it.
  • joshgoonweir
  • Born
  • Born
  • joshgoonweir
  • Posts: 3

Post 3+ Months Ago

Yeah ive seen kix, ive had a bit of experience with it. But i still cant find a command that will address my above question.

I'll explain it better to see if you can help.

I want the batch file to copy a file from a network location (ie. Copy, p:\program.exe, c:\program.exe) then run the program "Run, c:\program.exe" and i want the batch file to wait until the program.exe process completes.

When the program.exe process completes, the batch file will delete the local copy of the program.exe (Del, c:\program.exe) and then the batch file will exit.

What command can i use in kix that enables the kix batch program to wait for the program.exe to complete?

Peace
  • joshgoonweir
  • Born
  • Born
  • joshgoonweir
  • Posts: 3

Post 3+ Months Ago

The answer is the SHELL command in kix.
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

Code: [ Select ]
copy p:\program.exe c:\program.exe
c:\program.exe
pause
del c:\program.exe
  1. copy p:\program.exe c:\program.exe
  2. c:\program.exe
  3. pause
  4. del c:\program.exe


this will work in a bat file
  • bkrocker
  • Born
  • Born
  • bkrocker
  • Posts: 1

Post 3+ Months Ago

You can also use the Start /wait <command> which will wait until the command is completed. :o

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 68 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.