[wix-devs] How to modify registry in Custom Action(s)

turik88 at yandex.ru turik88 at yandex.ru
Mon Jun 11 05:54:05 PDT 2018


Hi all,

I want to write a Wix Extension, which provides an ability to add something to the registry on install, and remove it on uninstall.
But 'deferred' Custom Action, which should be the right point to modify the registry, does not do the work. Registry does not get updated.
I am only able to modify the registry during 'immediate' CA.
What's wrong?

<Fragment>

    <CustomAction Id="RegEditPrepare" BinaryKey="Some.CA" DllEntry="RegEditPrepare"
                  Execute="immediate" Impersonate="no" HideTarget="yes" />

    <CustomAction Id="RegEditPrepareUninstall" BinaryKey="Some.CA" DllEntry="RegEditPrepare"
                  Execute="immediate" Impersonate="no" HideTarget="yes" />

    <CustomAction Id="RegEditExecute" BinaryKey="Some.CA" DllEntry="RegEditExecute"
                  Execute="deferred" Impersonate="no" HideTarget="yes" />

    <CustomAction Id="RegEditRollback" BinaryKey="Some.CA" DllEntry="RegEditRollback"
                  Execute="rollback" Impersonate="no" HideTarget="yes" />

    <CustomAction Id="RegEditUninstall" BinaryKey="Some.CA" DllEntry="RegEditUninstall"
                  Execute="deferred" Impersonate="no" HideTarget="yes" />

    <InstallExecuteSequence>
      <Custom Action="RegEditPrepare" Before="RegEditExecute">
        NOT Installed
      </Custom>

      <Custom Action="RegEditExecute" Before="StartServices">
        NOT Installed
      </Custom>

      <Custom Action="RegEditRollback" Before="RegEditExecute">
        NOT Installed
      </Custom>

      <Custom Action="RegEditPrepareUninstall" Before="RegEditUninstall">
        REMOVE~="ALL"
      </Custom>

      <Custom Action="RegEditUninstall" Before="StartServices">
        REMOVE~="ALL"
      </Custom>

    </InstallExecuteSequence>

  </Fragment>

Thank you in advance


More information about the wix-devs mailing list