distribute (MFC71*.DLL) files with a MSI
Hello everybody,
We are currently migrating from Windows XP to Windows 7, so all our applications need to be repackaged. For those jobs we use the Adminstudio 10 (ZENworks edition) repackager tool. We use the ZENworks edition because we have Novell. Anyhow, we got some applications that want to distribute some dll files on the local drive. In Adminstudio you see that the dll files will be copied to a specific folder. Let's say for an example : C:\Program Files\Application\bin\. But instead of copying the files to the \bin\ directory, it will copy to the highest folder, in this case \Application\. But NOT all the dll files are in that location. I noticed it only happends with files that are named like M*71*.dll. For an example these dll files:
mfc71.dll, mfc71u.dll, msvcp71.dll, msvcr71.dll
I searched the big interwebs for a clue why the Windows Installer would take this action. So now I just use a batch that copies the *.dll files in the correct location. Though I don't want to use this. For some more debugging I also enabled the debug log of Windows Installer and I noticed these logging data:
MSI (s) (E4:BC) [13:46:07:539]: Executing op: ComponentRegister(ComponentId={F607CA48-C332-4029-AF8A-39BDF6912CD4},KeyPath=C:\Program Files\application\mfc71.dll,State=3,,Disk=1,SharedDllRefCount=0,BinaryType=0)
1: {179E8518-D4AB-47A4-B403-B8379CCA3227} 2: {F607CA48-C332-4029-AF8A-39BDF6912CD4} 3: C:\Program Files\application\mfc71.dll
MSI (s) (E4:BC) [13:46:07:539]: WIN64DUALFOLDERS: Substitution in 'C:\Program Files\application\mfc71.dll' folder had been blocked by the 1 mask argument (the folder pair's iSwapAttrib member = 0).
MSI (s) (E4:BC) [13:46:07:539]: Executing op: ComponentRegister(ComponentId={12488EAD-69F8-497C-BB66-14A83F420EFE},KeyPath=C:\Program Files\application\MFC71CHS.DLL,State=3,,Disk=1,SharedDllRefCount=0,BinaryType=0)
Answers (2)
Are you using Merge Modules to install these dlls (If not, you should, btw, I'm pretty sure they are available for Microsoft Foundation Classes). Start by adding these to your packages and setting their target directory to where you want them to end up (as opposed to the MM default, which I don't think you want in this case)
PJ