Solved How to execute a DOS batch silently from a Windows program?

January 4, 2012 at 07:20:25
Specs: Windows XP
I execute a DOS batch in my Windows program (programmatically start the batch from my program running under Windows). How do I prevent the DOS window from flashing up? Thanks!

See More: How to execute a DOS batch silently from a Windows program?

Report •


✔ Best Answer
January 4, 2012 at 08:50:59
Since Start is an internal interpreter command you may have to code

cmd /C start "" /Min Batch_Name



#1
January 4, 2012 at 07:33:38
Inside your Windows application launch the batch by issuing

start "" /Min Batch_Name
<(b>

That runs the batch minimized on the taskbar, not silently but almost stealth.

Report •

#2
January 4, 2012 at 08:06:40
Thank you Ivo. I "unfortunately" program using WinDev and I can enter only one line into the function ExeRun(), which starts another executable or a batch. How would I apply your suggested solution to that? What is <(b> ? Thank you!

Report •

#3
January 4, 2012 at 08:45:20
Sorry, <(b> is just a typo! What you have to enter is ONE line, i.e.

start "" /Min Batch_Name


Report •

Related Solutions

#4
January 4, 2012 at 08:50:59
✔ Best Answer
Since Start is an internal interpreter command you may have to code

cmd /C start "" /Min Batch_Name


Report •

#5
January 11, 2012 at 12:17:23
Thank you Ivo, it did work! Sorry for my late answer, I was ill for a week and could not work.
Best regards,
Zoltan

Report •


Ask Question