Mark LaGrange
asked on
How to close DOS window after bat file execution?
Hello - I made the following .bat to open 3 Word doc's I work with everyday:
"C:\Program Files (x86)\Microsoft Office\Office14\Winword.ex e" "C:\MyDoc1.docx" "C:\MyDoc2.docx" "C:\MyDoc3.docx"
So I can be as lazy as possible, how can I get the DOS window to close after the doc's have opened?
Thanks
"C:\Program Files (x86)\Microsoft Office\Office14\Winword.ex
So I can be as lazy as possible, how can I get the DOS window to close after the doc's have opened?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You may try to add 'exit' command at the end of your bat file.
Yup ,just add exit to the end of the bat file.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!
I haven't confirmed this but if it's run via a shortcut like...
Open in new window
.. The cmd window will stay open. Changing that to...Open in new window
... Will close the window as expectedhttps://ss64.com/nt/cmd.html