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. .NET (Core and Framework)
  4. Silent Console Application

Silent Console Application

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpquestion
5 Posts 4 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.
  • L Offline
    L Offline
    lee23
    wrote on last edited by
    #1

    Can I get a console application to run silently (ie without starting up the DOS window) in .Net?

    M 1 Reply Last reply
    0
    • L lee23

      Can I get a console application to run silently (ie without starting up the DOS window) in .Net?

      M Offline
      M Offline
      Michael Bookatz
      wrote on last edited by
      #2

      write it as a service. put all code that does the work in DLL and then you can call it from either a consloe app or service

      L 1 Reply Last reply
      0
      • M Michael Bookatz

        write it as a service. put all code that does the work in DLL and then you can call it from either a consloe app or service

        L Offline
        L Offline
        lee23
        wrote on last edited by
        #3

        I was thinking more the other way around. What I'm trying to do is when my custom protocol is clicked on (either from Outlook/Word/IE), is determine what application to launch via the rest of the protocol format. I have read that registering a custom protocol can simply be done via the Windows Registry where you specify the protocol handler to run. So, my thoughts are that I build a console application where the rest of the information is sent onto a windows service, which then deterimes and launch the required application. Any suggestions is appreciated.

        P 1 Reply Last reply
        0
        • L lee23

          I was thinking more the other way around. What I'm trying to do is when my custom protocol is clicked on (either from Outlook/Word/IE), is determine what application to launch via the rest of the protocol format. I have read that registering a custom protocol can simply be done via the Windows Registry where you specify the protocol handler to run. So, my thoughts are that I build a console application where the rest of the information is sent onto a windows service, which then deterimes and launch the required application. Any suggestions is appreciated.

          P Offline
          P Offline
          Paulo Zemek
          wrote on last edited by
          #4

          If you create a windows application but does not create a window for it, it will be effectivelly a DOS application without a console.

          A 1 Reply Last reply
          0
          • P Paulo Zemek

            If you create a windows application but does not create a window for it, it will be effectivelly a DOS application without a console.

            A Offline
            A Offline
            Ashwini K Singh
            wrote on last edited by
            #5

            i hope " processInfo.WindowStyle = ProcessWindowStyle.Minimized;" will solve youre problem below is detailed settings that i am using ProcessStartInfo processInfo = new ProcessStartInfo(xx, yy); processInfo.UseShellExecute = false; processInfo.RedirectStandardError = true; processInfo.RedirectStandardInput = true; processInfo.StandardOutputEncoding = Encoding.Default; processInfo.RedirectStandardOutput = true; processInfo.CreateNoWindow = true; processInfo.WindowStyle = ProcessWindowStyle.Minimized; Process pingProcess = Process.Start(processInfo);

            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