I wanted a way to not show the MS-DOS prompt while I was working and the Event Log Emailer was running. So I found two methods to have the Event Log Emailer or any MS-DOS prompt not show up while a batch is executing.
Shortcut Method: To have an MS-DOS Batch file run in a minimized window Create a shortcut to the Batch file. Right-click the shortcut and click properties. In the properties dialogue, symptoms choose run “Minimized” in the pull-down box. Run the Batch file from the shortcut.
VB Script Method: To have an MS-DOS Batch file run in a hidden window with no MS-DOS prompt nor any corresponding Taskbar button, pill begin your batch with @ECHO OFF and end with CLS and/or EXIT, for sale or the process may stall invisibly.
If my batch was called C:BizTalkEvent Log EmailerTEST.bat , create the following .VBS file:
CreateObject(“Wscript.Shell”).Run “””C:\BizTalk\Event Log Emailer\TEST.bat”””,0
Notice the extra pair of quotes around the path/filename and escape “\” to ensure the vb script can find the file even with the spaces in the path/filename.
This method requires Windows Script Host to be installed. Double-click or execute the .VBS file. For example, with the START command: start MyFile.VBS to run the Batch file invisibly.