bajins / NSIS_SetupSkin

NSIS打包工具,基于XML可自定义UI
138 stars 40 forks source link

求大佬联系方式 #3

Closed SilurianYang closed 4 years ago

SilurianYang commented 4 years ago

有个问题 需要向大佬请教下 就是我需要对输出的目录进行标记写入权限。尝试代码如下 无效 求大佬联系方式 我的QQ 1606726660

    AccessControl::GrantOnFile \
        "$INSTDIR" "(BU)" "FullAccess"
    Pop $R0
        WriteRegStr HKCU "Software\aaaaaaaaa" "Path" "$INSTDIR"
    ${If} $R0 == error
        Pop $R0
        WriteRegStr HKCU "Software\aaaaaaaaa" "Error" "AccessControl error: $R0"
    ${EndIf}

    ${If} $R0 != error
                WriteRegStr HKCU "Software\aaaaaaaaa" "Success" "获取成功"
    ${EndIf}

注册表是显示注册成功的 但是当前路径没有权限 QQ截图20200321133501 QQ截图20200321133444

bajins commented 4 years ago

image

你不是写入成功了吗?

SilurianYang commented 4 years ago

但是文件夹没有完全控制的权限啊

bajins commented 4 years ago

https://www.nsisfans.com/thread-8743-1-1.html

https://nsis.sourceforge.io/AccessControl_plug-in

你需要下载插件到NSIS\Plugins目录下

SilurianYang commented 4 years ago

换了一个方式解决了 谢谢大佬