0

I`m trying to set some launch conditions, so I just look after some registry and if they exists the installation can continue... if not it should stop...

Problem is, that it`s not working...

    <Property Id="MSGEOPATHV8">
        <RegistrySearch Id='msGeoV8_PathRegistry' Type='raw'
            Root='HKLM' Key='SOFTWARE\Bentley\MicroStation GeoGraphics\08.01' Name='PathName' Win64='no'/>
    </Property>

    <CustomAction Id="caGeoPathV8" Execute="firstSequence" Property="MSGEOPATH" Value="[MSGEOPATHV8]" />

    <Condition Message="[MSGEOPATH] Installation of requires previous installation of MicroStation GeoGraphics V8 or Bentley MAP XM/V8i.">MSGEOPATH</Condition>

    ...
    ...

    <InstallExecuteSequence>
        <Custom Action='caGeoPathV8' After='LaunchConditions' />    
    </InstallExecuteSequence>

I found that I need to do it after appSearch... so I checked it with orca... But custom action is scheduled after app search and before launchConditions.... so it should be ok... Also I read that probably the variable name should be upper case... something like global... so I did it and still nothing...

Any help? Thanks

EDIT: What I forgot to say... if I in condition mesasage replace MSGEOPATH by MSGEOPATHV8 it print actually the path what it found....

Community
  • 1
  • 1
Dusan Plavak
  • 4,457
  • 4
  • 24
  • 35

1 Answers1

3

Ok, I solved it... the problem is that I don`t have defined installationUI sequence...

<InstallUISequence>
        <Custom Action='caGeoPathV8' Before='LaunchConditions'>NOT Installed</Custom>
</InstallUISequence>

With this it works... but still not sure why? Because if I`m right the is executing every time or not?

Dusan Plavak
  • 4,457
  • 4
  • 24
  • 35
  • 1
    Looks like InstallExecuteSequence is not executed every time: `InstallExecuteSequence is always consulted by the installer to determine the actions, InstallUISequence is only considered when the installer runs in full or reduced UI mode (yet another functionality to experiment with, try msiexec /qn, /qb and /qr). Because we need to schedule our registry search before the launch condition in all UI cases, insert that line into both tags. Compile and run, it should work now, keep renaming the registry key to check.` http://wix.tramontana.co.hu/tutorial/events-and-actions/queueing-up – Dusan Plavak Aug 09 '13 at 14:42
  • 1
    I would suggest using the [`SetProperty` element](http://wix.sourceforge.net/manual-wix3/wix_xsd_setproperty.htm) instead. It's only one line, and easier to read. – Netfangled Aug 11 '13 at 02:16