tags:

views:

406

answers:

2

my application requires the microsoft visual c++ redisributable package (vcredist_x86.exe). i have a custom action to run the vcredist_x86.exe

i want it to run only if it's not already installed. i created a registry search to check it.

the question: how do i run this action with the check? when using the InstallExecuteSequence element, as shown below, the vcredist_x86.exe crashes because you cannot run an msi while running a different msi

thanks,

Uzi

+1  A: 

what you need is a bootstrapper that would install the VC++ redistributable before your MSI starts. i'm using open source dotNetInstaller and it works pretty well.

Mladen Prajdic
trying to avoid one.. currently i'm using a custom action <CustomAction Id='vcredist_x86' BinaryKey='vcredist_x86.exe' ExeCommand="" Execute='immediate' Return='check' /> which runs before the msi starts which is OK, the only thing is that i cannot perform the check if the package is already installed. is there a way to add a condition to the custom action?
Uzi
+2  A: 

Don't use the exe at all. To distribute the VC++ runtime in an msi-based install, use a merge module. No custom actions, no conditions to add, it just works.

Aaron Stebner's blog specifically talks about doing this with WiX. http://blogs.msdn.com/astebner/archive/2007/02/13/building-an-msi-using-wix-v3-0-that-includes-the-vc-8-0-runtime-merge-modules.aspx

Ed

related questions