How to Run External Executables from the Command Window
Command: Tools.Shell
Versions: 2008,2010
Published: 9/19/2010
Code: vstipTool0089
Make sure to check out the Windows Phone Developer Portal!
You can run external programs from the Command window (CTRL + ALT + A) by using the Tools.Shell command. The general syntax for the command is:
Tools.Shell [/command] [/output] [/dir:folder] path [args]
/commandwindow [or] /command [or] /c [or] /cmd
Optional. Specifies that the output for the executable is displayed in the Command window.
/dir:folder [or] /d: folder
Optional. Specifies the working directory to be set when the program is run.
/outputwindow [or] /output [or] /out [or] /o
Optional. Specifies that the output for the executable is displayed in the Output window.
For example, to run the XCOPY command this is what it would look like:
Just for fun, since I don't actually have the files in the sample command, here is the result of running it:
As you can see the output from XCOPY was redirected to the Command window and tells me that it can't find a file.
If the item you want to run isn't in the PATH environment variable then you must include the full path (surrounded by quotes if there are any spaces in the path):