0

I have one batch file which simply calls one program and then it remains open after program has opened. I have put exit in the last but it still remains open. If I close the program then command prompt closes automatically. Here is the code I'm using

set /p device="Enter device name:"
"c:\Users\Administrator.PC1\Desktop\DCUTermFiles\%device%.DTS
exit

I'm using Windows 7 64-bit

Hiren
  • 57
  • 1
  • 11
  • http://stackoverflow.com/questions/14697739/how-to-automatically-close-cmd-window-after-batch-file-execution, I doubt same question answered here –  Feb 15 '16 at 07:15
  • @Jamuna .. Yeah It's the same problem.. Thanks.. :) – Hiren Feb 15 '16 at 08:11

1 Answers1

1
start "" "c:\Users\Administrator.PC1\Desktop\DCUTermFiles\%device%.DTS

Inserting the start (the empty following string becomes the started application's window-title) will create an independent process, then batch will continue to exit without waiting for the application to close.

Magoo
  • 77,302
  • 8
  • 62
  • 84