zanz
7th August 2008 00:27 UTC
strange behavior - AccessControl plug-in
I noticed this strange behavior which is consistent on both XP and Vista. AccessControl works fine the first time install but doesn’t work for reinstalls.
I'm setting full access on HKU\.Defaul\companyName\MyApp key And HKLM...
My syntax is:
AccessControl::GrantOnRegKey HKLM "${PRODUCT_RegPath}" "Everyone" "FullAccess"
After installing the product, if I uninstall the product and remove the registry key (manually or from the script).
A reinstall cannot set the permission to 'Everyone' on either HKU, or HKLM. I have reproduced this behavior on several different computers and both OS systems.
It's strange but why I cannot set the permissions for the second time?
Animaether
7th August 2008 11:07 UTC
Out of curiosity - have you checked whether the permission is already "Everyone" for that key the second time you install?
It might simply be saying that it can't change the permission to "Everyone" because it's already set to "Everyone" - would be odd, but that type of behavior isn't uncommon in code -_-
zanz
7th August 2008 16:47 UTC
No permissions get reset. If they're already set to 'Everyone' than things will work well. Permissions change the second time; 'Everyone' is not even listed in the permissions.
Strange thing is that I remove the key entirely, and the installer re-creates the key the second time. I don't want to jump to conclusions but could it be an issue with AccessControl? Reading on the forums and AccessControl documentation, I couldn't find anything related to my issue.
Afrow UK
7th August 2008 18:21 UTC
What is ${PRODUCT_RegPath} set to?
Stu