Hi,

maybe something regarding VS Merge modules vs. VCRedist or in general
my dislike of merge modules:
- Bad personal (+ colleagues) experience (merge modules in general)

- Servicing

- German literature stating "Applications should not be based on
Mergemodules for the installation of components if the producer of the
used merge modul and application differ" (A. Kerl, Inside Windows
Installer 4.5)

- The statements not using merge modules and use micro packages. This
was mentioned in the post from Christopher and discussed the same way
from A. Kerl in 2009

- To not repeat discussions see
http://stackoverflow.com/questions/1190017/should-i-use-vcredist-exe-or-the-msms-to-install-the-visual-c-runtime-library
for some points... pro and con merge modules

- No issues like
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/MSVC-problem-on-Vista-no-SP-td6288551.html
with VCRedist.exe

Sure every developer here has his own experiences and preferences
about merge modules. My experience states prevent if avoidable... and
in case of MSVC use the VCREdist.exe



Thoughts when decided to deploy vcredist.exe:
- Bootstrappers has the con that the user must run the whole
bootstrapper installations which might take some time. Afterwards he
can enter the credentials for the main installer. Entering the
credentials at the very beginning and afterwards running the whole
install seems best for customer experience.
- Chainer seems best approach



Ok back to my implementation and running another MSI in InstallUI.

Regarding
> Also, you can't run an MSI-based install from the execute sequence, that's 
> been mentioned too, so be glad that you didn't think of it because it won't 
> work anyway. Recursive MSI installs don't work. Prepare for error 1618.

Think there was a general misunderstanding: I don't want to run a
second MSI in InstallExecute sequence. I just want to abort the
installation in InstallExecute and return an error if
FindRelatedProducts doesn't find the installed VCRedist.


For completeness I appended the new fragment (see I). Here I "abuse"
the InstallUI sequence as "chainer". For the InstallExecute it gives
an error when FindRelatedProducts doesn't find a relevant version.


Some additional points:
- Yes it's an unconventional approach. Please don't use it if you
don't like the abusing of InstallUI as chainer ...

- The concept of the approach is adapted from InstallShield
implementations which is working flawless since a decade

- Main MSI must run with admin credentials

- The first snippet posted yesterday had no InstallExecute handling +
CA overriding as this is not considered as Must have for our
customers, but now added

- If a user runs package without UI, ADS deployment etc. I assume he
or she has good knowledge and knows about deploying prerequisites or
reading MSI logfiles. There the relevant information is logged if a
needed VCRedist doesn't exist or can be published in the manual how to
handle this use case

- The above mentioned code is kept in a wxi and stored somewhere in
the SC beside the vcredist. So fetching the 2 files + <?include
..\VC2010Redist_x64.wxi?> is the only needed action for including it
into the main wxs

- Detection of VCRedist2010 RTM, VCRedist2010 SP1 (maybe VCRedist 2010 SP2):
Only one of them can exist on system (Nomore SxS like previous
versions). Detecting is described here:
http://blogs.msdn.com/b/astebner/archive/2010/05/05/10008146.aspx. The
FindRelated Products seems IMHO a good, simple way to not run e.g. an
VCRedist 2010 SP1 installer when VCRedist 2010 SP2 (where I cannot
guess Product Code right now) is installed. Other criteria for
dividing RTM and SP1 seems value "Bld" in key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86


Thanks for your feedback and best regards,
Tobias





(I)
----- Begin: VC2010Redist_x86.wxi -----
<!-- <?include ..\Redistributables\VisualC2010\VC2010Redist_x86.wxi?> -->

<Include>
  <!-- Microsoft Visual C++ 2010 Redistributable (10.0.30319)  -->
  <!-- FindRelatedProducts is used to detect if a VCREdist 2010 x86
with the given version is already installed -->
  <Upgrade Id='{1F4F1D2A-D9DA-32CF-9909-48485DA06DD5}'>
    <UpgradeVersion
         OnlyDetect='yes'
         Property='VC2010REDIST_X86'
         Minimum='10.0.30319'
         IncludeMinimum='yes'/>
  </Upgrade>

  <CustomAction Id="Install_2010VCredist.x86" Impersonate="yes"
Return="check" Execute="immediate" BinaryKey="vc2010Redist_x86.exe"
ExeCommand="/passive /norestart"/>
  <Binary Id="vc2010Redist_x86.exe"
SourceFile="$(sys.SOURCEFILEDIR)\vcredist_x86.exe"/>

  <CustomAction Id="Install_2010VCredist.x86_OverrideProperty"
Property="VC2010REDIST_X86" Value="1" />

  <!-- Install VCRedist and override property VC2010REDIST_X86 as this
is not re-evaluated in InstallExecuteSequence -->
  <InstallUISequence>
    <Custom Action="Install_2010VCredist.x86" After="ProgressDlg">Not
Installed And Not VC2010REDIST_X86</Custom>
    <Custom Action="Install_2010VCredist.x86_OverrideProperty"
After="Install_2010VCredist.x86">Not Installed And Not
VC2010REDIST_X86</Custom>
  </InstallUISequence>

  <!-- Throw an error in InstallExecute when no VCRedist is detected
by FindRelatedProducts -->
  <CustomAction Id='Install_2010VCredist.x86_Error' Error="Microsoft
Visual C++ 2010 x86 Redistributable (RTM - 10.0.30319) or higher not
installed" />
  <InstallExecuteSequence>
    <Custom Action='Install_2010VCredist.x86_Error'
After='LaunchConditions'>Not Installed And Not
VC2010REDIST_X86</Custom>
  </InstallExecuteSequence>
</Include>

----- End: VC2010Redist_x86.wxi -----

2011/4/28 Tobias S <tobias.s1...@gmail.com>:
> Assumption based on personal experience as we ran at least the last 4
> years the VCRedist during InstallUI. We nerver got customer issues
> regarding a missing VC runtime. This would be expected when they run
> unattended as there is (was) no abort criteria during InstallExecute
> when no VCRedist installed.
>
>
> 2011/4/28 Jeremy Farrell <jfarr...@pillardata.com>:
>>> From: Tobias S [mailto:tobias.s1...@gmail.com]
>>>
>>> ...
>>>
>>> - Most installs run in UI mode
>>
>> Interesting, where did you get that information from? What's the ratio 
>> between UI-mode runs and silent, and how accurate is the estimate believed 
>> to be?
>> ------------------------------------------------------------------------------
>> WhatsUp Gold - Download Free Network Management Software
>> The most intuitive, comprehensive, and cost-effective network
>> management toolset available today.  Delivers lowest initial
>> acquisition cost and overall TCO of any competing solution.
>> http://p.sf.net/sfu/whatsupgold-sd
>> _______________________________________________
>> WiX-users mailing list
>> WiX-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>
>

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to