J. A. Love

I want to distribute my program using a Setup.exe installation. I've ran my app through depends.exe and there's countless DLLs that it depends on. How do I determine which ones to distribute with my app

I know there's a few that should be on the target machine already (kernel32.dll, user32.dll, etc.) but what about the other 22million DLLs that Dependency Walker is telling me I need, do I really have to ship that many DLLs with my app It seems a bit excessive.

I'm using Visual Studio 2005 Team Suite.




Re: Visual C++ General Deployment and DLLs

crescens2k

Truthfully, the only way to find out is to run it on a non development machine.

In general though, you will have to distribute the CRT with your application for definite, but if you have linked against third party libraries then you will have to distribute them too, otherwise you don't really need to distribute anything else.






Re: Visual C++ General Deployment and DLLs

Simple Samples

Oh, this questions is asked so much; or at least questions with the same answer.






Re: Visual C++ General Deployment and DLLs

Ramkrishna Pawar

List those DLLs here, and also let us know what platforms you are targetting.




Re: Visual C++ General Deployment and DLLs

Simple Samples

What other DLLs I assume you are not asking for all 22million DLLs.

You are implying that you don't expect a deployment will solve the problem, but why Please explain. I hope the person asking the question is not misled to try to solve the problem in an unsupported manner.






Re: Visual C++ General Deployment and DLLs

J. A. Love

@Ramkrishna Pawar

I only plan for my app to be used on Windows XP and Vista.

Here are the DLLs that Dependency Walker loads...

NTDLL.DLL
MSCOREE.DLL
KERNEL32.DLL
ADVAPI32.DLL
RPCRT4.DLL
SHLWAPI.DLL
GDI32.DLL
USER32.DLL
MSVCRT.DLL
IMM32.DLL
MSCTF.DLL
LPK.DLL
USP10.DLL
COMCTL32.DLL
MSCORWKS.DLL
MSVCR80.DLL
SHELL32.DLL
OLE32.DLL
CULTURE.DLL
MSCORLIB.NI.DLL
UXTHEME.DLL
MSCORJIT.DLL
MSVCM80.DLL
MSVCM80.NI.DLL
RSAENH.DLL
SYSTEM.NI.DLL
SYSTEM.DRAWING.NI.DLL
SYSTEM.WINDOWS.FORMS.NI.DLL
GDIPLUS.DLL
SYSTEM.XML.NI.DLL
ICONCODECSERVICE.DLL
WINDOWSCODECS.DLL
VERSION.DLL
CLBCATQ.DLL
OLEAUT32.DLL
SHDOCVW.DLL
USERENV.DLL
SECUR32.DLL
APPHELP.DLL
CSCUI.DLL
PROPSYS.DLL
CSCDLL.DLL
CSCAPI.DLL
BROWSEUI.DLL
DUSER.DLL
TIPTSF.DLL
SETUPAPI.DLL
WININET.DLL
NORMALIZ.DLL
IERTUTIL.DLL
WS2_32.DLL
NSI.DLL
NETWORKEXPLORER.DLL
NTSHRUI.DLL
NETAPI32.DLL
PSAPI.DLL
SLC.DLL
NTMARTA.DLL
WLDAP32.DLL
SAMLIB.DLL
MPR.DLL
NTLANMAN.DLL
DRPROV.DLL
DAVCLNT.DLL
WPDSHEXT.DLL
WINMM.DLL
OLEACC.DLL
PORTABLEDEVICEAPI.DLL
WINTRUST.DLL
CRYPT32.DLL
MSASN1.DLL
IMAGEHLP.DLL
PORTABLEDEVICETYPES.DLL
AUDIODEV.DLL
WMVCORE.DLL
WMASF.DLL
NETSHELL.DLL
IPHLPAPI.DLL
DHCPCSVC.DLL
DNSAPI.DLL
WINNSI.DLL
DHCPCSVC6.DLL
NLAAPI.DLL
ACCESSIBILITY.NI.DLL
IEFRAME.DLL
URLMON.DLL

@Simple Samples

I don't expect deployment to solve a problem, the problem is deployment, itself. I'm asking how do I determine which DLLs need to be distributed with my app The documentation that I've read for VC++ deployment (the link you provided that says "Deployment (C++)") only states that Dependency Walker lists all required DLLs but doesn't mention how to weed out the ones that do and don't need to be redistributed with my app.

I've yet to try crescens2k's suggestion because all of my PCs have Visual Studio installed, so I can't check which DLLs are missing since they already have all DLLs. However, I will find a clean computer to try out later tonight.






Re: Visual C++ General Deployment and DLLs

Simple Samples

I think you read the documentation with a solution in mind and did not give attention to the real answer. You say you "don't expect deployment to solve a problem" and therefore you won't learn how to solve the problem in the manner that Microsoft will tell you to solve it. I am confident that a Microsoft person would provide the same answer I did. See Setup Projects; it says:

"resulting Windows Installer (.msi) file contains the application, any dependent files"....

"you can be assured that everything necessary for installation is included"

I am sorry, but the other people trying to help you are misleading you.

Ignore Depends. It is not a solution nor is it intended to be. It is only a diagnostic tool.






Re: Visual C++ General Deployment and DLLs

Simple Samples

crescens2k wrote:

Truthfully, the only way to find out is to run it on a non development machine.

In general though, you will have to distribute the CRT with your application for definite, but if you have linked against third party libraries then you will have to distribute them too, otherwise you don't really need to distribute anything else.

Please explain why you think a deployment project won't work. Have you ever tried to use a deployment project I am nearly positive that a deployment project can include third-party libraries automatically. I am not saying that a VS-generated deployment project can do every project, but it can do the majority of projects, especially simple projects, and can create the deployment project in just a few minutes.






Re: Visual C++ General Deployment and DLLs

J. A. Love

I see.

I had come across so much material that told me to use depends.exe to find needed DLLs and distrubute those with my app that I simply assumed it was the only way to do things.

But if the Setup project is sufficient, why does every article under Deployment (C++) insist on using depends.exe and manually bundling DLLs That's simply confusing.






Re: Visual C++ General Deployment and DLLs

Simple Samples

I see no mention of the depends.exe program anywhere in that page. I see it described in Understanding Dependencies of a Visual C++ Application but as I said previously that is only for information purposes. Redistributing Visual C++ Files clearly explain that the redistribuatble files need to be installed in a manner described in that page. You can develop your own installer, but it would be a lot of work, more than simply copying files. There is a technique described in a few places in which it is possible to use XCOPY or a simple copy of some type, but you must read and understand what the documentation says about that.




Re: Visual C++ General Deployment and DLLs

J. A. Love

I found the answer on this page: How to: Deploy using a Setup and Deployment Project
The main part is merging modules inside of the Setup and Deployment Project.
From the Project menu, point to Add and click Merge Module. Select Microsoft_VC80_CRT_x86.msm and Microsoft_VC80_MFC_x86.msm, and click OK.







Re: Visual C++ General Deployment and DLLs

Simple Samples

Note that I did provide the answer.

Most questions in the MSDN VC forums are answered by volunteers. We are not paid to write the documentation of Microsoft products. My answer was to read the documentation and I said where to go for the documentation.