Question

I use Inno Setup for creating my setup. All works fine, but I run into the problem: how to register the .NET DLL to make it accessable by COM+. As we all know .NET brings RegSvcs.exe for that so I checked the Inno Setup documentation and only found gacinstall which is for Assembly registration, but not use for COM+ interactions. So I added this in the [Run] section

; register .Net components for com+
Filename: {win}\Microsoft.NET\Framework\v4.0.30319\RegSvcs.exe; Parameters: "{app}\bin\Common.dll"; Description: Component registration; WorkingDir: {app}\bin; StatusMsg: Component registration...; Flags: waituntilterminated

But by testing the setup this line is just skipped. The DLL is copied to the target before in the [Files] section and is available. After setup I can manually run RegSvcs.exe from command line as well without a problem.

Was it helpful?

Solution

Inno Setup does it work as intended!

Problem in my case is: RegSvcs.exe install the component with wrong credentials. It install the COM+ with security interactive user but as I call it from a service there is no user, so I need SYSTEM as credentials.

Solution: Write a small pice of code that modify the security credentials after registering. I didn't find any option flags to tell regsvcs.exe it directly. Found a post here http://www.carlosag.net/articles/configure-com-plus how to do it and will now adapt the ideas from there to write a small program to do the job.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top