Home All Groups Group Topic Archive Search About

ProcessStartInfo.CreateNoWindow and UserName+Password

Author
30 May 2006 4:42 PM
Walther Homme
Hello :)

"If you call the Start(ProcessStartInfo) method with the
ProcessStartInfo.UserName and ProcessStartInfo.Password properties set,
the unmanaged CreateProcessWithLogonW function is called, which starts
the process in a new window even if the CreateNoWindow property value is
true or the WindowStyle property value is Hidden."
<http://msdn2.microsoft.com/en-us/library/system.diagnostics.process.startinfo(d=ide).aspx>

Does anyone have a way around this? Unless I remove the UserName and
Password from the ProcessStartInfo I get a new visible window flashing
every time I start a process and it's really giving me a headache.

Thanks in advance.

Author
30 May 2006 5:36 PM
William Stacey [MVP]
I recall the same issue with no workaround.  I told Brad Abrams about it on
his blog, and he talked about posting a workaround, but I never saw it.  I
think they may need to fix the win32 call.

--
William Stacey [MVP]

"Walther Homme" <nospam@nospam.net.invalid> wrote in message
news:447c75a3$1@news.broadpark.no...
| Hello :)
|
| "If you call the Start(ProcessStartInfo) method with the
| ProcessStartInfo.UserName and ProcessStartInfo.Password properties set,
| the unmanaged CreateProcessWithLogonW function is called, which starts
| the process in a new window even if the CreateNoWindow property value is
| true or the WindowStyle property value is Hidden."
|
<http://msdn2.microsoft.com/en-us/library/system.diagnostics.process.startinfo(d=ide).aspx>
Show quote
|
| Does anyone have a way around this? Unless I remove the UserName and
| Password from the ProcessStartInfo I get a new visible window flashing
| every time I start a process and it's really giving me a headache.
|
| Thanks in advance.

AddThis Social Bookmark Button