RE: System.Diagnostics.ProcessStartInfo

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi Jeffrey, Peter...

The thing that made me curious is that the app I'm launching is a console
app, but it still spawns a separate window.

To be specific, I'm writing a little application that helps with installing
an ASP.Net website, so my .net program is spawning aspnet_regiis.exe to make
sure the right version of .net is the default. That's a console app.

But when I use the Process.Start() code I posted, it ignores the
CreateNoWindow option and spawns a separate window. My .net app is also a
console app.

It seems that the flag just doesn't do anything at all.

Thanks
Mark


""Jeffrey Tan[MSFT]"" wrote:

Hi Mark,

Yes, Pete is right. CreateNoWindow property internally encapsulates the
CREATE_NO_WINDOW flag passing to the Win32 CreateProcess API. From the
document below, you will see that it is merely used to hide the console
application window. This flag is ignored if the application is not a
console application:
http://msdn2.microsoft.com/en-us/library/ms684863(VS.85).aspx

If one GUI application is intended to be used to perform the background
processing work, it should accept certain command line arguments to run
without any GUI. Letting the end user to hide its GUI window is not a good
practise.

Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


.



Relevant Pages

  • Re: Process status?
    ... Benjamin Riefenstahl wrote: ... I'm that formal but I do support your statement. ... the app a WM_CLOSE with SendMessagebut only if it's a GUI app. ... GenerateConsoleCtrlEvent() is good for a console app, ...
    (comp.lang.tcl)
  • Re: Has anyone else suffered Ubuntu fever?
    ... Then the app is broken and most apps are really not that broken. ... It is an almost non-trivial project to take a linux console and hack it to ... The linux console is a terminal. ... Just use a terminal emulator like putty or century ...
    (comp.unix.sco.misc)
  • Re: Cannot Correctly Preview Fax in Fax Console
    ... I don't recall previously using the fax console to preview a fax, ... I seem to recall it only displaying the fax ... To try and pin down the problem, I emptied out the temp directory and then ... Reader or Word 2007 or Word 97) since it disappeared when that app was ...
    (microsoft.public.windowsxp.print_fax)
  • Re: newbie - Need advice resources pertaining to development of roguelike from scratch
    ... whether to just go with a console app as oppossed to a win32 app? ... I figured a windows app hass more features but Ive ... to focus on the main issues I lack so Im thinking go console, ... re-writing it with a more thought-out and sensible code design and I'm ...
    (rec.games.roguelike.development)
  • Re: Terminal server client and old dos programs
    ... When running on the console, will it run in windowed mode, or only full screen? ... No full-screen for DOS applications in Terminal Server. ... >> can get is by simulating full-screen with a window that covers the entire ... >> non-admins can't run the app, then it's a permissions or rights issue. ...
    (microsoft.public.windows.terminal_services)