I need to add registry keys in Windows 7. When I try to add HKLM\SOFTWARE\Classes\SciWordDocument, I get a "could not add key" error message. If I try to add it using reg.exe, I get "Access Denied" even though I am an administrator. If I manually alter the permissions, I can add the key using reg.exe. Can I alter the permissions from the installer?

asked 06 Mar '12, 20:12

Dave%20Bailey's gravatar image

Dave Bailey
1111
accept rate: 0%


It is possible to use the regini command to modify the permissions for specific registry keys. For example:

<postInstallationActionList>
  <writeFile>
    <path>${system_temp_directory}/regini_script.txt</path>
    <text>HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\SciWordDocument [1 5 7 11 17]</text>
  </writeFile>
  <runProgram>
    <program>regini</program>
    <programArguments>"${system_temp_directory}/regini_script.txt"</programArguments>
  </runProgram>
  <deleteFile>
    <path>${system_temp_directory}/regini_script.txt</path>
  </deleteFile>
</postInstallationActionList>

The above will grant full access to everyone.

You can find more information about the regini command and the list of numeric values above in the following document:

How to Use Regini.exe to Set Permissions on Registry Keys

link

answered 07 Mar '12, 09:14

wojciechka's gravatar image

wojciechka ♦♦
7.8k61122
accept rate: 26%

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:

×28
×9

Asked: 06 Mar '12, 20:12

Seen: 6,975 times

Last updated: 07 Mar '12, 09:14