SQL Server Management Studio provides a functionality to add external tools(Windows Bases or .Net Based).
This will be in great use when an external executable file has to be run from SSMS.
How to add external tools to SQL Server Management Studio?
The step by step approach to add External tools to SSMS is given below. (Screenshots depict how Notepad has to be added as external tool to SSMS)
Now External Tools Dialog Box pops up. Using this Dialog Box External tools can be added to SSMS.
The below screenshot shows notepad being selected as command from location C:\Windows\System32\notepad.exe
Update the Title with the title you want for this extenal tool(basically the name of the external tool).
If the external tool has arguments then add them in the arguments section.
Also add the intial directory if initial execution directory is needed by the external tool.
For adding Notepad as an external tool there is no mandate to add Arguments and Initial directory.
The tool Title is given as ExternalToolNotepad.
Now click on apply, Then click on OK.
You can find the added external tool in the Tools Menu item.
Now when the external tool is clicked in the tools menu, the tool opens up with the defined options in External tools Dialog.
How to add toolbar Button for External tool?
External tools can be easyly accessed when a toolbar button is added to external tool.
This can be acheived using Customize Option in the tools menu.
Now Customize dialog box pops up
Select Tools under Catagories in the commands tab.
Drag the External Command1 item in the Commands section to the location on SSMS where you want the button to be added.
The cursor initlly has a x mark. As you drag the item the Cursor changes into a + mark indicating it can be added at that location. Leave the cursor at the location where external tool button is needed.
Using this method External tool can be added to the tool bar, or as a menu item.