How to install AccessControl NSIS plugin? and grant full access to a subfolder?
installation, nsis, plugins, windows
Solution
You can unzip the plugin zip at the root of the NSIS directory, or at least, you need to put the plugin dll into the NSIS `plugins` directory (or to any directory you want if you include it with `!addplugindir`)
- The core of the plugin is in the dll file in `Plugins` directory (the `unicode/plugins` contains the unicode version of the plugin suitable for the unicode flavor of NSIS 3.0+)
- the `Docs` directory contains the plugin documentation
- the `Contrib` directory contains the plugin source code useful if you want to modify the plugin and rebuild it. It is not needed in normal nsis usage.
The correct way to call an nsis plugin is not via the system plugin: you need to call directly the plugin methods from the nsis script, as illustrated in the plugin page :
# Make the directory "$INSTDIR\database" read write accessible by all users
AccessControl::GrantOnFile "$INSTDIR\database" "(BU)" "GenericRead + GenericWrite"
or from some code of mine
AccessControl::GrantOnFile `${somePath}` `(S-1-5-32-545)` `${someAccess}` ;(S-1-5-32-545) is local users GUID
Problem
I am doing what it says on the forum but can't figure out where is the problem. I downloaded the .zip and extracted it. There was 4 folders (Contrib,Docs,Plugins,Unicode) aside from Docs where do I put the rest ? From AccessControl/Plugins I put the .dll to my NSIS/Plugins folder where are the other .dll files. But the other two folders diden't contained any .nsh or .nsi file to put in NSIS/Include. Where is the problem ? I am using HM NIS Edit and when I try to compile it says Invalid Command. I tried this code and it compiles but I dont think it does something.. or maybe I am using the wrong command. I need to give to my config folder read,write permission thats in the INSTDIR. I tried it with INSTDIR\config and INSTDIR. But nothing works at the moment. Maybe the plugin isent included. ``` System::Call 'AccesControl.dll::GrantOnFile (t ."$INSTDIR",t .""(S-1-5-32-545)",t ."FullAccess")' ```