Skip to main content

Wiki

Go Search
Blog
SPDev
Wiki
Governance
  
Mark Wagner - Cogitation Blog > Wiki > SharePoint Wiki Pages > Configure a Run Selected Command in Visual Studio  

Configure a Run Selected Command in Visual Studio

The following steps allow you to select a .cmd file in you Visual Studio project and execute it in the Visual Studio Output window. To run a command (.cmd) or batch (.bat) file in the Visual Studio Output window, select your command file in the Solution Explorer window and press Alt-T+B.
 
Run commands in the Visual Studio "Output" window.
  • Open Visual Studio.
  • Click Tools.
  • Click External Tools.
  • Click Add.
  • Enter the following values:
    • Title: Run Selected &Batch
    • Command: %SystemRoot%\system32\cmd.exe
    • Arguments: /C $(ItemFileName)
    • Initial directory: $(ItemDir)
  • Check the Use Output window option.
  • Click OK to save.

 

Alternate:

Enter the following values:

  • Title: Run Selected &Batch
  • Command: %SystemRoot%\system32\cmd.exe
  • Arguments:  /K $(ItemPath)\$(ItemFileName)
  • Initial directory: $(ItemDir)
  • Check the Use Output window option.
  • Click OK to save.

 

 

Last modified at 2/16/2010 11:08 AM  by Mark Wagner