Discussion:
running System.Diagnostics.Process hidden and getting a timeout
(too old to reply)
Sonnich Jensen
2018-12-18 14:35:40 UTC
Permalink
Hi all

I am using System.Diagnostics.Process to execute an Exe or bat of the customers wish.
We use cmd /c to do this.
This works well in Windows 7, even when running things that expects and input (such as pause - they are bypassed)
In windows 10 this does not work, it hangs at the "pause" (press space to continue...). Adding a timeout will end execution.

In win7 I dont even see the standard output for "pause", it is just ignored.
In windows 10 I dont see it wither, but it hangs there for the timeout.

Have anybody else worked with this?
Luuk
2018-12-18 18:46:55 UTC
Permalink
Post by Sonnich Jensen
Hi all
I am using System.Diagnostics.Process to execute an Exe or bat of the customers wish.
We use cmd /c to do this.
This works well in Windows 7, even when running things that expects and input (such as pause - they are bypassed)
In windows 10 this does not work, it hangs at the "pause" (press space to continue...). Adding a timeout will end execution.
In win7 I dont even see the standard output for "pause", it is just ignored.
In windows 10 I dont see it wither, but it hangs there for the timeout.
Have anybody else worked with this?
make sure the checkbox 'allow service to interact with desktop' is not
checked
( see:
https://stackoverflow.com/questions/4237225/allow-service-to-interact-with-desktop-in-windows
)

Loading...