Is it possible to run a batch file as a menu item in studio 2008?
Yes, go to Tools | External Tools in the menus and add your batch file as the Command. You can also pass in any arguments that you want such as the build target, project directories, etc.
Once you do this, your batch file will appear as one of the items on your tools menu. If you want, you can then add a toolbar button for it by going Tools | Customize | Tools and dragging the External Command # that matches your tool to the toolbar. You will then want to change it to an icon and select an image for it.
The tools are numbered 1 based in the order they appear in the menu.
This is much better than having external tool since you can execute a batch file simply by double clicking on it in solution explorer just as if you were opening a code file. I've written a blog post about it that will help you lots to configure it and of course use it.
You've asked this question 2 years ago, but I see that nobody mentioned this technique so I'm providing this answer for any future reference. I hope it gets upvoted, so it will be near the top for readers to see.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With