如何安装AccessControl NSIS插件?并授予对子文件夹的完全访问权限? [英] How to install AccessControl NSIS plugin? and grant full access to a subfolder?

查看:579
本文介绍了如何安装AccessControl NSIS插件?并授予对子文件夹的完全访问权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在按照论坛上的指示进行操作,但无法确定问题出在哪里.我下载了.zip并将其解压缩.除了Docs之外,还有4个文件夹(Contrib,Docs,Plugins,Unicode),我应该把其余的文件夹放在哪里?从AccessControl/Plugins,我将.dll放到我的NSIS/Plugins文件夹中,其他.dll文件也位于该文件夹中.但是其他两个文件夹没有包含要放在NSIS/Include中的任何.nsh或.nsi文件.问题出在哪儿 ?我正在使用HM NIS Edit,当我尝试对其进行编译时,它显示无效命令".

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.

我尝试了这段代码,并且可以编译,但是我不认为它可以执行任何操作..或者我使用了错误的命令.我需要给INSTDIR中的配置文件夹以读取,写入权限.我尝试了INSTDIR \ config和INSTDIR.但是目前没有任何效果.也许已包含该插件.

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")'

推荐答案

您可以将插件zip解压缩到NSIS目录的根目录,或者至少需要将插件dll放入NSIS plugins目录(或要添加到 !addplugindir 的任何目录中)

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)

  • 插件的核心位于Plugins目录中的dll文件中(unicode/plugins包含适合NSIS 3.0+ Unicode风格的插件的Unicode版本)
  • Docs目录包含插件文档
  • Contrib目录包含插件源代码,如果您要修改插件并重建它,则很有用.在正常的nsis使用中不需要.
  • 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.

调用nsis插件的正确方法不是通过系统插件:您需要直接从nsis脚本调用插件方法,如

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"

或来自我的一些代码

AccessControl::GrantOnFile `${somePath}` `(S-1-5-32-545)` `${someAccess}` ;(S-1-5-32-545) is local users GUID

这篇关于如何安装AccessControl NSIS插件?并授予对子文件夹的完全访问权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆