Hiding cmd promt window

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Hiding cmd promt window

    Hello All,

    I am puzzled over how to hide the cmd prompt window??

    mycopy.exe copies a know set of files from one location to the other.
    Here I am struggling to hide / supress the cmd prompt window which stays
    until the process is exited.

    <code snippet>

    Process proc = new Process();
    proc.StartInfo.FileName = @"mycopy.exe";
    proc.StartInfo.CreateNoWindow = true;
    proc.StartInfo.RedirectStandardOutput = true;
    proc.StartInfo.UseShellExecute = false;
    proc.StartInfo.CreateNoWindow = true;
    proc.StartInfo.WindowStyle = ProcessWindowStyle.hidden;
    proc.Start();
    proc.WaitForExit();
    proc.Close();

    </code snippet>

    Upon a few browses, I understood that, ProcessWindowStyle works well for
    the application invoked (for ex, notepad through a cmd prompt) but not
    on the cmd prompt itself.

    Can anyone please help me in how to overcome this?.
    Thanks in advance
    ../Shyam

    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Shyam Prakash Guest

  2. Similar Questions and Discussions

    1. PopUp window hiding
      I opened a popup window with modal=false using PopUpManager. I want to hide this window, the moment i hide some other UIComponent (lets say a...
    2. insert a frame or window into adobe acrobat or reader window
      Using Windows OS XP or Vista. Can you ad a frame or window into the main window to allow saving a document through another application? I have an...
    3. Child window property window.opener null after postback
      I have an webform from which I open a child window to display a calendar. When a date is selected in the calendar window it attempts to set the...
    4. dlopen is failing on Window XP works great on Window 2000
      Michael Davis <mdavis@sevasoftware.com> writes: Check the permission of the so file: $ ls -l...
    5. Can't Print from Dos Promt! Access denied!
      Can't Print from Dos Promt! Access denied! When any application that uses Dos to print tries to print it doesn't print. Even when going to the Dos...
  3. #2

    Default Re: Hiding cmd promt window

    Why don't you turn mycopy.exe in .NET code so you can call it directly in
    your page and bypass the command prompt altogether?

    "Shyam Prakash" <otherthings@gmail.com> wrote in message
    news:%23Q%23qX$bCFHA.2884@TK2MSFTNGP15.phx.gbl...
    > Hello All,
    >
    > I am puzzled over how to hide the cmd prompt window??
    >
    > mycopy.exe copies a know set of files from one location to the other.
    > Here I am struggling to hide / supress the cmd prompt window which stays
    > until the process is exited.
    >
    > <code snippet>
    >
    > Process proc = new Process();
    > proc.StartInfo.FileName = @"mycopy.exe";
    > proc.StartInfo.CreateNoWindow = true;
    > proc.StartInfo.RedirectStandardOutput = true;
    > proc.StartInfo.UseShellExecute = false;
    > proc.StartInfo.CreateNoWindow = true;
    > proc.StartInfo.WindowStyle = ProcessWindowStyle.hidden;
    > proc.Start();
    > proc.WaitForExit();
    > proc.Close();
    >
    > </code snippet>
    >
    > Upon a few browses, I understood that, ProcessWindowStyle works well for
    > the application invoked (for ex, notepad through a cmd prompt) but not
    > on the cmd prompt itself.
    >
    > Can anyone please help me in how to overcome this?.
    > Thanks in advance
    > /Shyam
    >
    > *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!
    Ken Cox [Microsoft MVP] Guest

  4. #3

    Default Re: Hiding cmd promt window

    Hello Ken,

    That will do for my own code but in case mycopy.exe is a third party
    tool then how to handle that??

    Even in a simple case where I open a Notepad.exe, I get the cmd prompt
    window.

    Thanks
    ./Shyam



    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Shyam Prakash Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139