Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. Running an executable through C++.Net code

Running an executable through C++.Net code

Scheduled Pinned Locked Moved Managed C++/CLI
csharpc++
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Bob X
    wrote on last edited by
    #1

    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

    2 1 Reply Last reply
    0
    • B Bob X

      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

      2 Offline
      2 Offline
      2bee
      wrote on last edited by
      #2

      Hello, you might succeed with System::Diagnostics::Process::Start( " c:\\test.exe" ); But I haven't checked it by myself yet! regards Tobias

      B 1 Reply Last reply
      0
      • 2 2bee

        Hello, you might succeed with System::Diagnostics::Process::Start( " c:\\test.exe" ); But I haven't checked it by myself yet! regards Tobias

        B Offline
        B Offline
        Bob X
        wrote on last edited by
        #3

        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");

        2 1 Reply Last reply
        0
        • B Bob X

          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");

          2 Offline
          2 Offline
          2bee
          wrote on last edited by
          #4

          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

          B 1 Reply Last reply
          0
          • 2 2bee

            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

            B Offline
            B Offline
            Bob X
            wrote on last edited by
            #5

            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...

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups