Thanks
Hi,
I want to run an EXE with a set of parameters. How can do it using Tools.Shell method. I tried using it but cannot compile.
Do u have to reference some DLL? I also went to menu option "Tools"->"External Tools" but do not know what to do.
Any help would be grately appreciated!
Thanks & Regards,
Channa.
[331 byte] By [
mcfs] at [2008-2-6]
You said it doesn't compile? I'm not sure if you are trying to launch this from your code, or from the command window. Tools.Shell is a command you can use from the command window to execute code within the VS.NET IDE. This is useful if you don't want to leave the IDE but need to execute some program (such as custom profilers or debug listeners, etc).
To try this out, press CTRL-ALT-A (or to to View | Other Windows | Command Window) and type the following:
> Tools.Shell /c "C:\windows\system32\cmd.exe" "dir C:\*.*"
This will launch a command window, and pass in the command "dir *.*" as arguments. Because my example uses the /c argument to Tools.Shell, the results display in the command window. To show the results in the output window, try:
> Tools.Shell /o "C:\windows\system32\cmd.exe" "dir C:\*.*"
Then look at your Output window (CTRL-ALT-O). This will produce the results in an output window.
However, if you are trying to write an application that launches a processes and passes it arguments, that's a whole other example.
Yes, I wasn't sure which you were trying to do. You said you were trying to use the tool window command, so I wasn't 100% sure if you wanted to execute a process from a program or from within the IDE.