R
Rob R. Ainscough
I have a Windows Service with a timer that use the .NET 2.0 Shell command.
The Shell command returns a non-zero number but Task Manager shows the
shelled exe running but there is NO visible interface (there should be
one) -- I pass AppWinStyle.NormalFocus.
If I execute the exact same in a Windows form test app, the Shell works
flawlessly.
I've tried Diagnostics.Process approach rather than Shell but have the same
results -- my app appears to run but with no visible interface??
If I run my shelled app stand alone it works fine.
Is there some kinda bizarre problem with Shell or Diagnostics.Process where
it can't be executed in timer.elapsed event due to some threading conflicts
or something? Shell is asynchronous (not wait or timeout value set) so I
don't think this would be any issue at all.
I've done the usual diagnostics and put in trace code that is logged to my
event log and following execution of both my service code and shelled app --
all indicates functioning correctly, just no visible interface (form will
not show). Like I said for Shell I've got AppWinStyle.NormalFocus and for
the Diagnostics.Process approach I set StartInfo.WindowStyle =
ProcesssWindowStyle.Normal.
I'm at a complete stand still -- Any suggestions?
Rob.
The Shell command returns a non-zero number but Task Manager shows the
shelled exe running but there is NO visible interface (there should be
one) -- I pass AppWinStyle.NormalFocus.
If I execute the exact same in a Windows form test app, the Shell works
flawlessly.
I've tried Diagnostics.Process approach rather than Shell but have the same
results -- my app appears to run but with no visible interface??
If I run my shelled app stand alone it works fine.
Is there some kinda bizarre problem with Shell or Diagnostics.Process where
it can't be executed in timer.elapsed event due to some threading conflicts
or something? Shell is asynchronous (not wait or timeout value set) so I
don't think this would be any issue at all.
I've done the usual diagnostics and put in trace code that is logged to my
event log and following execution of both my service code and shelled app --
all indicates functioning correctly, just no visible interface (form will
not show). Like I said for Shell I've got AppWinStyle.NormalFocus and for
the Diagnostics.Process approach I set StartInfo.WindowStyle =
ProcesssWindowStyle.Normal.
I'm at a complete stand still -- Any suggestions?
Rob.