Read and store the value of a Windows registry key in an installer variable
search cancel

Read and store the value of a Windows registry key in an installer variable

book

Article ID: 321512

calendar_today

Updated On:

Products

VMware InstallBuilder

Issue/Introduction

How can you read and store the value of a Windows registry key in an installer variable?

Resolution

You can store the value of a registry key in an installer variable using a <registryGet> action. If the key or name does not exist, then the variable created will be empty. You will have to include a section like the one below inside an action list section of your XML installer project file.

<registryGet>
 <variable>installdir</variable>
 <key>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment</key>
 <name>MY_APPDIR</name>
</registryGet>