Click here to Skip to main content
15,939,243 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to deploy VC 9.0 MFC application for pc that has nothing except OS installed? I did it but got error "class not registered" when I start that Application on Target Machine.I searching on google from last 2 days but can't do it. I have to use only setup.msi not setup.exe. Because for 2 MB Application it's not good to install framework. Is there anyone who has deployed MFC Application and solve problem like me?
Posted
Updated 15-Apr-11 0:24am
v2

Creating a Setup as John suggests is the best way to deploy your application.

But if you want to install the required libraries without creating a Setup project, you need to install this:
Package redistribuable Microsoft Visual C++ 2008 (x86)[^]

There are several packages depending on Visual Studio version, Service Packs, and so on. That's why creating a Setup project is better. Maybe this will help:
How to: Deploy using a Setup and Deployment Project [^]
How to: Deploy a Setup and Deployment Project[^]
 
Share this answer
 
Comments
aditshah_22 15-Apr-11 6:22am    
I did it but got error "class not registered" when I start that Application on Target Machine.I searching on google from last 2 days but can't do it. I have to use only setup.msi not setup.exe. Because for 2 MB Application it's not good to install framework.
Olivier Levrey 15-Apr-11 7:25am    
Are you sure you are not using something else in your application? A COM component or a video codec or something? You need to install these components as well.
aditshah_22 18-Apr-11 2:28am    
Detect Dependency Shows only COMDLG32.dll then which merge module should be added. I tried MFC's Merge Modules but still get Class Not Registered. What to do now?
Link your image with static copies of the MFC and C RTL. It will make your EXE and runtime image larger (no sharing) but it will remove the dependency on what the target machine has installed.
 
Share this answer
 
Comments
Hans Dietrich 16-Apr-11 0:59am    
This is what I was going to say, but you beat me to it. My 5.
aditshah_22 18-Apr-11 2:25am    
How should I do it?
aditshah_22 18-Apr-11 2:31am    
Detect Dependency Shows only COMDLG32.dll then which merge module should be added. I tried MFC's Merge Modules but still get Class Not Registered. What to do now?
Create a Setup project in your solution, and it will (by default) include dependency checks for the appropriate versions of MFC and the C Runtime Library. This will force the user to download it if it's not already installed.

It would do you good to learn how to use the tools you have on hand.
 
Share this answer
 
Comments
aditshah_22 15-Apr-11 6:22am    
I did it but got error "class not registered" when I start that Application on Target Machine.I searching on google from last 2 days but can't do it. I have to use only setup.msi not setup.exe. Because for 2 MB Application it's not good to install framework.
Graham Shanks 15-Apr-11 6:41am    
Do you mean that you have created a Setup project and used the msi file that it created? If you did, then it could mean a permissions problem. However if you didn't then you need to do so, or follow Olivier's suggestions (which is harder). You say it is not good to install the framework, however an MFC application needs the MFC and C Runtime libraries installed - that's the price you have to pay for using MFC. If you don't want to install the MFC libraries then you need to rewrite your application to use the Windows API functions instead. Even then you'll still need the C runtime libraries
aditshah_22 18-Apr-11 2:32am    
Detect Dependency Shows only COMDLG32.dll then which merge module should be added. I tried MFC's Merge Modules but still get Class Not Registered. What to do now?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900