fossil
Posts: 13
Joined: Wed Sep 12, 2007 6:55 pm

BUG: Attached Dll custom actions in the same DLL

Running: Advanced Installer 5.2.2 IDE (new install)
On: Windows XP SP2, dual Xeon

Under certain conditions, adding two or more Attached Custom Actions referring to the same DLL can render the AIP project file unusable.

To reproduce:
1. Create a new Professional (or Enterprise) project
2. Make sure Paths are relative to Project Root Path and Except when on a different drive options are set in Project Settings
3. In Custom Actions, add a New Attached Custom Action anywhere under InstallExecuteSequence; select any DLL that is on the same drive as the project file (will be); accept all default settings (it does not matter)
4. Save the project and close AI
5. Reopen the newly created project
6. Add a New Attached Custom Action the same way as in step 3, referring to the same DLL; make sure you choose the DLL the same way you did in step 3 -- the letter case of the name and path may make a difference
7. Save the project and close AI

At this point, the project file will look something like this (only relevant part):

Code: Select all

  <COMPONENT cid="caphyon.advinst.msicomp.MsiBinaryComponent">
    <ROW Name="kernel32.dll" SourcePath="..\WINDOWS\system32\kernel32.dll"/>
    <ROW Name="kernel32.dll_1" SourcePath="..\WINDOWS\system32\kernel32.dll"/>
If you attempt to open the project you will get an error message:
Exception - A row with this key [id c:\WINDOWS\system32\kernel32.dll] was already registered in the table.
If it does not break with the second custom action, chances are the paths have different letter case (windows vs. WINDOWS). In that case, try reopening the project and adding a third.

To repair the project file, open it in notepad and:
1. Remove the kernel32.dll_1 (or similar) ROW from MsiBinaryComponent COMPONENT node
2. Replace instances of kernel32.dll_1 (or similar) with kernel32.dll (or similar) under MsiCustActComponent COMPONENT node
Daniela Petrescu
Posts: 30
Joined: Tue Aug 14, 2007 10:03 am

Hi,


Thank you for bringing this to our attention.
We will fix this issue in the next version of A.I.


Regards,
Daniela

_________________
Daniela Petrescu
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”