Question

Q: How can I create a new Windows registry key or modify the value of an existing one?

How can I create a new Windows registry key or modify the value of an existing one?

Answer:

You can create a new registry key or modify the value of an existing registry key using a <registrySet> action. You will have to include a section like the one below inside an action list section of your XML installer project file.

<registrySet>
 <key>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment</key>
 <name>MY_APPDIR</name>
 <value>${installdir}</value>
</registrySet>