We use WiX 3.0.4805.0.

I needed to implement this requirement:
Check the registry HKCR\foo\bar, if it exists then do nothing; if it doesn't 
exist, then write the registry.

So I have these pieces of code:
        <Property Id='CHECK_FOOBAR_REGISTRY'>
            <RegistrySearch Id='CheckFoobarRegistry' 
                            Root='HKCR' 
                            Key='foo\bar' 
                            Type='raw' />
        </Property>
        ... 
            <Component Id="WriteFoobarReg" Guid="...">
                <Condition>NOT CHECK_FOOBAR_REGISTRY</Condition>
                <RegistryKey Root="HKCR" 
                             Key="foo\bar" 
                             Action="create" >
                    <RegistryValue Type="string" 
                                   Value='&quot;[#MyApp]&quot;' 
                                   KeyPath="yes" />
                </RegistryKey>
            </Component>
            ...
            <ComponentRef Id="WriteFoobarReg" />          

It works. But realized that this registry entry will be deleted when 
uninstall(if it's created by the installer). I thought "create" means just 
creating the key, but not delete it during uninstallation. So what is the 
difference between "create" and "createAndRemoveOnUninstall" action?

Thanks.
/Brian


      __________________________________________________________________
The new Internet Explorer® 8 - Faster, safer, easier.  Optimized for Yahoo!  
Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/
------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to