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

Actual Installer allows you to create an installation package, which can deploy and register your components ( COM DLL or .NET DLL Assembly ) on target computers.
First, you need to add DLL/OCX files to the package on the Installation \ Files and Folders page. Then, go to Register \ Others and click Add. In the Register dialog specify:

.NET Assembly Registration

File: specify the DLL file you've added
Type: select DLL/ActiveX for OLE controls 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.

NOTE: For registering DLL / ActiveX the setup program uses Windows utility RegSvr32.exe which calls DllRegisterServer. The command for registering is:
%windir%\System32\regsvr32.exe "path to DLL" /s
/s means Silent Mode.
If you have issues with registering your component, try to execute the setup program with command-line parameter /T (test mode, registration is made without /s parameter) to see the result of the command. Also it may help if you install your DLL file into System32 directory (destination variable <SystemDir>, instead of <InstallDir>).

For registering .NET Assembly the setup program uses RegAsm.exe with the following parameters:
RegAsm.exe "AssemblyFile" /codebase /s
If you need to pass additional parameters, please read below how to do it.


Alternative way for registering DLL

You may also use System \ Commands to register and unregister your DLL files.
The command for registering:

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

The command for UnRegistering:

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

The /s switch means the Silent mode (no message boxes will be displayed).
The /u switch means UnRegisiter.
<SystemDir> is an installer variable which returns %windir%\System32 or %windir%\SysWoW64

Please note that on Windows 64-bit, there are two versions of Regsv32.exe file: 64-bit version is located in %windir%\System32 folder; 32-bit version is in %windir%\SysWoW64.
By default, 32-bit version is used.
If your aplication and component are 64 bit, 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. In this case, on 64-bit Windows, <SystemDir>\regsvr32.exe returns %windir%\System32\regsvr32.exe

If you application is 32-bit, but the component is 64-bit, then make the following:
Unselect the option "64-bit only", and add a command for registering:
in the File field type: <WindowsDir>\sysnative\regsvr32.exe. In OS select "64-bit".
Read more about installation on 64-bit Windows.

How to register .NET DLL using RegAsm for COM Interop

To make .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