I believe this is not the case here. You most probably are using Vista or Windows 7 systems to run your tests. Your teamcity agent runs as a service and what you are hitting is session 0 isolation. You can read more here :
To test - is this the case run your agent from command line instead of service and check if it works. One of the solutions is described here but I didn't test that.
Services in those systems just wasn't designed to interact with desktop. Same thing will happen on CruiseControl build server when using is as a service.