Re: Problem running vc++ program

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Generally, you should avoid requiring that any files in the c:\windows folder. This is
now considered very poor style, particularly because, for security reasons, many sites
"lock down" these directories and do not allow files in them to be modified. A .ini file
should, if used at all (and even using one is considered highly retro programming) should
be in the executable directory, or if it contains user-specific information, in the My
Documents folder or a subfolder of My Documents.

I suspect that you have made one of the most common mistakes: assuming that copy ==
install. You have to make sure that all the proper DLLs that you use are also installed.
There is a class of DLLs called "redistributable DLLs" that form a consistent set. If the
target machine does not have the right set of DLLs installed, the message you see is one
of the possible consequences.

Providing you do not use DLLs of your own, you could use static linking, but a better
solution is to use an installer that guarantees that the correct set of DLLs (including a
lot of DLLs you may never have heard of, but which are essential) have been installed.

The problem is not one of debug-vs-release but one of correct-set-of-support-DLLs vs.
wrong-set-of-support-DLLs.
joe

On 16 Nov 2006 08:30:26 -0800, bg_ie@xxxxxxxxx wrote:

Hi,

I have created a program for my friend using VC++. I have build the
program as a Release and I have sent the resulting exe file in the
Release folder to him. I have also asked him to copy a ini file to the
c:/windows folder as this file is used to see where files should be
stored. My friend has copied the ini file to this directory, but when
he executes the program he gets a error message saying that the program
can not start because its configuaration is incorrect, and that this
error can be fixed by rinstalling the program.

This is the first time I've done a release program. Before I've just
made programs for my own use. What should I be doing so that my friend
can run the program? What should I be sending him. The program works
fine on my machine, but I have Microsoft Visual Studio installed on it
so that might be why.

Thanks for your help,

Barry.
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: Service installation
    ... My service is a socket server which accesses the database>using two DLLs. ... >> In the VS File System View, you can right-click "File System on Target>Machine",>> Add Special Folder, and the GAC is there. ... >> The side-by-side model really is the way to go - just install those>assemblies>> with the apps that need them, putting them in their application folders. ...
    (microsoft.public.dotnet.framework.setup)
  • How does one share a private assembly dll between dependent dlls?
    ... the question since I can't expect the customer to install these. ... extra dlls. ... installation folder. ... Each of these plugins also depend on the VC80 ...
    (microsoft.public.vc.mfc)
  • Re: How does one share a private assembly dll between dependent dlls?
    ... This lets you install the dlls in your local folder: ... Each of these plugins also depend on the VC80 ...
    (microsoft.public.vc.mfc)
  • How get path after application published
    ... The below macro works fine when ... application and i get setup file and then when i install the ... please any friend know how to get installed application path or any ... if i make new folder in My.Resources and give it name "Folder1" then ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Service installation
    ... Well, I suppose I can install it all in the application folder, but I still ... How do I install DLLs into the GAC from the setup? ...
    (microsoft.public.dotnet.framework.setup)