How do I register a dll using regsvr32 under TeamCity/NAnt?

In my nant build script I'm attempting to silently register a custom dll using regsvr32.exe using the <exec> task. Everything I've tried I get a return code of 3.

<exec program="c:\windows\system32\regsvr32.exe" verbose="true">
<arg value="/s" />
<arg value="C:\Workspaces\AHLTA\Current\ThirdParty\CAC\dmdcCAC.dll" />
</exec>

This dll will register fine outside of Teamcity using NAnt.  Can anyone suggest a fix for this please?

Thank you

Jim

1 comment
Comment actions Permalink

Do you run your NAnt script under the same user as from under TeamCity? Exit code 0x3 suggests that the library could not be registered either because the user has not enough permissions to do it, or that regsvr32 cannot access any libraries required by library you are trying to register (again, can be caused by permissions)

Another suggestion would be to try and run regsvr32 using command line runner.

0

Please sign in to leave a comment.