Solution!

Launch IIS Express via PSEXEC from Sysinternals. It has a /i command line parameter which forces the launched program to run under an interactive desktop, even if the outer shell program wasn't.

Later, when the testing is done, gracefully shut down IIS Express with a simple TaskKill command (without the /F parameter) to send IIS express the WM_CLOSE message. Taskkill must also be launched via PSEXEC with the /i parameter.


(Another working option is to change the Team City build agent so that it no longer runs as a service, set the Team City build agent server to auto-logon to the desktop and launch the Team City agent as a batch file. This gets the agent running under an interactive desktop. But the PSEXEC thing was much easier and didn't require reconfiguration of our agent servers.)
_________________________
Tony Fabris