Saturday, October 10, 2009

Solution to registering of DLL problem on 64-bit systems

I was preparing installers for DWG Explorer Column Handler (DWG Columns) when I run into problem with the 64-bit versions for Vista and Windows 7. I used Visual Studio 2008, a C++ project and a basic setup project with a couple of custom actions to register and unregister a DLL file. The 32-bit setup worked without problems.

I first got the following error on Vista 64-bit and Windows 7 64-bit.

Error 1723. There is a problem with this Windows Installer package.
A DLL required for this install to complete could not be run. Contact your support personnel or package vendor.
Action _474A8F1D_82B8_4FC0_8E65_22E8CDBD2B7B, entry: _InstallPropertySchema@4, library:
C:\Program Files\JTB World\DWG Explorer Column Handler\DWGPropertyHandler.dll

After trying to create the setup directly on a 64-bit system I was able to install but the uninstall failed like this.

Error 1723. There is a problem with this Windows Installer package.
A DLL required for this install to complete could not be run. Contact your support personnel or package vendor.
Action _8B4F6610_75E7_462C_AB3D_BDC92ECCF640, entry: _UninstallPropertySchema@4, library:
C:\Program Files\JTB World\DWG Explorer Column Handler\DWGPropertyHandler.dll

I first figured out that I could edit the MSI file with Orca. In the table CustomAction I found the Actions I needed to change.

was changed to

This worked good but needed to be done manually each time.

I then tried to use a trick to change how the DLL is built so it will use the correct name. I tried with the following link step in
Visual Studio>Project Properties>Linker properties>Command Line>Additional options

/export:_InstallPropertySchema@4=InstallPropertySchema /export:_UninstallPropertySchema@4=UninstallPropertySchema

And that worked just great. Now I have installers working for XP, Vista, Windows 7 and both 32-bit and 64-bit.


Some of the latest blog posts

Subscribe to RSS headline updates from:
Powered by FeedBurner