[wix-users] update Registry Key when user reruns the setup and clicks on change/reinstall button
Aparna Dalvi
apa9rna at gmail.com
Thu Oct 24 22:34:28 PDT 2019
Could anybody help me on this?
On Wed, Oct 23, 2019, 9:57 AM Aparna Dalvi <apa9rna at gmail.com> wrote:
> Thanks for your reply.
>
> I have another componets which has condition, and i want it to be
> evaluated on reinstall as user can change his preferences during
> change/reinstall. That's whay I set tarnsitive to yes. Here is my another
> componet.
>
> <Component Id="cmp_Registry_SetupSettings_xx" Guid="
> $(var.guid_cmp_Registry_SetupSettings_xx)" Win64="yes" Transitive="yes" >
>
> <Condition><![CDATA[CONFIGURE_LATER_SELECTED = 1 OR
> USE_LOCAL_SELECTED = 1]]></Condition>
>
> <RegistryKey Root='HKLM' Key='
> SOFTWARE\$(var.ProductSetupFullRegRoot)' ForceCreateOnInstall='yes'
> ForceDeleteOnUninstall='no'>
>
> <RegistryValue Name='z' Value='{}' Type='string' />
>
> <RegistryValue Name='7' Value='{}' Type='string' />
>
> </RegistryKey>
>
> </Component>
>
>
>
> On Wed, Oct 23, 2019, 9:46 AM Edwin Castro <egcastr at gmail.com> wrote:
>
>> Hi Apps,
>>
>> I think your use of Transitive="yes" is backfiring on you.
>>
>> The article below suggests you use Transitive="yes" as a mechanism to
>> conditionally install between components. In such cases you want to
>> evaluate a condition and install/remove the component only on condition
>> transition from true to false or false to true. You don't have a condition
>> so once your component is installed the "condition" doesn't change so it
>> doesn't reinstall the component.
>>
>>
>> https://blogs.technet.microsoft.com/alexshev/2008/03/27/from-msi-to-wix-part-12-customizing-installation-using-transitive-components/
>>
>>
>> Of course, that is only a guess. Perhaps the problem may actually have
>> more to do with the value of the REINSTALLMODE property.
>>
>> https://docs.microsoft.com/en-us/windows/win32/msi/reinstallmode
>>
>> I would first try to remove the Transitive attribute and test to see if I
>> get the behavior I expect to get and then go from there.
>>
>> --
>> Edwin G. Castro
>>
>>
>> On Tue, Oct 22, 2019 at 11:22 PM Aparna Dalvi via wix-users <
>> wix-users at lists.wixtoolset.org> wrote:
>>
>>> Hi all,
>>>
>>>
>>>
>>> I have a feature as shown below.
>>>
>>>
>>> <Feature Id="F_PRODUCT_INSTALLROOT"
>>>
>>> Title="!(loc.F_ProductSetup.Title)"
>>>
>>> Level="1"
>>>
>>> TypicalDefault="install"
>>>
>>> Description="!(loc.F_ProductSetup.Description)"
>>>
>>> AllowAdvertise="no"
>>>
>>> Absent="disallow">
>>>
>>> <ComponentGroupRef Id="cgrp_Registry_Build_CurrentVersion"/>
>>>
>>> <ComponentGroupRef Id="cgrp_Registry_SetupSettings"/>
>>>
>>> </Feature>
>>>
>>>
>>>
>>>
>>>
>>> All component groups are writing into registry. In first installation
>>> setups writes in registry as expected. When user rerun the same setup and
>>> click on change, he must be able to change the registry values.
>>>
>>>
>>> But this is not working . I see property values updated to new one but
>>> the
>>> feature is not getting install and registry settings are not updated.
>>> here
>>> is the log:
>>>
>>>
>>>
>>> *MSI (s) (D4:24) [11:36:46:311]: Feature: F_PRODUCT_INSTALLROOT;
>>> Installed:
>>> Local; Request: Null; Action: Null*
>>>
>>>
>>>
>>> Here is the registry group I am trying to update on change/reinstall
>>>
>>>
>>>
>>> <ComponentGroup Id=" cgrp_Registry_SetupSettings" Directory="
>>> DIR_COMMON_DEFAULT_PITWEBPUBROOT">
>>>
>>> <Component Id="cmp_Registry_SetupSettings_PCS" Guid="
>>> $(var.guid_cmp_Registry_SetupSettings_PCS)" Win64="yes" Transitive="yes">
>>>
>>> <RegistryKey Root='HKLM' Key='
>>> SOFTWARE\$(var.ProductSetupFullRegRoot)' ForceCreateOnInstall='yes'
>>> ForceDeleteOnUninstall='no'>
>>>
>>> <RegistryValue Name='[xyz]' Value='[xyz]' Type='string' />
>>>
>>> </RegistryKey>
>>>
>>> </Component>
>>>
>>> </ComponentGroup>
>>>
>>>
>>>
>>> I have already search (google and wix users mail archive) but could not
>>> find any working solution.
>>>
>>>
>>> I really appreciate if somebody can help me to resolve this problem.
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Apps
>>>
>>> ____________________________________________________________________
>>> WiX Toolset Users Mailing List provided by FireGiant
>>> http://www.firegiant.com/
>>>
>>
More information about the wix-users
mailing list