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. C#
  4. Call to run another application from an application

Call to run another application from an application

Scheduled Pinned Locked Moved C#
questioncsharpwinforms
5 Posts 3 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.
  • S Offline
    S Offline
    spin vector
    wrote on last edited by
    #1

    Hello, I have a WinForm app and want to startup a ConsoleApp using a bat file. I have the bat file and once executed my ConsoleApp works fine. How do I execute (or whatever) that bat file from a WinForms App? Do I use the Application class somehow? Thanks

    A S 2 Replies Last reply
    0
    • S spin vector

      Hello, I have a WinForm app and want to startup a ConsoleApp using a bat file. I have the bat file and once executed my ConsoleApp works fine. How do I execute (or whatever) that bat file from a WinForms App? Do I use the Application class somehow? Thanks

      A Offline
      A Offline
      Anthony Mushrow
      wrote on last edited by
      #2

      add in: using System.Diagnostics; and then try: Process.Start("path to bat file");

      S 1 Reply Last reply
      0
      • A Anthony Mushrow

        add in: using System.Diagnostics; and then try: Process.Start("path to bat file");

        S Offline
        S Offline
        spin vector
        wrote on last edited by
        #3

        okay, i'll try it tmw morning. Thanks!

        1 Reply Last reply
        0
        • S spin vector

          Hello, I have a WinForm app and want to startup a ConsoleApp using a bat file. I have the bat file and once executed my ConsoleApp works fine. How do I execute (or whatever) that bat file from a WinForms App? Do I use the Application class somehow? Thanks

          S Offline
          S Offline
          saqib82
          wrote on last edited by
          #4

          System.Diagnostic.Process.Start("filename.ext");

          sAqIb

          S 1 Reply Last reply
          0
          • S saqib82

            System.Diagnostic.Process.Start("filename.ext");

            sAqIb

            S Offline
            S Offline
            saqib82
            wrote on last edited by
            #5

            sorry there is a spell mistake System.Diagnostics.Process.Start("filename.ext");

            sAqIb

            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