I\'m trying to programmatically execute an external file from cmd
using this command:
START \"filepath\"
Where \"filepat
I think if you closed a program
taskkill /f /im "winamp.exe"
//....(winamp.exe is example)...
end, so if you want to start a program that you can use
start "" /normal winamp.exe
(/norma,/max/min are that process value cpu)
ALSO
start "filepath"
if you want command line without openning an new window you write that
start /b "filepath"
/B is Start application without creating a new window. The application has ^C handling ignored. Unless the application enables ^C processing, ^Break is the only way to interrupt the application.
If you're doing it via CMD as you say, then you can just enter the command like so:
path\to\your.exe
which will open it within the same window. For example in C++:
system("path\\to\\your.exe"); // Double backslash for escaping
will open your.exe
in the current CMD window. Likewise to start with a new window, just go for:
system("start path\\to\\your.exe");
If you go for the first option, you would have to clear your screen unless you wanted to have the command to open your.exe
on the screen still.
Just remove the double quote, this works in Windows 7:
start C:\ProgramFiles\folderName\app.exe
If you want to maximize the window, try this:
start /MAX C:\ProgramFiles\folderName\app.exe
Your command START "filepath"
will start a command prompt and change the command prompt title to filepath
.
Try to run start /?
in windows command prompt and you will get more info.