Dusan Plavak
Dusan Plavak

Reputation: 4579

Wix, customAction set property

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....

Upvotes: 0

Views: 7797

Answers (1)

Dusan Plavak
Dusan Plavak

Reputation: 4579

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?

Upvotes: 3

Related Questions