- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Add "Microsoft Visual C++ 2022 Redistributable Package (x64/x86)" to existing InstallShield MSI...
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Add "Microsoft Visual C++ 2022 Redistributable Package (x64/x86)" to existing InstallShield MSI project without creating/adding setup.exe launcher
Hi,
We were using InstallShield 2015 SP2 MSI project which creates .MSI installer package on release build. Since our application was using Visual Studio 2008 for development, we included the required "Merge Modules" available in "Application Data->Redistributabes" section in the MSI project. The installer package creation and the built packages were working fine on the target platform (e.g. Windows 7 and Windows 10).
We have recently ported our application to use the latest version of Visual Studio 2022. We have also upgraded the InstallShield projects from version 2015 SP2 to 2023 R1, which includes several new features and improvements.
Note:
Microsoft has deprecated the use of merge modules for Visual C++ Redistributable files in Visual Studio 2019 and later. This is because merge modules cannot be updated by Windows Update, which means that applications that use merge modules may not be able to take advantage of security or bug fixes that are released for the redistributable files.
Instead, Microsoft recommends using central deployment of the Visual C++ Redistributable package. Central deployment installs the redistributable files in the %SYSTEMROOT%\system32\ folder for use by all applications and users.
When I opened our InstallShield 2023 R1 MSI project and included the "Microsoft Visual C++ 2022 Redistributable Package (x64/x86)" available in "Application Data->Redistributabes" section as "InstallShield prerequisites" and run the build, the build failed with following error:
ISDEV : error -7067: Your project contains InstallShield prerequisites. A Setup.exe setup launcher is required if you are building a release that includes InstallShield prerequisites. Change your release settings to build Setup.exe, or remove the prerequisites from your project.
I had to change "Media->Releases->Release 1->setup.exe->setup launcher->yes" to make the build compile without error, but it is creating a setup.exe file instead of .MSI installer file.
Questions/Help:
- Is setup.exe inclusion or creation in "release build" mandatory to include the InstallShield prerequisites?
- We were shipping .MSI installer package created in the release build to our customers till now. Is there a way to continue to do whilst adding the "Microsoft Visual C++ 2022 Redistributable Package (x64/x86)" redistributables to .MSI installer package without creation of setup.exe?
Regards
Sridhar
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @skalimikonda ,
If we include prq in a project file, then its mandatory to add a setup.exe, meaning we need to select setup launcher to YES under release -> setup.exe tab
if you dont want to include setup.exe and if you still want to run vcredist.exe you can write your own code or using installscript Customaction to run this exe package,.
Please refer below link, which explain on running vcredist using installscrip CA.
https://stackoverflow.com/questions/27312229/install-vcredist-x86-exe-from-my-installshield-seteup
Having said that, we have windows limitation of running 2 installers at a same time,
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Thank you Varul.
What are the best practices to install "Microsoft Visual C++ 2022 Redistributable Package (x64/x86)" runtime with our .MSI project. Can it be installed as merge module? If so, where can I find the merge module for this from Microsoft Official link?
Regards
Sridahr
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi Sridahr (@skalimikonda),
Thank you for your post.
My understanding is that Microsoft does not provide a merge module for this specific redistributable, only a prerequisite. Hence, you would need to decide whether to use a prerequisite, because that is the only option that we are aware of.
Please let us know if you have any questions or concerns. Thanks!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Thank you Ian.
I found the "C++ 2022 Redistributable MSMs" runtime package for the merge modules in the Visual Studio Build Tools 2022 setup installer package under the "Compilers, build tools, and runtimes" in "Individual components" section. When I downloaded and installed the merge module runtime package, the merge modules were installed into "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Redist\MSVC\v143\MergeModules" folder.
I copied these merge modules into the "C:\Program Files (x86)\InstallShield\2023\Modules\i386" folder, which is where all the merge modules are found. When I opened the InstallShield project file, it was able to include the required x86 and x64 VC 2022 runtime merge modules in InstallShield 2023 R1 project in "Redistributables" section.
I was able to include the VC ++ 2022 merge module into InstallShield 2023 R1 project using this approach and the installed MSI package created using this approach is able to install the required VC ++ 2022 runtime on Windows 10 correctly and application works fine.
Do you think this approach is good to include the VC++ 2002 runtime into the InstallShiedl MSI project? If not, can you please suggest the right approach to include the latest VC++ 2022 runtime merge modules?
Regards
Sridhar
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
You are welcome Sridhar (@skalimikonda).
Please accept our apologies for the confusion. We were under the impression that Microsoft does not provide a merge module for this redistributable, only a prerequisite. The information you shared is very helpful.
Yes, the approach that you described looks correct. Please give it a try. Does it work for you?
Please let us know if you have any questions or concerns. Thanks!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hello Ian,
Thank you for the clarification.
Can you please confirm whether the approach followed to copy the Merge Modules from "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Redist\MSVC\v143\MergeModules" folder to "C:\Program Files (x86)\InstallShield\2023\Modules\i386" folder, the right way to deploy the external merge modules from Microsoft?
Are there any best practices to deploy and use the VS 2022 runtime so it is done correctly?
Can I understand why InstallShield 2023 R1 -> Tools -> Redistributable Downloader not able to check for the latest redistributables and list these merge modules for the user to use download and use directly?
Microsoft has deprecated the use of merge modules for Visual C++ Redistributable files in Visual Studio 2019 and later. This is because merge modules cannot be updated by Windows Update, which means that applications that use merge modules may not be able to take advantage of security or bug fixes that are released for the redistributable files. Please refer the link https://learn.microsoft.com/en-us/cpp/windows/redistributing-components-by-using-merge-modules?view=msvc-170 for more details.
So deploying and using the merge modules as suggested in our approach and good approach?
Regards
Sridhar
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hello Sridhar (@skalimikonda),
Thank you for your reply.
You mentioned:
Microsoft has deprecated the use of merge modules for Visual C++ Redistributable files in Visual Studio 2019 and later.
Hence, using merge modules for Visual C++ redistributables is not a best practice, per Microsoft. Therefore, we cannot assist you since it is not a best practice.
We suggest using a prerequisite instead as a best practice way of including the redistributable.
Thanks!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hello Ian,
I was further researching on it.
If we have the merge modules for Visual C++ 2022 Runtime distributed from Microsoft (as part of Visual Stdio 2002 setup under "C++ redistributables MSMs") then we can use those merge modules. I'm not sure why InstallShield is not able to find ship those merge modules in "InstallShield 2023 R1 -> Tools -> Redistributable Downloader ".
One question which is still confusing, if Microsoft has deprecated use of merge modules for VC++ 2019 runtime and later (as suggested in one my previous comment above), then why are they still releasing those merge modules as "Individual Components" in VS 2022 setup.
Hence, I thought I would take some expert advice here to better understand the best practices to install the VC++ 2022 runtime as it might break the other application or our application itself in some (unknown scenarios). I am pretty sure most of them using InstallShield 2023 R1 in the community might have come across this case. I appreciate if some can help me with the best practices for our scenario.
Regards
Sridhar
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)