How to access command prompt ?
-
Dear all, Can anyone tell me if there is any API for accessing command prompt and get the result of the command back to the application ? Thanks for your prompt reply. Nikhs Nikhil Trivedi
-
Dear all, Can anyone tell me if there is any API for accessing command prompt and get the result of the command back to the application ? Thanks for your prompt reply. Nikhs Nikhil Trivedi
Nikhil Trivedi wrote:
accessing command prompt
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you
-
Nikhil Trivedi wrote:
accessing command prompt
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you
ThatsAlok wrote:
Search CP[^]
Thanks Dear. But I want to send commands from my application and have the result back to the application like if I want to use the netsend command then how can I using visual C++ ? Nikhs Nikhil Trivedi
-
ThatsAlok wrote:
Search CP[^]
Thanks Dear. But I want to send commands from my application and have the result back to the application like if I want to use the netsend command then how can I using visual C++ ? Nikhs Nikhil Trivedi
Nikhil Trivedi wrote:
if I want to use the netsend command then how can I using visual C++ ?
You should use corresponding socket API's, instead of following this approach. However, you can refer Console functions[^], and see what fits your needs.
Prasad MS MVP - VC++
-
Nikhil Trivedi wrote:
if I want to use the netsend command then how can I using visual C++ ?
You should use corresponding socket API's, instead of following this approach. However, you can refer Console functions[^], and see what fits your needs.
Prasad MS MVP - VC++
Thanks for your reply. But actually I used the netsend command for example purpose only. I want to use some commands like cd directory, cd.., and run some .exe from console. Can you help me in that ? Thanks for your prompt reply. Nikhs Nikhil Trivedi
-
Thanks for your reply. But actually I used the netsend command for example purpose only. I want to use some commands like cd directory, cd.., and run some .exe from console. Can you help me in that ? Thanks for your prompt reply. Nikhs Nikhil Trivedi
Nikhil Trivedi wrote:
I want to use some commands like cd directory
There is equivalent of very command you like to run from command prompt. You can use
CreateDirectory
in this case.Nikhil Trivedi wrote:
and run some .exe from console.
You can use
ShellExecure, CreateProcess
for this purpose. Refer its documentation.
Prasad MS MVP - VC++