0

I have a problem during my WiX upgrade - after normal installation of my program for example in version 1.0 I am installing all necessary stuff like RabbitMQ, Erlang and so on but if I want to upgrade same program to version 2.0 during upgrade all the stuff is uninstalled - I do not want to do this...

There is Custom Action defined like UninstallRabbitMQ and condition is added:

        <Custom Action="SetUninstallErlang" Before="UninstallErlang"></Custom>
        <Custom Action="UninstallErlang" After="UninstallHandleExe">(REMOVE="ALL") AND (SKIP_UNINSTALL_ERLANG="0")</Custom>
        
        <Custom Action="SetUninstallRabbit" Before="UninstallRabbit" />
        <Custom Action="UninstallRabbit" Before="UninstallErlang">(REMOVE="ALL") AND (SKIP_UNINSTALL_RABBITMQ="0")</Custom>

SKIP_UNINSTALL_RABBITMQ="0" means if that property equals 0 it will execute but in my registry after installation that value is equal to 1.

The only place in code where this is used is here:

    <Property Id="SKIP_UNINSTALL_HANDLEEXE_SEARCH" Secure="yes">
        <RegistrySearch Id="SKIP_UNINSTALL_HANDLEEXESearch"
                                              Root="HKLM"
                                              Key="Software\PRO\ServerPrereq"
                                              Name="SKIP_UNINSTALL_HANDLEEXE"
                                              Type="raw" />
    </Property>
    <SetProperty Id="SKIP_UNINSTALL_HANDLEEXE" Value="[SKIP_UNINSTALL_HANDLEEXE_SEARCH]" Sequence="both" After="AppSearch">(WIX_UPGRADE_DETECTED OR Installed) AND SKIP_UNINSTALL_HANDLEEXE_SEARCH</SetProperty>

    <Property Id="SKIP_UNINSTALL_ERLANG_SEARCH" Secure="yes">
        <RegistrySearch Id="SKIP_UNINSTALL_ERLANGSearch"
                                              Root="HKLM"
                                              Key="Software\PRO\ServerPrereq"
                                              Name="SKIP_UNINSTALL_ERLANG"
                                              Type="raw" />
    </Property>
    <SetProperty Id="SKIP_UNINSTALL_ERLANG" Value="[SKIP_UNINSTALL_ERLANG_SEARCH]" Sequence="both" After="AppSearch">(WIX_UPGRADE_DETECTED OR Installed) AND SKIP_UNINSTALL_ERLANG_SEARCH</SetProperty>

    <Property Id="SKIP_UNINSTALL_RABBITMQ_SEARCH" Secure="yes">
        <RegistrySearch Id="SKIP_UNINSTALL_RABBITMQSearch"
                                              Root="HKLM"
                                              Key="Software\PRO\ServerPrereq"
                                              Name="SKIP_UNINSTALL_RABBITMQ"
                                              Type="raw" />
    </Property>
    <SetProperty Id="SKIP_UNINSTALL_RABBITMQ" Value="[SKIP_UNINSTALL_RABBITMQ_SEARCH]" Sequence="both" After="AppSearch">(WIX_UPGRADE_DETECTED OR Installed) AND SKIP_UNINSTALL_RABBITMQ_SEARCH</SetProperty>

and definition in Product.wsx

    <Property Id="SKIP_UNINSTALL_HANDLEEXE" Value="0" />
    <Property Id="SKIP_UNINSTALL_ERLANG" Value="0" />
    <Property Id="SKIP_UNINSTALL_RABBITMQ" Value="0" />

so there is no place where value is changing

enter image description here

Now the problem is here:

  1. I'm installing version 1.0 - RabbitMq and Erlang are installed properly - SKIP_UNINSTALL SET TO 0
  2. I'm upgrading to version 2.0 - upgrade uninstall whole previous verions and install new - I have me skip uninstall set to 0 so it should skip uninstall but If i run same .msi with higher version this value will be changed to 1 and it will uninstall it that causes the problem when instller tries to configure RabbitMq but it is missing because of changed value of SKIP_UNINSTALL

how to catch that change - it is never set in code

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.