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. Hiding command prompt while running an .bat file?

Hiding command prompt while running an .bat file?

Scheduled Pinned Locked Moved C#
question
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.
  • P Offline
    P Offline
    Pawan Kiran
    wrote on last edited by
    #1

    Hi, i want to hide cmd prompt while executing or running an .bat file.. i have an exe inside my .bat file.. Simply want to run .exe without showing the command prompt through bat file.. Regards, Pawan

    D O 2 Replies Last reply
    0
    • P Pawan Kiran

      Hi, i want to hide cmd prompt while executing or running an .bat file.. i have an exe inside my .bat file.. Simply want to run .exe without showing the command prompt through bat file.. Regards, Pawan

      D Offline
      D Offline
      dan sh
      wrote on last edited by
      #2

      How is this related to C#?

      P 1 Reply Last reply
      0
      • P Pawan Kiran

        Hi, i want to hide cmd prompt while executing or running an .bat file.. i have an exe inside my .bat file.. Simply want to run .exe without showing the command prompt through bat file.. Regards, Pawan

        O Offline
        O Offline
        O Phil
        wrote on last edited by
        #3

        Use @echo off on the first line of your bat file.

        P 1 Reply Last reply
        0
        • O O Phil

          Use @echo off on the first line of your bat file.

          P Offline
          P Offline
          Pawan Kiran
          wrote on last edited by
          #4

          Hi I applied @echo off, but still it is not solved the issue.

          1 Reply Last reply
          0
          • D dan sh

            How is this related to C#?

            P Offline
            P Offline
            Pawan Kiran
            wrote on last edited by
            #5

            Hi, StreamWriter sw = new StreamWriter(@"Z:\" + txtName.Text + ".bat"); sw.WriteLine("START /d E:\\Stock\\StockView\\bin\\Debug Stock.exe % "+result); sw.Close(); This is what i created through C# code.. I don't know what i need to include before or after "START" of sw.WriteLine to hide the cmd prompt.. That's y i posted it in C#.

            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