开发者

Run process during windows shutdown

开发者 https://www.devze.com 2023-03-21 17:52 出处:网络
I have a Win32 service, that needs to run a .NET executabl开发者_开发问答e on service stop (for cleanup reasons). I recently discovered that the cleanup never happens on shutdown, because the process

I have a Win32 service, that needs to run a .NET executabl开发者_开发问答e on service stop (for cleanup reasons). I recently discovered that the cleanup never happens on shutdown, because the process creation gets blocked by OS. Does anyone know a way to override this? Process, I am spawning is not invasive and should only run a fraction of a second.


The only way I could find to do it was: pre-create a child process suspended, and them un-suspend it on shutdown.

0

精彩评论

暂无评论...
验证码 换一张
取 消