Running an executable through C++.Net code
-
I am wondering if a function call exists which allows me to be able to run another executable. Something like:
Run("c:/test.exe")
Thanks, Bob X -
Hello, you might succeed with System::Diagnostics::Process::Start( " c:\\test.exe" ); But I haven't checked it by myself yet! regards Tobias
-
Thanks for replying :)
2bee wrote:
you might succeed with System::Diagnostics::Process::Start( " c:\\test.exe" );
Nope, didn't work. I found this after a large amount of research:
std::system("c:\test.exe");
Hi, that is really strange, because i got it working with those two lines: System::Diagnostics::Process^ myProcess = gcnew System::Diagnostics::Process(); myProcess->Start("iexplore.exe"); Further i believe that std::System(...) is from the Standard C++ Library, though it is not .Net. However, as long as it works I wouldn't bother at all. regards Tobias
-
Hi, that is really strange, because i got it working with those two lines: System::Diagnostics::Process^ myProcess = gcnew System::Diagnostics::Process(); myProcess->Start("iexplore.exe"); Further i believe that std::System(...) is from the Standard C++ Library, though it is not .Net. However, as long as it works I wouldn't bother at all. regards Tobias
Thanks for the code. I tried out your code out of curiosity, and it is working fine. :-D I'm pretty sure that std::System() is not a .net library, but it works quite well from .net which is quite strange compared to some of the things I have been working on. ex: error 151: compilation stopped due to error count exceeding 100...