|
|
#1 |
|
Junior Member
Join Date: Jan 2008
Posts: 3
|
How do I set permissions on a registry key?
I have been trying the following snippet from the wiki, but it only returns the error message, "Root key name missing", as if the accesscontrol plugin isn't getting my parameters, can anyone help?
Push $0 ; save Push "Marker" ; Set registry ACL's to let "everyone (S-1-1-0)" access the registry settings AccessControl::GrantOnRegKey HKLM "${PRODUCT_DIR_REGKEY}" "everyone" "FullAccess" Pop $0 ; get "Marker" or error msg StrCmp $0 "Marker" Continue MessageBox MB_OK|MB_ICONSTOP "Error setting access control for registry: $0" Pop $0 ; pop "Marker" Continue: Pop $0 ; restore |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
|
IIRC, AccessControl uses HKLM\foo\bar style paths
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jan 2008
Posts: 3
|
After expanding my variable, my AccessControl line looks like this:
AccessControl::GrantOnRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\DerbyAv.exe" "everyone" "FullAccess" According to all the examples and the code that ships with the package, the HKLM should be separate, I did try them together though, and no luck. |
|
|
|
|
|
#4 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
|
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Jan 2008
Posts: 3
|
Thanks Stu, I also found the one liner on my end this afternoon, it's good to know someone is maintaining this.
David |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|