Hey. I need to be able to run a program in dos, and return the output. For example, I open a dos prompt. I type in "cd C:\Program Files\App" then "app.exe". This would run C:\Program Files\App\app.exe". Then app.exe outputs "app.exe opened successfully". I tried working from an alias called _ping. It uses dos to ping a host and return the resolve time. However, i can only run one command with that code. And i have to be able to cd to the directory, then run the app (requires 2 commands). So any idea how to do this? I think i could use a .bat script, but i dont know how to return the output. Thanks in advance!
Why do you have to cd to the directory? Why don't you just run "c:\blah\blah\app.exe"?
It has to be run in dos, because the output is in dos. If i use mIRC's run command and run app.exe a dos window will pop up, but then i'll have no way of reading the output in that window.
What I mean is, you said you were using an existing ping script. You should be able to call the c:\blah\blah\app.exe command instead of the ping.exe command. Running applications doesn't require that you "cd" to the containing directory. cd is mainly meant for human interaction.
For example, to test your app.exe, you could open a command prompt window, remain in whatever directory it happens to open in, and type c:\blah\blah\app.exe (use the correct path of course). It should run the app normally.
If the path contains spaces, you need to surround it with "quotes".
//me slaps $me
Sorry, didnt mean to make such a simple thing sound so complicated. Thanks genuis!
No problem. ;P