DOS batch file, run an executable and wait for completion

  • joshgoonweir
  • Born
  • Born
  • No Avatar
  • Joined: May 18, 2004
  • Posts: 3
  • Status: Offline

Post May 18th, 2004, 1:39 am

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
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post May 18th, 2004, 1:39 am

  • SecureITGroup
  • Proficient
  • Proficient
  • User avatar
  • Joined: May 16, 2004
  • Posts: 293
  • Status: Offline

Post May 18th, 2004, 1:54 am

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
  • No Avatar
  • Joined: May 18, 2004
  • Posts: 3
  • Status: Offline

Post May 18th, 2004, 4:02 am

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
  • No Avatar
  • Joined: May 18, 2004
  • Posts: 3
  • Status: Offline

Post May 19th, 2004, 4:27 am

The answer is the SHELL command in kix.
  • this213
  • Guru
  • Guru
  • User avatar
  • Joined: Mar 01, 2004
  • Posts: 1242
  • Loc: ./
  • Status: Offline

Post May 21st, 2004, 11:26 am

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
http://www.disabo.com
  • bkrocker
  • Born
  • Born
  • No Avatar
  • Joined: Jul 19, 2004
  • Posts: 1
  • Status: Offline

Post July 19th, 2004, 8:36 am

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 190 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
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.