?
Solved

Close DOS Window

Posted on 2011-03-05
2
Medium Priority
?
434 Views
Last Modified: 2012-05-11
I have a batch job that kills a task and the restarts it after 5 minutes. I have tried to name it with a .bat and .cmd extension, but I cannot get it to close that DOS window after it runs. Can anyone help with this please?

taskkill /f /im MyProgram.exe
ping 1.1.1.1 -n 1 -w 300000
C:\ MyProgram.exe
exit
0
Comment
Question by:rjackmanwyn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 96

Accepted Solution

by:
Lee W, MVP earned 2000 total points
ID: 35044546
Use Start - Batch files pause execution until the command run is finished... so it's paused until MyProgram.exe is finished.  Using start should start the program and continue executing the batch file:

start "" "C:\MyProgram.exe"

(The first " block is the program title - as above, it leaves the program name empty)

for illustration purposes
start "My Program's Title" "C:\MyProgram.exe"
0
 

Author Closing Comment

by:rjackmanwyn
ID: 35044617
That did it thank you
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question