InstallShield and Microsoft Visual C++ 2010 Redistributables

Sometimes you need to package some legacy runtime along with with your installers. I realized that after I discovered the reason for a nifty error Could not load file or assembly ChilkatDotNet4.dll or one of its dependencies. To get rid of this, one needed to have Microsoft Visual C++ 2010 Redistributable Package (x86) installed, which can be downloaded here for free. I thought I was happy to have InstallShield 2011 Express in place, so that I could easily add a dependency to the 32Bit Redistributable Package to my setup. However, altough I had this prerequisite set to “always install” it did not install on 64Bit machines. Here is a solution for all poor InstallShield 2011 Express users without a prerequisite editor.

32Bit (x86) of Microsoft Visual C++ 2010 Redistributable Package

It is important to understand that I needed to install the 32Bit version of the redistributables because my application was compiled to run as a x86 application. That means, altough my software can be used on 64Bit machines as well, it will be using 32Bit libraries and system dependencies. Unfortunately the guys at Flexera are always smarter than the rest of the world and therefore they built the InstallShield prerequisite for Microsoft Visual C++ 2010 (x86) so that it will only install on x86 machines but not on x64 machines. Further, as a poor InstallShield Express sucker you are, you won’t have an editor to change this behaviour.

The solution

You basically have to options to get this working:

  1. Pay them another 2000$ per seat for InstallShield Professional or Enterprise.
  2. Fire up Notepad and make a 2-minute-quick-fix.

Because I’m still writing on my 100 reasons for hating InstallShield post I would suggest to go by option 2 and fix it yourself:

  1. In your InstallShield installation directory, find a folder “SetupPrerequisites” and a file “Microsoft Visual C++ 2010 Redistributables Package (x86).prq”
  2. Open the file in Notepad
  3. Remove the text Bits=”1″ from all 5 operatingsystemcondition xml-tags. This is the part that tells InstallShield only to match this prerequisite on x86 machines. Alternatively you can copy&paste the files contents from below.
  4. Save the file; then recompile your setup
  5. Finish!

Patched prerequisite file

If you don’t want to patch the file yourself, just copy and paste this:

<?xml version="1.0" encoding="UTF-8"?>
		<condition Type="1" Comparison="2" Path="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{196BB40D-1578-3D01-B289-BEFC77A11A1E}" FileName="" ReturnValue=""></condition>
		<operatingsystemcondition MajorVersion="5" MinorVersion="1" PlatformId="2" CSDVersion="" ProductType="1" ServicePackMajorMin="2"></operatingsystemcondition>
		<operatingsystemcondition MajorVersion="6" MinorVersion="0" PlatformId="2" CSDVersion=""></operatingsystemcondition>
		<operatingsystemcondition MajorVersion="5" MinorVersion="2" PlatformId="2" CSDVersion="" ProductType="2|3" ServicePackMajorMin="1"></operatingsystemcondition>
		<operatingsystemcondition MajorVersion="6" MinorVersion="0" PlatformId="2" CSDVersion="" ProductType="2|3"></operatingsystemcondition>
		<operatingsystemcondition MajorVersion="6" MinorVersion="1" PlatformId="2" CSDVersion=""></operatingsystemcondition>
		<file LocalFile="<ISProductFolder>\SetupPrerequisites\VC 2010 Redist\x86\vcredist_x86.exe" URL="" CheckSum="B88228D5FEF4B6DC019D69D4471F23EC" FileSize="0,5073240"></file>
	<execute file="vcredist_x86.exe" cmdline="/q" cmdlinesilent="/q" returncodetoreboot="1641,3010"></execute>
		<dependency File="<ISProductFolder>\SetupPrerequisites\Windows Installer 3.1 (x86).prq"></dependency>
	<properties Id="{83960519-644A-4722-BA7A-37D23C1D004F}" Description="This prerequisite installs the Microsoft Visual C++ 2010 Runtime Libraries (x86)." AltPrqURL=" visual c++ 2010 redistributable package (x86).prq"></properties>
	<behavior Reboot="2"></behavior>


Subscribe to my e-mail newsletter to receive updates whenever there is a new post.


7 Responses to InstallShield and Microsoft Visual C++ 2010 Redistributables

  1. Bendik November 25, 2011 at 1:19 pm #

    Thanks a lot, Daniel!

    This saved me a lot of fiddling with the .prq format – and also a lot of money! And I couldn’t agree more with you: Paying $2000 for an upgrade just to get the som proper prq files is just ridiculous. I am btw also a long time InstallShield-hater (allthough we are stuck with it for installing some of our products), so I’d be really interested in your document “100 reasons…”. Please let me know when you’re done and let me have look. I’m sure I could come up with even a few more reasons right on the spot ;-)

  2. Aaron Tyrrell May 17, 2012 at 6:57 pm #

    You just solved a problem that I’ve been scratching my head about for a few days now! Thanks!

  3. Kais Hassan June 9, 2012 at 9:55 pm #

    Many thanks, you helped me solve an annoying issue. I am using InstallShield LE, which is very limited. Still, it is much better than the VS one.

  4. Munawar November 15, 2012 at 8:57 am #

    Bundle of thanks for this smart fix.!
    I had implemented other workaround but was getting a failure error even the installation is successful but your solution saved me.

  5. bashd December 11, 2012 at 1:46 pm #

    Hello, Daniel,

    thank you so much for your nice article. It really saved my day!
    I would like to here about your “100 reasons…”. It’s my first time working with IS LE in particular and although it provides more capabilities than VS Setup, I don’t really like it.

    • Daniel Lang December 11, 2012 at 2:21 pm #

      I totally feel your pain. I can only recommend to go after WiX and buy the excellent book to learn it. Microsoft built the setup for VS2012 with this technology and it seems that a lot of other products use it as well. Its learning curve is even steeper than InstallShield but once you get it, you can do a lot of great things and it is really empowering. In any case, go away from InstallShield – this will only be pain, even with a paid Edition.

  6. lesliel December 23, 2012 at 12:02 am #

    Just use the AltPrqURL link from the Microsoft Visual C++ 2010 Redistributable Package (x86).prq file and change it according to your needs: visual c++ 2010 redistributable package (x64).prq visual c++ 2008 sp1 redistributable package (x86).prq visual c++ 2008 sp1 redistributable package (x64).prq

Leave a Reply