process started by Process.Start crashes when USB device accessed

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When the process aft.exe is started normally (double click on .exe file),
everything works OK!

When I start aft.exe from a service using Process.Start(), aft.exe crashes
when the sound card or a USB device is accessed.

I thought the problem could be permissions. There is only one hardware
profile on my computer.
 
Hi Landon,

Thanks for your posting. From your description, you've a .net based NT
service in which you use the
Process.Start to create a new process to run a certain application(exe)
which will acess the sound card and USB device. But you found the that new
process will crash. And if you run the exe app via double clicking , that's
ok ,yes?

As for such problem, I think it is likely concerned with the aft.exe app.
Does this app need to run in a UI context or have interactive processing?
Since the windows service / asp.net service application are all
non-UI/non-interactive based, start interactive applicaitons in them will
cause many unexpected errors.
Also, as for the security you mentioned, is your NT service run under a
powerful account or a restricted account?

In addition, you can also try set the ProcessStartInfo's
CreateNoWindow = true
UseShellExecute = false

to see whether it'll help.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
The service that starts aft.exe is correctly set up to allows interactive
operations. I fixed this problem several weeks ago so the aft.exe window is
displayed. The problem comes 1-2 minutes after starting aft.exe when the
sound card or USB audio device is accessed.

aft.exe shows SYSTEM to be the owner in task manager when aft.exe fails

aft.exe shows landon.kelsey to be the owner in task manager when aft.exe
succeeds.

Can a service access the sound card or USB. Obviously a service can access
the network
 
Hi Landon,

Thanks for your response. Yes, the LOCALSYSTEM account can specify
"Interactive Desktop", I've also done some tests on that, and found that
this will work well when there is only single logon user( the service's UI
will interact with logon user correctly), but won't work when there is
multi logon users. Also, of course a service can access the sound card or
USB since there're certain services for devices. But based on my research,
on winxp sp2 , there is automatic protection on device drivers. Is your
testing enviroment XP SP2 or have you tried testing on some other
envioement?
In addition, due to the limitation on the newsgroup communtity, if you feel
this an urgent issue, I suggest that you try contacting the MS PSS so as
to do a thorough troubleshooting.

Thanks
MERRY CHRISTMAS

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Back
Top