Actual Installer
software installer

How to register COM DLL and .NET DLL Assembly using Actual Installer

Back

Actual Installer allows you to create an installation package, which can deploy and register your components on target computers.

In Actual Installer, it is very easy to specify a DLL file ( COM DLL or .NET DLL Assembly ) to be registered automatically on user's computer.
First, you need to add the DLL file to the package on the Installation \ Files and Folders page. Then, go to Register \ Others and click Add. In the new dialog specify:
File: specify the DLL file you've added
Register As: select DLL/ActiveX for COM DLL or .NET Assembly for .NET DLL
Unregister on uninstall: select this option to automatically unregister the DLL during uninstallation

That's all. The DLL file will be installed / registered during installation, and unregistered on uninstall.


Alternative way for registering DLL

NOTE: The following article was created for earlier versions of Actual Installer (till 6.0).

You may also use the regsvr32.exe file for registering / unregistering DLL files. To do it, go to the System \ Commands tab and add the following:

File: 		<SystemDir>\regsvr32.exe
Parameters: 	/s "<InstallDir>\File.dll"
Launch on OS: 	Any
Show: 		Normal
Timing: 	After Installation
Wait: 		Yes

The /s switch means the Silent mode (no message boxes will be displayed).

If you need to register a 64 bit DLL file, then don't worry about the process! Actual Installer uses appropriate regsvr32.exe file (just make sure to select the 64-bit only option on the General \ Requirements tab):
On 64-bit Windows, <SystemDir>\regsvr32.exe is equal to
%windir%\System32\regsvr32.exe , not to
%windir%\SysWoW64\regsvr32.exe .

To unregister this DLL on uninstall, add the following command:

File: 		<SystemDir>\regsvr32.exe
Parameters: 	/s /u "<InstallDir>\File.dll"
Launch on OS: 	Any
Show: 		Normal
Timing: 	Before Uninstallation
Wait: 		Yes


How to register .NET DLL using RegAsm for COM Interop

To get the .NET DLL (assembly) working on a target machine, it need to be registered with RegAsm.exe (Microsoft .NET Framework Assembly Registration Tool), like this:
regasm.exe File.dll /codebase

Regasm.exe comes with the .NET Framework package. So first, we need to ensure that .Net Framework is installed on the target machine. To make it, go to the General \ Software Prerequisites tab and select .NET Framework and required version.

Then we need to get the location of regasm.exe, as it may not be in the environment variables. The location depends on the .NET Framework version:

.NET Framework 2.0:
"C:\Windows\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe"
"C:\Windows\Microsoft.NET\Framework64\v2.0.50727\RegAsm.exe"
.NET Framework 4.0:
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe"
"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe"

The path to RegAsm.exe is stored in the variable <RegAsmExe>

To register .NET DLL assemblie from COM interop, go to the System \ Commands tab and add the following:

File: 		<RegAsmExe>
Parameters: 	"<InstallDir>\File.dll" /s /codebase
Launch on OS: 	Any
Show: 		Normal
Timing: 	After Installation
Wait: 		Yes

To unregister .NET DLL on uninstall, add the following:

File: 		<RegAsmExe>
Parameters: 	"<InstallDir>\File.dll" /s /u
Launch on OS: 	Any
Show: 		Normal
Timing: 	Before Uninstallation
Wait: 		Yes