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

asked 06 Sep '11, 09:12

Jake's gravatar image

Jake ♦♦
796222226235
accept rate: 98%


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>

link

answered 06 Sep '11, 09:12

Jake's gravatar image

Jake ♦♦
796222226235
accept rate: 98%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×155
×41
×28
×13

Asked: 06 Sep '11, 09:12

Seen: 2,359 times

Last updated: 15 Sep '11, 06:30