Reputation: 75
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?
Upvotes: 2
Views: 2674
Reputation: 4196
Following your sample code as close as possible, I see three problems:
INSTALL_DE
)HKEY_CURRENT_USER
to your search path, Root="HKCU"
takes care of it!
", 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>
Upvotes: 5