I'm trying to add permissions on a registry key in LocalMachine (HKLM) and it doesn't work.
I've enabled the 64 bits mode:
Set x64 - Native 64 bit Windows, AMD64 and EM64T Architectures - installation mode
I'm using InstallAware Studio 15. To create my testing project, I've used the Setup64 template on a 64 bit Win 7 machine.
On a native 64-bit project the result is the following:
The registry key is written but permissions aren't set. It works for HKCR and HKCU but not for HKLM.
I've attached the full code of my project (mia.txt) (take a look at lines 167 to 172).
Here's what I try to do:
Code: Select all
Check Registry Key HKLM\SOFTWARE\MySoftwareA\ into CHKREGEXISTS
if Variable CHKREGEXISTS Equals NO$KEY
Write Registry Key HKLM\SOFTWARE\MySoftwareA\, (permanent)
Apply Install
end
Set Read Write Permissions on Registry Key "HKLM\SOFTWARE\MySoftwareA" for Everyone
The same code but in MSI format is the following:
Code: Select all
~InstallAware Clipboard Data~
~Set Access Control~
~{54CC5BBE-B905-4F7A-8765-59470545920C}~
~HKLM\SOFTWARE\MySoftwareA~
~TRUE~
~FALSE~
~FALSE~
~FALSE~
~~
~TRUE~
~TRUE~
~TRUE~
~FALSE~
~FALSE~
~FALSE~
~FALSE~
~TRUE~
~FALSE~
~FALSE~
~End~
~{0AA5431A-6C8A-45B0-98EA-5AC2C94BBF5F}~
~Apply Changes~
~{E850121F-2148-4409-BD3E-B576A09258CD}~
~~
~~
~TRUE~
~FALSE~
~Write Registry~
~{53D87458-00E0-49EB-ACA0-C6DFC491B4C1}~
~10~
~2~
~SOFTWARE\MySoftwareA~
~~
~~
~TRUE~
~FALSE~
~If~
~{29B6E05B-13CA-4B44-8DEF-86965CE976DC}~
~CHKREGEXISTS~
~0~
~NO$KEY~
~FALSE~
~Check Registry~
~{520E58F7-92E7-4729-9FBB-DCC30DF50C52}~
~CHKREGEXISTS~
~2~
~SOFTWARE\MySoftwareA~
~~
Thanks a lot!