NCover NAnt task expected to work from LocalSystem context?

NCover NAnt task expected to work from LocalSystem context?

Hi!

I'm setting up a CC.Net build with NCover being called through NAnt. It works on my local machine and on my build machine when I login at the console with mstsc. However, it doesn't work when CruiseControl.Net executes it. CC.Net is running as a service using the LocalSystem account. The problem is NCover waits for the profiled application, nunit, to connect, nunit runs normally NCover complains that the application never connected. Ncoverexplorer, the next task, bombs because the NCover output is not available. The nant output looks a bit like this:

Waiting for profiled application to connect.........
<several thousand lines of nunit output removed>
Connected
 Profiled process terminated. Profiler connection not established.

The only difference I can think of is that CC.Net is running as a service under the LocalSystem account. So, it doesn't have interactive access to a desktop, and it has different permissions. LocalSystem is fairly powerful though, as detailed on MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/localsystem_account.asp

I'm a little concerned by this point: The registry key HKEY_CURRENT_USER is associated with the default user, not the current user. To access another user's profile, impersonate the user, then access HKEY_CURRENT_USER.

My understanding of the CoverLib.dll registration is that it uses HKEY_CURRENT_USER. Could this be a problem? Have you ever run the NCover task from a LocalSystem context?

Dave