Run the MFC application.
The self-extracting setup file installs the MFC application that's in the folder so specified in step 2. The application runs successfully because the Visual C + + Redistributable Package installer are included in the Self-extract ing setup file.
Important |
To determine which version of the runtime is installed, the installer checks the registry key \hklm\software\microsoft\vis Ualstudio\11.0\vc\runtimes\[platform]. If the currently installed version is newer than the version and the installer are attempting to install, the installer re Turns success without installing the older version and leaves an additional entry on the installed Programs page in the Co Ntrol Panel. |
Redistributing Visual C + + FilesVisual StudioOther VersionsWhen you deploy a application, you must also deploy the files that is required to support it. If any of these files is provided by Microsoft, check whether is permitted to redistribute them. To review the Microsoft software License Terms, see license.htm in the directory where Visual Studio was installed, or on t He Visual Studio installation media. To view the "REDIST list" which is referenced in the "distributable Code" section of the Microsoft software License Terms F or certain editions of Visual Studio, see Distributable Code for Microsoft Visual Studio and Microsoft Visual Studio SDK on the Microsoft website. For more information on redistributable files, see Determining which DLLs to redistribute and Deployment Examples.
To deploy redistributable Visual C + + files, you can use the Visual C + + redistributable Packages (Vcredist_x86.exe, Vcre Dist_x64.exe, or Vcredist_arm.exe) that is included in Visual Studio. These files can be found under your Visual Studio installation directory in program files [(x86)]\microsoft Visual studio& nbsp version \vc\redist\ locale \. Another option is to use redistributable merge modules (. msm files), which can be found in program files [(x86)]\common Fi Les\merge modules\. It ' s also possible to directly install redistributable Visual C + + DLLs in the application local folder , whic H is the folder that contains your executable application file. For servicing reasons, we don't recommend that and this installation location.
The
The Visual C + + redistributable Packages install and register all Visual C + + libraries. If You use one, you must set it-to-run on the target system as a prerequisite to the installation of your application. We recommend that's these packages for your deployments because they enable automatic updating of the Visual C + + Lib Raries. For an example on how to use these packages, see walkthrough:deploying a Visual C + + application by Using the Visu Al C + + redistributable package.
Each Visual C + + Redistributable Package checks for the existence of a more recent version on the machine. If A more recent version was found, the package was not installed. Starting in Visual Studio, redistributable packages display a error message stating that Setup failed. If A package is the run by using the /quiet flag, the no error message is displayed. In either case, an error was logged by the Microsoft installer, and an error result was returned to the caller. Starting in Visual Studio packages, you can check a registry value to find out if a more recent version is installed. The currently installed version is stored as a REG_SZ value in the version key in Hkey_local_machine\software[\wow6432nod E]\microsoft\devdiv\vc\servicing\14.0\runtimeminimum. You don ' t need to install your redistributable package if the currently installed version are more recent.
If You use a merge module that contains a Visual C + + DLL, you must include it in the Windows Installer package (or similar installation package) That's the using to deploy the application. For more information, see Redistributing the components by Using the Merge Modules. For the example, see Walkthrough:deploying a Visual C + + application by Using a Setup Project, which also shows InstallShield Limited Edition to create a installation package.
Potential Run-time ErrorsIf a Visual C + + library DLL is not reachable and Windows cannot load it for your application, this message could be Displaye D: This application have failed to start because Msvcr<version Number>.dll is not found. Re-installing the application may fix this problem.
To resolve this kind of the error, make sure that your application builds correctly and that Visual C + + libraries is correctl Y deployed on the target system. For more information, see Understanding the Dependencies of a Visual C + + application.
related Topics
Title |
Description |
Redistributing components by Using the Merge Modules |
Describes how to use Visual C + + Redistributable merge modules to install the Visual C + + runtime libraries as shared DLLs I n the%windir%\system32\ folder. |
Redistributing Visual C + + ActiveX Controls |
Describes how to redistribute a application that uses ActiveX Controls. |
Redistributing Database Support Files |
Discusses how to redistribute support files for Data Access Objects (DAO) and the database technologies in the Microsoft D ATA Access SDK. |
Redistributing the MFC Library |
Describes how to redistribute a application that uses MFC. |
Redistributing an ATL application |
Describes how to redistribute a application that uses ATL. Starting in Visual Studio, no redistributable library for ATL is required. |
Deployment Examples |
Links to examples this demonstrate how to deploy Visual C + + applications. |
Deploying Native Desktop Applications (Visual C + +) |
Introduces Visual C + + deployment concepts and technologies. |