tags:

views:

42

answers:

1

I'm working on a new product that uses an Active-X control that requires the Microsoft Foundation Class and XML Parser libraries:

MFC42.DLL (6.00.8447.0) MSVCRT.DLL (6.00.8397.0) MSXML3.DLL (8.00.7820.0) MSXML3A.DLL (8.00.7820.0) MSXML3R.DLL (8.00.7820.0)

Since my product is only for Windows XP and newer, I was wondering if it is necessary to include these files in my installer. Are they not pre-installed with newer Windows versions? If not, do you just redistribute these 5 files or have the user download the vcredist_x86.exe package?

Also, the ActiveX control's guide says to install the files in the Windows system folder. I hate that. Shouldn't it be OK to just install them in my own folder? I'd assume Windows would search the local path for files first?

A: 

I have no experience with writing ActiveX controls, but for normal executables, the DLL's can be put in the same folder as the executable, provided that you use a Visual Studio version prior to VS2005.

Starting from VS2005, the run-time DLL's (C/C++ runtime, MFC, ATL) have to be installed in the Windows side-by-side cache (C:\Windows\WinSxS) using an installer that's installed together with Visual Studio. There's also the possibility to use a private assembly. This means that you don't install the DLL's in the Side-by-Side cache, but you have to install them in subfolders of the folder where your executable is installed.

Finally, you could also opt to statically link with MFC. Then it's not needed anymore to distribute or install the MFC DLL's.

EDIT: See http://msdn.microsoft.com/en-us/library/aa376307%28VS.85%29.aspx for an explanation on global/public and per-application/private assemblies. You probably want to investigate the per-application assemblies.

Patrick