Skip to content

Tip 5.4: How to run external executables from the Command Window

April 19, 2014

“Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio“, courtesy of ‘Sara Ford’

Sara Ford’s Blog

The command Tools.Shell runs an external executable out of process from Visual Studio—for example, Shell .

But of course, there are optional arguments. Following are examples of optional arguments for the Tools.Shell command:

Shell [/commandwindow] [/dir:folder] [/outputwindow] [/args]

  • /commandwindow ( or /c) Use this command to display the executable’s output in the Command Window.
  • /dir:folder Use this command to specify the working directory.
  • /outputwindow (or /o) Use this command to display the executable’s output in the Output window.

For example, Shell /o xcopy.exe c:\users\nils-holger\documents\cmdwinlog.txt c:\users\nils-holger\logfiles displays the xcopy output in the Output window.

Happy Programming! =)

Advertisements
Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: