I have this situation. I have a custom screensaver that starts another process using System.Diagnostics.Process.Start("MyHelperApp.exe")
. That second process lives on after the screensaver itself is closed and disposed.
The problem is that the screensaver only gets displayed once. Unless I do one of two things:
- Go to Task Manager and kill
"MyHelperApp.exe"
. This will allow the screensaver to run one more time, then I have to repeat this step. - Comment out
System.Diagnostics.Process.Start("MyHelperApp.exe")
. Now the screensaver runs normally, as you would expect.
If I test the screensaver by right-clicking and selecting 'Test', I do not get these problems. I can test it as many times as I want. It is only when Windows manages the installed screensaver that I see this problem.
It is not a blocking problem, because I have screensaver write to a file before getting to System.Diagnostics.Process.Start("MyHelperApp.exe")
, and the file never gets written, so the screensaver is not called a second time.
Windows 7 desktop.