Question

Since I updated my installshield version from 2012 Spring to 2013, my installer is no longer installing Visual C++ redistributable package if needed. My application is targeting x86 platform, that's why I need vc_redistx86 to be installed on user's PC. It is the same application for both x64 and x86 PCs.

Because I'm now using Visual Studio 2012 update 4, I've created my own .prq:

<?xml version="1.0" encoding="UTF-8"?>
<SetupPrereq>
    <conditions>
        <condition Type="1" Comparison="2" Path="HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{33d1fd90-4274-48a1-9bc1-97e33d9c2d6f}" FileName="" ReturnValue=""></condition>
    </conditions>
    <operatingsystemconditions>
        <operatingsystemcondition MajorVersion="6" MinorVersion="0" PlatformId="2" CSDVersion="" ServicePackMajorMin="2"></operatingsystemcondition>
        <operatingsystemcondition MajorVersion="6" MinorVersion="1" PlatformId="2" CSDVersion="" Bits="1" ServicePackMajorMin="1"></operatingsystemcondition>
        <operatingsystemcondition MajorVersion="6" MinorVersion="2" PlatformId="2" CSDVersion=""></operatingsystemcondition>
    </operatingsystemconditions>
    <files>
        <file LocalFile="&lt;ISProductFolder&gt;\SetupPrerequisites\VC 2012 Redist\x86\vcredist_up4_x86.exe" URL="http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe" CheckSum="7F52A19ECAF7DB3C163DD164BE3E592E" FileSize="0,6554576"></file>
    </files>
    <execute file="vcredist_up4_x86.exe" cmdline="/q" cmdlinesilent="/q" returncodetoreboot="1641,3010"></execute>
    <properties Id="" Description="This prerequisite installs the Microsoft Visual C++ 2012 Runtime Libraries (x86)." AltPrqURL=""></properties>
    <behavior Reboot="2"></behavior>
</SetupPrereq>

Of course, I've downloaded the vc_redist_x86 for VS2012 update 4, and placed there \SetupPrerequisites\VC 2012 Redist\x86\vcredist_up4_x86.exe

Is it correct?

Was it helpful?

Solution

You have to make sure that you .prq file embbed the right operating system conditions in order to be installed correctly on every target machine.

According to this MSDN Page - Windows versions, you'll find what is missing and what lines need to be added.

For example here are only requirements for windows 7 and 8 x86 versions, if you want to deploy on x64 you are missing this kind of xml condition :

-- operatingsystemcondition MajorVersion="6" MinorVersion="0" PlatformId="2" CSDVersion="" Bits="4" ServicePackMajorMin="2"> operatingsystemcondition

Cheers :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top