So I know there are probably places to find this out there but I wanted to throw this out there because I had a hard time finding it.
Batch files are used for a lot of things for deployments and normally you would have to some these from the window explorer instead of in VS. I say why leave VS if you don?t have to?
Go to Tools ? > External Tools
This will open a new dialog that you will have some items in or not.
Hit Add and type in the name you want it to appear on your right click menu as, Navigate to or type in the path to cmd.exe, and type /K to the Arguments then with the cursor still in arguments click the arrow to the right and select Item Path. Click the arrow to the right of Initial Directory and select Item Directory. Make sure to click the ?Use Output window? option. Your finished dialog should look something like the above picture. Hit apply and OK.
Remember the count of the new item as it will be needed later. For my example this would be 6.
Then to put this on your right click menu. Right click the grey space near a toolbar to get the toolbar customize menu and click customize.
This should open a new dialog like the one below.
Click Context Menus. This will add a bar to the toolbar temporarily. Go to the Commands tab on the dialog and scroll down to tools. In the pain to the right select the External Tool with the number that you wrote down / remembered from earlier. For me this was 6.
Click and Drag the External Command you selected to the toolbar that was added. It needs to go under Project and Solution Context Menus, and then under Item. the position under item is just preference on where you want it in the right click menu.
The name will not be External Command #, it will replace that with the name you typed in.
Then when you have a batch file you can right click it, and choose your new option and it will run it, but output into the output window of Visual Studio without having to leave the IDE.
Enjoy.
4597432f-fda4-4e89-8504-cec4263385ac|1|5.0
Visual Studio 2008, Productivity