QuestionHow do I manually register a .DLL in my .MSI package?
Answer
To manually register a .DLL using regsvr32.exe in your .MSI package:
- Go to MSI Script.
- Add an Execute Program from Destination custom action after InstallFinalize in the Execute Immediate tab.
- The Execute Program From Destination dialog appears. Fill in the following information:
- Custom Action Name: Enter a name.
- Working Directory: Enter SystemFolder.
- EXE and Command Line: Enter the full path to regsvr32.exe and the full path to .DLL.
Example: [SystemFolder]regsvr32.exe [WindowsFolder]Test.DLL
- Accept all other defaults and click OK.
- Ensure that the custom action has a condition around it so that it only executes when the installation is getting placed on the computer:
If Not Installed
Execute Program from Destination
End Statement
Note: Add a separate custom action for each file.