2

I want to set the INSTALL_DE property value to 1 if registry entry HKEY_CURRENT_USER\Control Panel\International\LocaleName has value de-DE.

I wrote the below code.

<Property Id="INSTALL_DE">
    <RegistrySearch
        Id="NetFramework20"
        Root="HKCU"
        Key="HKEY_CURRENT_USER\Control Panel\International"
        Name="LocaleName"
        Type="raw" />
</Property>

<SetProperty Id="INSTALL_DE" After="AppSearch" Value="1">
    <[CDATA[INSTALL_DE="de-DE"]]>
</SetProperty>

How do I correct it?

1
  • Did you solve your problem? Was the answer given of any help? Commented Aug 21, 2014 at 10:12

1 Answer 1

5

Following your sample code as close as possible, I see three problems:

  1. double use of identfier (in this case INSTALL_DE)
  2. wrong key name; do not prefix HKEY_CURRENT_USER to your search path, Root="HKCU" takes care of it
  3. Missing "!", in CDATA

Write e.g.

<Property Id="LOCAL_NAME">
    <RegistrySearch Id="NetFramework20"
            Root="HKCU"
            Key="Control Panel\International"
            Name="LocaleName"
            Type="raw" />
</Property>

<SetProperty Id="INSTALL_DE" After="AppSearch" Value="1">
    <![CDATA[LOCAL_NAME="de-DE"]]>
</SetProperty>
Sign up to request clarification or add additional context in comments.

Comments

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.